Hello everyone,
I have a Survey123 form that is set-up to collect 'main' features as points, with a repeat to collect sub-features as a table - a parent-child relationship between the two.
The sub-features are all assigned a select_one value of 'High', 'Medium', 'Low', or 'None'.
I have a field in the parent feature section called 'Highest value present' - and was hoping there was a way to calculate/auto-populate this based on the 'Rating' values captured in multiple child sub-features, with a rule that High takes priority over Medium, over Low, over None.
For example, if a feature has three sub-features with ratings of Low, Medium, Low - I'm after it pulling the Medium value across.
I tried a basic if statement in the calculation field of the xlsform along these lines, hoping that the order would dictate the hierarchy:
if(${Rating}='High','High',if(${Rating}='Medium','Medium',if(${Rating}='Low','Low','None')))
But the calculated field in the parent layer defaults to the last repeat's value entered.
Is there any way to achieve this? Ultimately looking to keep the detail of the sub-features for reports etc., whilst assigning the highest value to the parent points for quick and easy mapping.
Thanks!