Friday 7 June 2013

Displaying the user details in InfoPath based on user without code and getting the current login user details

Displaying the user details in InfoPath based on user without code:
1)      Design form

2)      Go to data connectionsàReceive dataàsite urlàSharePoint library or listàUser information      listàHere select the required columns

3)  Create one hidden field (text box) name it hidden
4) Give some rules.
    Set field value (username to hidden field)
Another rule:User name(Means title(field name in this form))
Title is blank. Give a some screen tip
 
5) Add one button name it display.select button go to  control propertiesàselect Refresh

6) Add a rules to hidden field (set field values to Hidden field)
In the set afield value value section go and select the field name (for ex Email).after that  select standard viewàin the field section select user information listàselect Work email from user information listàFilter dataàEntered user name (Title field in our form ) is equal to USER NAME IN THE USER INFORMATION LIST..

step by step explanation for one field:
1)

2)select email


3)Select standard view after that select user information list from the fields section


4) select data fieldsàselect work emailà

5)select filter dataàaddàselect the user name in user information list is equal to Title(form field entered user name)
Selecting the form field like this
from MainàData fields section

After selecting the main select the form field user name(Title in our form)


Getting the current login  user details
Add the function username() to text box based on that filter the details from user information list

                                                Same steps like above

No comments:

Post a Comment