I want to use the previously answer from tookup table to use on the next question or to display the value. It display the id value in the lookup table.
1st. It put this xpath next question "#form/organization_to_zone/region_address" but display the id for selected value.
2nd. use hidden question and put this in calcuation
”instance('region')/region_list/region[@id = #form/organization_to_zone/region_address]/name”
However, there is another error stating that
“Calculation Error: Error in calculation for /data/organization_to_zone/selected_regster1 XPath nodeset has more than one node”
Is there anyone who faced this type of problem and solve it. I appreciate your support
Thank you so much for your guideline. I applied not in repeat group and also my lookup table doesn’t have duplicate data however I can’t get the name value from lookup table.
when I use "#form/organization_to_zone/region_address" it retrieve Id from lookup table. Is there and xpath code to retreive the name other than I used.
this will return the saved value not the pretty name
if region_address is a lookup table, you will always get the saved value - your lookup table can look different, so the pretty name can be in a different column than “name”.
so if the column that the lookup table saves is under name, you want to get another column for the pretty value. maybe “display text” or whatever your structure looks like.
instance('region')/region_list/region[@id = #form/organization_to_zone/region_address]/display_name or whatever your table looks like.
you can also put a join() around that code to see which values are being pulled back and avoid that error. that error is 100% happening because it is expecting one vaue somewhere, and it is getting more than one. it is either your question (I doubt that) or your lookup table rows that are coming back more than 1.