Hi, I am new to Thunkable and am exploring Lists and List views, however, I am stuck and would appreciate help on the below scenario. This is what I am trying to achieve :
I have a ListView- Symptoms with the items - S1, S2, S3, S4, S5
When the user clicks on an item I want to store the item in a separate list - " Selected Symptoms"
However, before I add to this list I want to check if the item exists in the list and add ONLY if it does not exits, if it exists then it should get removed from the Selected Symptoms list.
Here is the logic I am following however this does not seem to work and I am seeing the items added multiple times and they are not getting deleted
Start with removing the blocks and checking back in. When you use that if “variable selectedSymptoms” is already designated as a list (which I’m assuming it is) you essentially have a list that is 1 item in a larger list (remember an array can be made of arrays) your blocks make a resulting array like this…
You all are amazing!!! I did not even think about the list within the list
I removed the " List" block and adjusted the elseif to just if and it works perfectly!!! Thank you !!
here is the updated code