Value from Lookup Table concatenation

I have a question value called "somethingID" that is auto incrementing, then I used the multiple choice lookup table to retrieve one of the value of "somethingID" in another case list, then after choosing one of them, I want to concenate it with another value but instead of having the correct "somethingID" I tried to retrieve , I have a strange number looking like this c758aza25-5r88-8ee8-58i8arr5878. For exemple i do concat( "X" , "-" , "somethingID"), instead of having, X-2, I have instead X-c758aza25-5r88-8ee8-58i8arr5878. I don't have a good english, I hope it is understundable.

I am guessing that you are retrieving the case_id with the Value lookup of your multiple choice lookup table.

I think you have two options:
1 - use the same field for the Label and the Value of your lookup table question
2 - use a lookup into the casedb to retrieve somethingID from the case_id you chose in the lookup table

IE: Instead of
#form/multiple_choice_question

you would reference
instance('casedb')/casedb/case[@case_id=#form/multiple_choice_question]/somethingID

2 Likes

Thanks for your reply, I have some difficult doing it, I want to show you a printscreen but it seems it doesnt work, that would be clearer like that I think

It just worked , wow, thanks a lot, I didn't read well your answer

1 Like