On Friday, October 31, 2008 5:14 AM Frederik Van Lierde wrote:
Hi
I will try to explain how to do it, my article with screenshots isn't
ready yet
So You have a Repeating Section
In the repeating section you have a DropDownList with a link to the
Second DataSource, Value = the ID of the company, Display Name = Name
of the company
In the repeating section you also have a textbox for the contactName
The idea is that the Value for the Contact is the following
SELECT ContactName FROM [Second Data Source] WHERE [Copany ID of
Second DataSource] = [The Selected Company ID]
[The Selected Company ID] = The Company ID in the Main DataSource, as
every data in the form is saved in the Xml behind;
Now the link
- Open Properties Dialog Box of the Dropdown Box
- Click on the Rules Button
- Click on the Add button in the Rule Dialog Box
- Click on Add Action
- Select Set a field's value in the Drop Down Box
- In the Field, select the CompanyContact field in the Main DataSource
- In the Value, open the Insert Formula dialog box by clicking the Fx
button
- Click Insert Field or Group (a dialog box opens)
- Select the second datasource in the datasource dropdown
- Select the ContactName from the second datasource
- Click on Filter Data
- Click on Add
- Select the ID in the first dropdown
- Select 'Select a field or group' in the third dropdown
- Select Main DataSource in the DataSource dropdown
- Select the Company ID (field = the field used for databinding the
company dropdown in your repeating section)
- Press 8 times OK
I hope this brings you closer to your solution
Frederik Van Lierde
http://www.SilverSandsAssociates.com
http://BlueInfoPath.blogspot.com