How Do a simple Search value in a list?

Please, can some help me searching in list a value?

I try it, but no work for me…
ListWiew1 = List of values
Text_Box1 = Value to search

What do you get as result?

Note that, the way you set it up, Label1 will repeatedly be replaced with FOUND and NO FOUND for EACH and EVERY element of ListView1. At the end of the loop, you will only see the result of the last check, the one with ListView1(lenght of list). So if you have 10 elements, Label1 will flash FOUND and NO FOUND probably faster that the screen can refresh (so you will see nothing at all), before showing the result of the test using ListView(10).

1 Like


I want to show in label1 if the item is or is not in the list

  • I write in the textbox the value I want to look in the list.

If the item is in the list, then put in label1 “found”
If the item is not in the list, then put in label1 “not found”

but not work the label1… no change text label1 with this blocks

What you need is to NOT do anything special while it is not fund, and as soon as there is match, then you break out of the loop (using the ‘break’ tile).
So basically, you can enter the loop with a special value that is set to ‘not found’, and will be changed to ‘found’ only when there is a mach. Breaking out of the loop ensures that you do not needlessly keep checking when there is no point. If the loop is exhausted the the special indicator is still set to whatever you represent a “not found” status (it could be a logical set to ‘false’ and set to ‘true’ only when there is a match) then you put whatever logic is needed to make the result display.

What is your recommend block configuration? Please !

Slist.aia (2.0 KB)

Something like that (unwrapped from the button code)


Hi Mr.

Not work, in this example i just have a list of 1 to 6… and when input others numbers ( different ) show FOUND

Edit: I think, it may be because 654 contains 3 numbers that are in the list.
but in reality the user refers to the closed figure “654”
(six hundred fifty-four)


If you want a complete match, then you should not use “contains text”, but check for a match (" = ") instead.

1 Like

Yes, it is de Solution… im working in this…