I would like to get the count of a particular object where the alterable value of a equals let's say 1. I know this is perhaps simple, but I can't seem to figure it out.
Printable View
I would like to get the count of a particular object where the alterable value of a equals let's say 1. I know this is perhaps simple, but I can't seem to figure it out.
Drop in the ForEach Object, then do something like this:
Always:
Set counter to 0
Start ForEach loop for SomeObject
On ForEach loop for SomeObject
+ Alterable value A of SomeObject == 1:
Add 1 to counter
Or just use the Select Object extension and do it in a single line...
Is there another more generic way that actually works in iOS?
Spread value and use a fastloop:
Always:
Spread 0 in alterable value B of SomeObject
Always:
Start loop "countA" for number of SomeObject loops
On loop "countA"
+ Alterable value B of SomeObject == loopindex("countA")
+ Alterable value A of SomeObject == 1:
Add 1 to counter
This method requires no extensions. Make sure spread value and start loop actions are in separate events and that the spread value event is before the loop start event.