If contain text available on the list

Can anyone help me with the logic that I’m trying to.
I’m trying to detect an item on the list that contains text from a string or textbox…
Screenshot_2020-07-24 Kodular Creator
This is the sample list
Screenshot_2020-07-24 Kodular Creator(1)
This is what the area im stuck on… when the “Orange Juice” detect that the list contains words similar from the string or a textbox…
Any help is very appreciated… Thank you in advance!

  1. You don’t need the blue ‘=’ block and the boolean block.

  2. Try not to keep identical variable names (The name of list and and the variable name in for loop are almost similar), because for a big project you will find it hard to debug if any problem occurs

  3. What you exactly want to do? Your list contains ‘Orange’ but why you are checking for ‘Orange juice’?

These :point_down: blocks are working fine for me

1 Like

It’s a part of the app feature (Game App) which if user type "Orange juice/ Orange Bag/ Tshirt Orange, it must return a result if the given text are available in the list that contain word from the textbox.
The Sample keyword is “Orange”, even it has additonal like Orange Juice e.t.c the result must recognize that the words contains in one of the items in the list,

I will try this… Thank you so much, ii get back here if this is the solution

1 Like

My above blocks do the same. Hope it works for you :slightly_smiling_face:

1 Like

:smiley: not working
Screenshot_2020-07-24 Kodular Creator

I type “Orange Juice” not working, it won’t detect the “Orange” in the list… Ill send the sample aia
AlphaBrain.aia (33.2 KB)

Try interchanging the item and textbox text block

Ofc it is not working, because the last item in not contained in orange juice.
You should do this
If…then set label5.text to `join label 5.text, get item
Delete the else part.

1 Like

Why? :thinking:
His blocks are correct.
For example if input is Orange Juice then the loop will run like this:

1.Orange Juice (contains) Red >>> false
2.Orange Juice (contains) Blue >>> false
and so on until it reaches to 6th item.
6.Orange Juice (contains) Orange >>> true

P.S. ohh…you are not breaking loop @consoleheretohelp
Thank you @WatermelonIce

1 Like

Because the loop at last will turn to not working. He directly set label to not working rather than keeping the previous result.
As you said, the block of if else is right, but after reaches the boolean (true), it won’t break out of the loop. It will just continue till the end of the list.

Try this.

Sorry for the late reply. I got busy in some chores.

@WatermelonIce No need to remove else part. These blocks :point_down: should do the task :slightly_smiling_face:

blocks (72)


This will work too, however only the first one containing orange will show up.

Thanks guys… Im at home now and starting to get rest, i will mark a solution tomorrow after testing… Thank u for trying to help me.

Got it hahaha

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.