Preventing InfoPath from showing same value in each row (repeating table)
-
09-10-2020 - |
Pergunta
I have a repeating table showing data from an external list. It is connected with further (hidden) columns in the list but the form only shows a few (3) columns from the (around) 8. First column is a drop down list and when I select an item it shows me the same value in each row even if selecting 3 different items. It seems the system pulls only one row data per group.
Can you please advise a formula or rule to be used?
Reference: How to display a complete SharePoint list row in InfoPath form
Solução
You have to add rule on dropdown control. When dropdown item changed, Rule will fire and set it to related hours and Price textbox.
Add action: Set field's value, Add hours textbox and set value with following steps. Same process for Price textbox.
- Click on Fx button
- Click on Insert Field or Group..
- Select secondary data source (Your list) from above dropdown
- Select Hours field
- Click on Filter button
- Set condition like Item(Secondary data source) = Item(Main source Dropdown)
- Save it
Outras dicas
In Rules, use current() function so that is compared to the current row's field. Example:
current()/../my:FieldNameForCompare