Missing something - GetUserInfo - InfoPath Dev
in

InfoPath Dev

Missing something - GetUserInfo

Last post 03-02-2010 09:40 AM by selch. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 03-02-2010 09:25 AM

    • selch
    • Not Ranked
    • Joined on 09-17-2009
    • Posts 18

    Missing something - GetUserInfo

    In my form I'm using FindUsersByName and that works fine. However, as far as I can tell, it only returns user alias and display name. I want the user's email and phone numbers too. So...

    When I get my FindUsersByName result I'm using a button to set Field1 (which is named username) in my Main datasource as the resultant display name. I'd like to use that button to also trigger a GetUserInfo query to populate Field2 with their email and Field3 with their phone. Of course I'm here because that's not working.

    Here's the rule I have set for that button:

    Set field's value: username = @display

    Query using a data connection:  GetUserInfo

    Set field's value: field2 = Value[key="mail"] --- from the secondary datasource GetUserInfo

    Set field's value: field 3 = Value[key="telephoneNumber"] --- from the secondary datasource GetUserInfo

    I keep trying different variation of this but I can't get it to query and return results for email and phone. Ideas? Thanks much!

  • 03-02-2010 09:34 AM In reply to

    Re: Missing something - GetUserInfo

     Shouldn't you be using the user alias and not the display name for querying GetUserInfo?  Unless I'm missing something about that detail.

    You can also try displaying the results of GetUserInfo in a view of your form so you can see what kind of data is coming back.

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 03-02-2010 09:40 AM In reply to

    • selch
    • Not Ranked
    • Joined on 09-17-2009
    • Posts 18

    Re: Missing something - GetUserInfo

     Thanks for your feedback. I got it. Instead of setting myField's username field to the result, I needed to set the GetUserInfo username to the result and then query. works like a charm.

     

Page 1 of 1 (3 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.