D
Dan The Man
Hi All,
I've been having some difficulty setting a text field using a secondary data
source.
Here is the situation:
- I have a repeating section that contains to fields of type string.
- The first field (called "PersonsName") is a drop down list tied to a
secondary datasource (called "People").
- Data Source "People" contains the following dataFields:
@Name
@Age
- What I would like to see happen is when the user selects a persons name
in the first field "PersonsName", I want the second field (called
"PersonsAge"), a text field, to be set to the corresponding Age of that
person from the Datasource.
Details:
What I have done to date that hasn't worked:
1) Tried to create a rule attached to the "PersonsName" field that set
the "PersonsAge" field to:
xdXDocument:GetDOM("People")/dfs:myFields/dfs:dataFields/dfseople[@Name =
..]/@Age
or to:
xdXDocument:GetDOM("People")/dfs:myFields/dfs:dataFields/dfseople/@Age[@Name = .]
or to:
xdXDocument:GetDOM("People")/dfs:myFields/dfs:dataFields/dfseople/@Age[xdXDocument:GetDOM("People")/dfs:myFields/dfs:dataFields/dfseople/@Name = .]
2) I've converted the "PersonsAge" text field to a drop down list that
sourced the secondary data source but was filtered on the PersonsName. This
worked but I couldn't get the drop down to select the first non blank entry
in the list.
Now, I don't know why I haven't been successful in getting the value from
the datasource. I'm sure it is something simple.
Any help would be appreciated.
Thanks
I've been having some difficulty setting a text field using a secondary data
source.
Here is the situation:
- I have a repeating section that contains to fields of type string.
- The first field (called "PersonsName") is a drop down list tied to a
secondary datasource (called "People").
- Data Source "People" contains the following dataFields:
@Name
@Age
- What I would like to see happen is when the user selects a persons name
in the first field "PersonsName", I want the second field (called
"PersonsAge"), a text field, to be set to the corresponding Age of that
person from the Datasource.
Details:
What I have done to date that hasn't worked:
1) Tried to create a rule attached to the "PersonsName" field that set
the "PersonsAge" field to:
xdXDocument:GetDOM("People")/dfs:myFields/dfs:dataFields/dfseople[@Name =
..]/@Age
or to:
xdXDocument:GetDOM("People")/dfs:myFields/dfs:dataFields/dfseople/@Age[@Name = .]
or to:
xdXDocument:GetDOM("People")/dfs:myFields/dfs:dataFields/dfseople/@Age[xdXDocument:GetDOM("People")/dfs:myFields/dfs:dataFields/dfseople/@Name = .]
2) I've converted the "PersonsAge" text field to a drop down list that
sourced the secondary data source but was filtered on the PersonsName. This
worked but I couldn't get the drop down to select the first non blank entry
in the list.
Now, I don't know why I haven't been successful in getting the value from
the datasource. I'm sure it is something simple.
Any help would be appreciated.
Thanks