cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
emfuentes27
Advocate V
Advocate V

Collection strange behavior Value vs Result

I have a gallery with checkboxes in it. I collect the selected values and add them to a collection:

Checkbox

onCheck: Collect(multiStates, ThisItem)
onUncheck: Remove(multiStates, ThisItem)

 Then I have a textbox where I add the collection using Concat:

Default:Concat(Sort(multiStates, Value), Value, ", ")

This is a the issue. Once in a while this fails, because for some strange reason I need to change it to Result instead of Value:

//Using Value
Concat(Sort(multiStates, Value), Value, ", ")
//Using Result
Concat(Sort(multiStates, Result), Result, ", ")

This happens just randomly:

Screenshot 2022-08-19 083251.png

After working just fine for about a month, at this moment is using value, but a few weeks from now for no reason at all (that I know of), without making any changes anywhere, I have to go back and change the Concat function to using Result. Has anyone seen this behavior before? I'm leaning towards to creating a function to check if Result or Value are empty, and then right one, but I'm not sure how to accomplish this.

 

Thanks in advance.

1 ACCEPTED SOLUTION

Accepted Solutions
BCBuizer
Super User
Super User

Hi @emfuentes27 ,

 

Not sure if this is throwing any errors, like "identifier not recognized", but as a workaround you may consider the below:

 

IfError(
    Concat(Sort(multiStates, Value), Value, ", "), 
    Concat(Sort(multiStates, Result), Result, ", ")
)


Did you like my post? Please give it a thumbs up! Did I resolve your issue? Please click Accept as Solution to close the topic and so other members of the community can find solutions more easily.

View solution in original post

4 REPLIES 4
BCBuizer
Super User
Super User

Hi @emfuentes27 ,

 

Have any changes been made to the app or the data source while you are having this issue?



Did you like my post? Please give it a thumbs up! Did I resolve your issue? Please click Accept as Solution to close the topic and so other members of the community can find solutions more easily.
emfuentes27
Advocate V
Advocate V

Thanks @BCBuizer . As I mentioned, no changes has been made. As a matter of fact I just returned to the office today, and I was told by the users of the app that they were unable to use the form. I'm the only one that can make any changes to the code or the data source. This has been happening for about 6 months now, so I just got tired of changing it back and forth between Result/Value.

BCBuizer
Super User
Super User

Hi @emfuentes27 ,

 

Not sure if this is throwing any errors, like "identifier not recognized", but as a workaround you may consider the below:

 

IfError(
    Concat(Sort(multiStates, Value), Value, ", "), 
    Concat(Sort(multiStates, Result), Result, ", ")
)


Did you like my post? Please give it a thumbs up! Did I resolve your issue? Please click Accept as Solution to close the topic and so other members of the community can find solutions more easily.

That should work. I was not aware of IfError. Thanks.

Helpful resources

Top Solution Authors
Top Kudoed Authors
Users online (4,224)