Solved

infopath formula

Posted on 2011-03-15
3
1,037 Views
Last Modified: 2012-05-11
Dear Sir
i create a form in infopath and connected to sharepoint form, all thing work fine.
i creata a field name "user" and i create a rule for this field from the infopath rule to display the username of the current user.
i use username() as rule.
and it is working fine, when a user from sharepoint open the form , his username is displaying in the "user" field.
but now i want to create a second field named "name" to display the name of the current user .
There is a list in sharepoint named "user information list" which contains all the information about users ( first name,last name,username, display name, company .....)
i want to create a rule in infopath for this field "name" to display the name for the current user using "user information list" .

how can i did it ??
0
Comment
Question by:spring80
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 7

Expert Comment

by:AlMothanaAlOmari
ID: 35136068
Hi
you can achieve this by using infopath code behind , you should write a code to expose sharepoint list then to read fro this list and write the field that you want  .

http://platinumdogs.wordpress.com/2010/06/21/sharepoint-using-the-sharepoint-object-model-with-infopath-form-code-behind-part1-of-2/
0
 
LVL 28

Accepted Solution

by:
clayfox earned 500 total points
ID: 35137572
You can do this in InfoPath without any code.

The key is filters.

When you set a fields value or make a default with a function.  Go to the user list and select the field with Display Name. Before selecting OK use the button on the lower left called filter.

Add a filter
Username = username()

This way you will get the display name from the list where username in the list is equal to the username() of the person opening the form.
0
 

Author Closing Comment

by:spring80
ID: 35139077
it is working ,thanks youu.
very good solution
0

Featured Post

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I used to be SharePoint evangelist in our company, so my Outlook always full of questions about how to do this, or where I can find that. One day I found such an email with the following question: "how to attach 3-State workflow (one of the workflow…
These days socially coordinated efforts have turned into a critical requirement for enterprises.
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

717 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question