The expression doesn't work

Hi! Why is the result of the expression incorrect?

it because textbox 1 is a single-digit integer [0] and you are comparing it to 4 digits [2000-3000]

to make it work you must change you min and max by 0 - 9

What you want to ask elaborate first clearly if you asking about this expression then it will always print No

Thanks! Can you tell me which option should be used to comply with the execution of four-digit numbers?

what are u trying to achieve anyway?

I want to get the dependence of the size of the door leaf on the size of the doorway. For example, if the height of a doorway is between 2150 mm and 2200 mm, then the Label text should show " Height 2100 mm"

@Vasily I think you want to do like this. If textbox text which starts from 2000 and ends with 3000, then label text to yes, else No.
Am I right?

Yes. The Label text will be different, but the logic is exactly the same

See this example I made for you. Blocks are of another builder.

I hope it works.

1 Like

Label text is “false”. You can provide an example file *.aia?

1 Like

See this, I hope it works.
When button click, if textbox text Starts with 2 and length of text = 4, then Set label text to Yes, else Not.

This is for 2000 to 2999.

Where to get these elements?![blocks - 2020-12-29T052650.562|689x165]

1 Like

Leave this. :point_up_2::point_up_2:
& Use this. :point_down::point_down:

I mean what the text boxes First and Last represent. Are these hidden text boxes?

That’s how it turned out

are you comparing text or numbers?
because the text comparison might provide wrong results for numbers in case they do not have the same length… for example 500 would be greater than 2000 …
also if both values are equal, the result of your blocks is “no”… ist this what you want?


I agree. It would be better to make a comparison in numbers, but I can’t do it. Now I will think about how to make a condition for the number of characters in the text. At the moment, I still see this option. if you are ready to help, I will be very grateful.

if these are your values

then you can use the split block and split at empty string to get a list of 2 items, the number 2150 and the mm, for the comparison just use the first item using the select list item block


Here is the solution. TextBox (2,3,4) , in addition to text box 1, hidden