C
Carl
First, I'm a rookie at InfoPath. Have read one book and made only a couple of
forms. I'm accessing Small Business Accounting Views to populate a drop-down
and then using rules to set several values in my form.
My Data Connection is based on this code:
shape
{SELECT a.AccountID, a.PurchasePrice, c.Name as Name, b.Name as ItemGroup,
a.Name as PartNumber, a.PurchaseDescription, a.VendorItemNumber, (b.Name + ';
' + a.Name + '; ' + a.PurchaseDescription) as LongDropDownDesc
FROM NonInventoryItemAccountEntityView a
left outer join ItemGroupEntityView b
ON a.ItemGroupID = b.SupportingTableID
left outer join VendorAccountView c
ON a.PreferredVendorAccountID = c.AccountID
ORDER BY ItemGroup, PartNumber}
Which does populate the drop down successfully.
I then want to put some of the returned values, @Name (for example), into a
TextBox control. To do this I wrote a Rule on the DropDown control which sets
the TextBox VendorName to @Name. The xpath I'm using is:
xdXDocument:GetDOM("ItemDropDown_WithExtraData")/dfs:myFields/dfs:dataFields/d:AccountID/@Name
I can scroll the DropDown and select different items from the list, but I
always get the returned values for the first row in the shape/dataset
returned.
What am I missing??
Thanks very much for the help.
Carl
forms. I'm accessing Small Business Accounting Views to populate a drop-down
and then using rules to set several values in my form.
My Data Connection is based on this code:
shape
{SELECT a.AccountID, a.PurchasePrice, c.Name as Name, b.Name as ItemGroup,
a.Name as PartNumber, a.PurchaseDescription, a.VendorItemNumber, (b.Name + ';
' + a.Name + '; ' + a.PurchaseDescription) as LongDropDownDesc
FROM NonInventoryItemAccountEntityView a
left outer join ItemGroupEntityView b
ON a.ItemGroupID = b.SupportingTableID
left outer join VendorAccountView c
ON a.PreferredVendorAccountID = c.AccountID
ORDER BY ItemGroup, PartNumber}
Which does populate the drop down successfully.
I then want to put some of the returned values, @Name (for example), into a
TextBox control. To do this I wrote a Rule on the DropDown control which sets
the TextBox VendorName to @Name. The xpath I'm using is:
xdXDocument:GetDOM("ItemDropDown_WithExtraData")/dfs:myFields/dfs:dataFields/d:AccountID/@Name
I can scroll the DropDown and select different items from the list, but I
always get the returned values for the first row in the shape/dataset
returned.
What am I missing??
Thanks very much for the help.
Carl