Problem from equal logic


To check if the app needs update..... I m loading a number in a label1(10) of the app's version from a google doc, to appears in the screen and I have a stable number label2 (10) from version in the app . If the web label = with the stable lable (10=10) then do this.
But the equal logic always is false. I tried numbers , strings , math equal but always is false. 10=10 is false. Do you have in mind what is the problem ?

Instead of a Logic = use a blue Math = :thinking:

image

image

:question:

Check when your label values are set...


Hours.... stuck here 10 = 10 false

Try adding the trim block (in the text drawer) before responseContent ?

Try not using labels but variables.

Nothing
I also try install the apk , if there is a problem with companion but nothing
I get the number from web but it is not equal with the stable label .
How is that happend? do it result 10 and do it result 10 why is = false

:thinking:

Interesting that when you set the label with a text block number you do not see any quotes?

image

image

no quotes

Try @SteveJG 's approach (multiply by 1) which should make the values of both labels numbers...

It is not working. I get result num 8 but I have error


The operation * cannot accept the arguments: , [ 8], [1]
Note: You will not see another error reported for 5 seconds.

Trim it before setting the variable, instead of only in the label.

I did it but is not working.
It is not a number

Now multiply it by 1, and the other "number".

Could the numbers that look like 10 actually be floating point numbers just a tiny distance from 10 in value, enough that they get rounded for display but unequal enough that they are unequal mathematically?

Where do these values come from?

Another suggestion if all else fails, split the string, get the number/numbers in the string, concat them then convert to a number:

image

1 Like

Sorry I think the problem is not the number but the equal
If I wanted to have version 10 = version 10 why not logical ?

I get the info from google doc

You have to compare eggs with eggs.

yes text with text

If you don't mention 'version' in the Labels the problem solved. :slightly_smiling_face: as I showed earlier. The user knows these are version numbers. It is 'dangerous' to use a Label as a value; use global variables instead but if you have to use them as values only input numbers into them.