One common use case when working with multiple repeatable question groups is when you want a SKU in one group to pull a value, such as quantity, from a specific matching row in another repeatable group. This configuration allows you to tie product selections directly to user-defined attributes or inputs.
How to Reference a Specific Row from Another Group
To pull a value (e.g., quantity) from a matching row in another repeatable group, the assignment rule must include a comparison that matches a field in both groups. This ensures the value is only pulled when the context aligns—such as matching sites or environments.
Example Scenario
Let’s assume the following:
- In Question Group 1, the user defines a list of sites with quantities for each.
Question_group_1
Site_List | Quantity |
---|---|
Site 1 | 5 |
Site 2 | 3 |
- In Question Group 2, the user selects products, and you want a SKU to pull its quantity from the matching site defined in Question Group 1.
Question_group_2
Site_List | SKU |
---|---|
Site 1 | Product ABC |
In this case, the assignment rule for Product ABC in Question Group 2 would be:
Question_group_2.SKU] = pItem.sku] AND mQuestion_group_2.Site_List] = tQuestion_group_1.Site_List]
This ensures that Product ABC will only receive a quantity value from the row in Question Group 1 where the site matches.
Final Outcome
With this logic in place, the quantity of Product ABC in Question Group 2 will automatically reflect the value defined in the matching row of Question Group 1. For example, if the user selected Site A with a quantity of 5, and then selects Product ABC for Site A in the second group, the product will be assigned a quantity of 5.
This approach ensures precision when linking inputs across groups and supports scalable product logic for complex quoting environments.