Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Get the current form list column name and fill it by another custom list field

Posted on 2013-01-28
4
Medium Priority
?
349 Views
Last Modified: 2013-02-05
Dears,

 I have SharePoint 2010 Form Library. When loading this form library, I need to fill some fields like name, department, hire_date from another custom list  where all these information are already exist. Both forms are identified by a unique ID.

How to do these by using Visual Studio Loading Event option (under developer tab) by InfoPath 2010?
0
Comment
Question by:mshaji
[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
  • 2
  • 2
4 Comments
 
LVL 50
ID: 38829818
Hello, you need to define a data connection to the other list. Then create a rule that fills the fields when the key field changes. Filter the data source by the key field. To do that, set a field value in the secondary data source, using the appropriate field in the query field group. Then query the data connection. After that simply set the main data source fields with the values of the (now filtered) secondary data source fields.

Code is not required for that.

Cheers, teylyn
0
 

Author Comment

by:mshaji
ID: 38829871
Thanks for the supoort dear,

I am not getting your points. Can you explain it in details please.

Lets say, I have Custom list Named: New_Arrival_Form  (First list) with fields Badge_No, Name, Nationality, Designation, Grade, Hire_Dt  

I have another list named: New_Arrival_Form_Evaluation (Second list) with fields New_Arrival_Form_ID  (this is the ID of the custom list), Badge_no, Name, Nationality, Designation, Grade, Hire_Dt

Now, when a user click a row record of the  fist list then the page will redirect by passing the ID of the first list  to the second list.

and when the second list loads then it will fetch the data from the fist list by using the passed ID and will display in the fields of second list like Badge_No, Name, etc

I hope this will clear my goal

Regards
0
 
LVL 50

Accepted Solution

by:
Ingeborg Hawighorst (Microsoft MVP / EE MVE) earned 2000 total points
ID: 38830180
Edit the list form for the second list. The fields in that list are the main data source. In the field panel on the right, underneath the list of fields, click "Advanced View".

Create a new data connection and point it to the first list. Include all the fields that you want to look up and also include the ID field of the first list. This data connection is the secondary data source.

Create a new rule for the field New_Arrival_Form_ID. The rule should be executed whenever the field changes. Create the following actions:

Set a field's value
- Field: select the secondary data source, open the query fields node and select the ID field. If you don't see a drop-down to change the data source, click "Advanced View" below the list of fields.
- Value: select New_Arrival_Form_ID from the Main data source

Query for data
- select the data source for the first list

Set a field's value
- Field: Badge_no field in the Main data source
- value: Badge_no field from the data fields node of the secondary data source

Set a field's value
- Field: Name field in the Main data source
- value: Name field from the data fields node of the secondary data source

repeat for the other fields.
0
 

Author Comment

by:mshaji
ID: 38853907
Some part helped
0

Featured Post

Learn Veeam advantages over legacy backup

Every day, more and more legacy backup customers switch to Veeam. Technologies designed for the client-server era cannot restore any IT service running in the hybrid cloud within seconds. Learn top Veeam advantages over legacy backup and get Veeam for the price of your renewal

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…
There is one common problem that all we SharePoint developers share: custom solution deployment. This topic can't be covered fully in this short article, so all I want to do in this one is to review it from a development-to-operations perspectiv…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

688 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