If then else Help

I have a problem with an if then else!

I want that when i click button1 if my label 6 is = to the default label i inserted “Latitudine” my app gives an allert that gps is not active or still not ready!

while if label 6 is filled with the value of latitude of GPS runs the go to url web viewer and gives an allert data inserted correctly

but i am not able to reproduce

can work on this way?

on the second condition il labe6.text =/ from Latitude… so means that is filled a number!

How about showing us the blocks that set the value of Label6.Text ? Might then give us a chance of understanding what you are trying to achieve…

here it is:
blocks (6)
Label 6 has default value Latitudine when the gps is not ready…

then when gps is up is filled with coordinate!

This should do it

blocks (8)

Thanks! i’ll do as you suggested:

but this:

image

is only redundat or completly wrong?

It should work, just not as compact.

I come back because i need 2 checks!

i want that call webviewer 2 happens only if 2 cases are satisfied!

that label7.text =/ from QCxxxxxx and that Label1.text =/ from Latitudine!
if both are =/ from that values run call webviewer 2 go tu url Otherwise gives allerts!

i tryed this:

Use the “and” logic block and test your two conditions there in the first “if”

Something like this?

If I understand you correctly:

You wanted to test for both conditions to be true, so why are you using the “or” ?

Use the “and” for your “if” statement and just use the “else”, you do not need the “else if”

because if label7 is QCXXXXX means that the user has not used qrcode scanner! so he recieve the allert
or if label1 = latitudine means that the gps is not enabled so recieve allert

while if values are both =/ to that values ( i use AND here) is all ok and can go to that url!

So you need both conditions to be true in order to proceed…

yes i need that both are verified! or i have only to recieve an allert

You might want to review Programming Your App to Make Decisions