0

I need to show the user full name in InfoPath form. I tried the webservice and data connection for User Information list but still not getting. Can any one show me the steps he/she follow to show display name.

1
  • Can you provide a bit more detail on what exactly it is you're hoping to achieve and what you have tried so far?
    – Kirito
    Oct 3, 2018 at 10:43

1 Answer 1

1

To get the current user's display name, assuming you have the User Information data connection already set up, I create a rule that runs when the form loads. The rule doesn't have any conditions, just to run when the form loads. The following actions are added to the rule:

  1. Set a field's value: select the field for User Information List-->queryFields-->Account enter image description here
  2. Select infopath's function userName() as the value enter image description here
  3. Then in the same rule I add the action to query the data connection for the User Information List.

enter image description here

In the field that I want to add the current user's display name to I add the default value of the User Information List-->dataFields-->Name.

enter image description here

At this point you don't have to use the Name field as I suggested, you can add any dataField value that you are wanting to retrieve information for the current user. Make sure that you checkmark "Refresh value when formula is recalculated" so that this value is updated each time the form is opened.

enter image description here

Don't be alarmed if the name that appears in the value is different from what you selected on the user information list. What is displayed on the value portion often changes to the field's properties name that is set on sharepoint. The end result is still the same though.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.