Solved

infopath formula

Posted on 2011-03-15
3
1,034 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

Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

Question has a verified solution.

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

Suggested Solutions

These days socially coordinated efforts have turned into a critical requirement for enterprises.
A recent project that involved parsing Tableau Desktop and Server log files to extract reusable user queries for use in other systems. I chose to use PowerShell to gather the data, and SharePoint to present it...
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

730 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