Hi all,
I have a data connection to retrieve data from an XML file. My users type in their Userid into a field on Infopath form
and the XML data connection should fetch their name and contact details from XML file based on Userid.
Below is the structure of my XML file.
- <Root xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <Row>
<ID>12345</ID>
<Fname>Test1</Fname>
<Lname>Test2</Lname>
<Email>[email protected]</Email>
<Phone>123-456-7890</Phone>
</Row>
- <Row>
<ID>54321</ID>
<Fname>Test3</Fname>
<Lname>Test4</Lname>
<Email>[email protected]</Email>
<Phone>123-456-7891</Phone>
</Row>
</Root>
Now when I am trying to build a rule some thing like below, it always fetches 1st record(12345) details even though i change the
user id on the form to 2nd record.(54321).
Condition: Userid is not blank
Rule type: Action
Run these actions:
Set a field's value : ID = . [ User id field]
Query using a dataconnection : TestXML
Set a field's value : Emp_FName = FName
Set a field's value : Emp_LName = LName
Set a field's value : Emp_Email = Email
Set a field's value : Emp_Phone = Phone
Earlier i have used similar method to read Active Directory using SOAP service (GetUserProfileByName) and it worked fine.
Now when i am trying to do similar method to get the data from XML file, it is not working. Please advise.
Thanks in advance.