Solved

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

Posted on 2013-01-28
4
309 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Microsoft SharePoint Foundation 2010 and Microsoft SharePoint Server 2010 do not offer the option to configure the location of the SharePoint diagnostic trace log files during installation.  This can, however, be configured through Central Administr…
Summary In SharePoint 2010 it is easy to create custom color themes to jazz up a site. Theme colors can also be created in PowerPoint 2010 with a few clicks. But how do the chosen colors actually look in the SharePoint site? The attached PowerPoint…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
Internet Business Fax to Email Made Easy - With  eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…

912 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now