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.
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:
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. 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.
I tried many ways ,only num - only text it doesn't work
The funny thing is that I have it in other app as it is working fine there
What about trying:
[quote="Sakis_Hammer1, post:22, topic:136319"]
only num - only text it doesn't work
[/quote] of course it does.
You did not do this:
If there is a 10 in each label this should work since the comparison is true.
How about invisible characters that arrived from the web, that are breaking the comparison, like \r, \n, \t ?
Try asking for length(text) on both sides to flush them out.
Something is not right in that string that not visible. I have no problem comparing texts got from my server page.
TIMAI2, That worked fine. It converts all to numbers But if I have version 10.1 it converts it to 101. So only stable versions ,
Thank all for helping
simply you have to plan ahead middle versions. So if the version is 10, then you have to have version number 10.00. that way if you have a new version of 10.10, or 10.01 you just have to extract the numbers and all good. 1010 or 1001 compared to 1000.
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.