Solved

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

Posted on 2013-01-28
4
329 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
  • 2
  • 2
4 Comments
 
LVL 50

Expert Comment

by:Ingeborg Hawighorst
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 earned 500 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Work Over Net is a new and very powerful collaboration product. With its new easy interface it is becoming very competitive to other similar products like webex and office interactive. WON 2010 have the standard business tools needed for multi-offic…
We had a requirement to extract data from a SharePoint 2010 Customer List into a CSV file and then place the CSV file into a directory on the network so that the file could be consumed by an AS400 system. I will share in Part 1 how to Extract the Da…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

808 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