A
aturner
Hi all,
I'm having a problem with matching/filtering the correct data from a
secondary data source. I've already read and tried several remedies from
this forum; several were helpful in other ways, but none have solved this
particular problem. Any assistance would be greatly appreciated. I don't
think it's very complicated, but the explanation may be!
I have an order form with a repeating table, where the user selects a
Product from a drop-down list. I want other fields, such as the product's
Price, to be automatically populated with the correct info associated with
the selected Product. I have used a repeating table so that the user can add
multiple products as needed.
Rather than setting the Price field solely with rules, I have created an XML
file (based on an InfoPath form) to be used as a secondary data source, so
that when prices change, I only have to update them in one place, rather than
in multiple field rules. This secondary file also contains a repeating
table, with one row per product.
Main Form:
Row 1:
-Product1 (drop-down - set to look up values from the Product2 field in
the secondary data source, which works correctly)
-Price1 (text field - value is a formula that gets the price from the
secondary data source, filtered by whether the main form and secondary data
source Product fields match: Price2[Product1 = Product2])
On the first row in the main form, when a Product is selected, the Price
field sets correctly for the selected Product. However, when a subsequent
rows are inserted, the Price fields in the additional rows default to that of
the preceding row's Product, before a Product is selected. Once a Product is
selected on the second row, the Price only updates to match the correct
Product if the selected Product appears in the drop-down list above the
Product selected for the previous row. For example, if the Product drop-down
choices are Product A, B, C:
Row 1
-Product B
-Price B (updates automatically)
Row 2
-Product A
-Price A (defaults to Price B from above, but updates to the correct Price
A after Product A is selected)
Row 3
-Product C
-Price A (defaults to Price A from above and does not update to the correct
Price C, apparently since Product C is listed below Product A in the
drop-down list)
I have tried using rules, filters, and rules with filters, on the Product
and Price fields, all to no avail. I also tried setting the Price field to a
listbox as seen in examples for how to populate a Cascading List, but was
unable to get it to filter and display only the Price (it contained all field
entries from the associated row) -- and a text field is preferable anyway,
since there will only be one line of text and no need to select from a list.
Any ideas on why this is happening and how to fix it? Since I'm not a
programmer, I'd prefer to avoid altering or creating code directly, but could
try that with an example to follow.
Any help will be greatly appreciated!
I'm having a problem with matching/filtering the correct data from a
secondary data source. I've already read and tried several remedies from
this forum; several were helpful in other ways, but none have solved this
particular problem. Any assistance would be greatly appreciated. I don't
think it's very complicated, but the explanation may be!
I have an order form with a repeating table, where the user selects a
Product from a drop-down list. I want other fields, such as the product's
Price, to be automatically populated with the correct info associated with
the selected Product. I have used a repeating table so that the user can add
multiple products as needed.
Rather than setting the Price field solely with rules, I have created an XML
file (based on an InfoPath form) to be used as a secondary data source, so
that when prices change, I only have to update them in one place, rather than
in multiple field rules. This secondary file also contains a repeating
table, with one row per product.
Main Form:
Row 1:
-Product1 (drop-down - set to look up values from the Product2 field in
the secondary data source, which works correctly)
-Price1 (text field - value is a formula that gets the price from the
secondary data source, filtered by whether the main form and secondary data
source Product fields match: Price2[Product1 = Product2])
On the first row in the main form, when a Product is selected, the Price
field sets correctly for the selected Product. However, when a subsequent
rows are inserted, the Price fields in the additional rows default to that of
the preceding row's Product, before a Product is selected. Once a Product is
selected on the second row, the Price only updates to match the correct
Product if the selected Product appears in the drop-down list above the
Product selected for the previous row. For example, if the Product drop-down
choices are Product A, B, C:
Row 1
-Product B
-Price B (updates automatically)
Row 2
-Product A
-Price A (defaults to Price B from above, but updates to the correct Price
A after Product A is selected)
Row 3
-Product C
-Price A (defaults to Price A from above and does not update to the correct
Price C, apparently since Product C is listed below Product A in the
drop-down list)
I have tried using rules, filters, and rules with filters, on the Product
and Price fields, all to no avail. I also tried setting the Price field to a
listbox as seen in examples for how to populate a Cascading List, but was
unable to get it to filter and display only the Price (it contained all field
entries from the associated row) -- and a text field is preferable anyway,
since there will only be one line of text and no need to select from a list.
Any ideas on why this is happening and how to fix it? Since I'm not a
programmer, I'd prefer to avoid altering or creating code directly, but could
try that with an example to follow.
Any help will be greatly appreciated!