How can I do this?

howto

#1

Hi, I want to do this…EX. If I get the value, check the value is equal to CAT or DOG or BIRD or HUMAN or LIZARD…

But, the OR COMPONENT is no taking TEXT STRINGS so what should it do?


#2


#3

Is this okay?


#4

What happens if you test it?


#5

I didn’t have any test result


#6

What happens if you use Do It?

I see you use json. What if you use this extension. Especially made to decode json. Maybe that is easier.


#7

Json is not the problem here. Json is working properly but the json result and text string function with or component is the confusing part.


#8

I can use it like this but its too large…I have 8 text strings to compare with the help of OR component so I think this may increase app crash problem.


#9

Would this be better then?

image


#10

Will initialize global work in this situation ?


#11

Dont know exactly what you mean but you can fill the global with the result from you look up in pairs block.


#12

i didn’t see you set your global country beside the initial set, so where did you know the the global country are mumbai, new delhi, etc?


#13


#14

But i am thinking about a problem… Set global country & global city is in the same function level so if the net connection is slow or something , the global country and city will be empty…


#15

you need to check the internet speed?


#16

what about doing a right click onto the OR block, then select External Inputs to get this
Unbenannt

alternatively what about using the is in list block, which is the better solution to compare more than a few values… http://appinventor.mit.edu/explore/ai2/support/blocks/lists.html#inlist

Taifun


Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by Taifun.


#17

Is that okay??

Capture%20is%20that%20ok


#18

what about trying it yourself to find out, if it is working?
see also tip 2 here https://puravidaapps.com/learn.php

Taifun


#19

yea…i should and i will…btw thanks for ur nice solution tips…