How to parse a list and retrieve items the contain a specific property?

Yes, this is exactly the problem and therefore I suggested that you either use two synched list or list of objects to make it consistent.

I think I have solved it using the ‘get substring’ block as shown above. Thanks for all your help! :slight_smile:

2 Likes

@tatiang @muneer

Sorry, whilst testing I have run into another problem. When the user clicks a subject on the timetable, a list of assignments are indeed shown. However, it will show all assignments, not just the ones associated with that subject. I am not sure what the problem is as the code below contains a condition to return true if the ‘selected subject’ variable is contained within j (the assignment). Why would it be returning true if it is not contained in the assignment?

1 Like

The way to debug a loop is to display a key value in a label and use a wait block to slow things down. So you might do something like set debug label's text to j and then wait 1 second. That way, you can watch the loop iterate and see what values are coming up. If 1 second is too short or too long, you can adjust (using integer or decimal values).

If you do that, are the values for j what you expect them to be?

A different way to do the same thing is to convert app variable assignments to text. You can convert it by using the make text from list block and then assign that to a label. Is that value what you expect it to be?

1 Like