Issue on getting distinct values

Hello,
I have an issue with calculating distinct values in a case property. I get the correct output while testing with join(" ", distinct-values("a a b b c c c")) as mentioned in the manual but when I try with the query below, the function is not working properly.

As you can see on the case detail page, there are 2 34510-60-0217 values in the "all_attendees" case property.

image
This is form page view.

Is there anything that I should do with the calculation?

on paper it looks like it should work

I tried it out with those values and I do see that duplicate value removed. Your screenshot shows the value of all_attendees, which is the input value, but it doesn't show what happens to distinct_attendees - is that also saved to the case? Displayed in a label on the form? I'm wondering if this is a different sort of issue, where all_attendees is inadvertently being referenced instead of the updated value.

Hi all,

Thanks for prompt answers.

I mentioned what is happening with distinct_attendees in the below of image of the previous message. It is working as visible in the form.

I noticed that when we give string value inside " ", the function works well, but if we provide any other case properties such as all_attendees(multichoice value) it can not separate. Should I transform the value to a string value first? What do you thing?

Thanks in advance

That seems worth trying at least, something like this, you mean?

join(" ", distinct-values(join(" ", #form/all_attendees)))

That's what I need!

It works with join(" ", distinct-values(join(" ", all_attendees)))

Thanks for all your support. We have to define the case property as string I guess :slight_smile:

Best