hi i am trying to identify in a list inserting text using textbox for get if the word is inside or not in list but i get the error foreach ( text insert in the box is not argument). where is my error?
textoaanimacion.aia (2.4 KB)
hi i am trying to identify in a list inserting text using textbox for get if the word is inside or not in list but i get the error foreach ( text insert in the box is not argument). where is my error?
textoaanimacion.aia (2.4 KB)
is this what you want? you have a table of words , as a list, eg. ["apple","boy","cat","dog"]
if user enters "boy" and presses button, the app display "word boy is item 2"
if the user enters "cat" and presses button, the app displays "word cat is item 3"
if the user enters "goat" and presses button, the app displays "word goat is not found".
then you need to name your variables properly to avoid confusion. you can rename lista to word1. you don't need a for-each loop because there is already a block in lists category that tests if a word in found in a list
you can load list2 with your list of words.
here's the adjusted version:
textoaanimacion2.aia (2.6 KB)
there are other improvements you can add later - for example is "Olive" the same as "olive"?, you can also investigate how to use a parameter inside your procedure, but you can learn those as you go.
my intention is get if the word is inside in the list text. if not get negative answer
You can't iterate over a piece of text. Iterate over a list created by splitting the text. You're defining lista1 to be text, not a list.
so its only the error replacing for split the block piece?. because i am trying to identify a word if its there from a list text of textbox. where is my error in the code?
add a split at spaces block to this definition (you might also want to trim it, and remove any non-alphabetical characters):
:"my intention is get if the word is inside in the list text." - you can't have a list and a text at the same time. here is the difference
"hi" is found in this text "who is this" - it's found in position 9 of the text
"hi" is NOT found in this list ["who","is","this"] - the word "hi" is not there.
however, "is" is found in the list, it's at index 2 - in other words, it's the 2nd item in the list.
please give an example of your environment - ie. variables and contents.
is there a text file to scan? is there a list to look up?
give us an example what conditions would result in a positive (what would display) and another for a negative (and what would display).
i am trying to compare text if exist or no but dont work i dont know why
textoaanimacion(1).aia (2.5 KB)
i changed your program:
here is my result (if found)
here's my result (if NOT found)
here's the program
textoaanimacion2a.aia (2.8 KB)
so in your program you can find if the word inside of the text list comparing with the word that you write in the second text box? i am right?
no need use to compare text between item from list and the second text box, using a for control for iterate and compare every split word from the list evaluating if is the same no?
We don't seem to be getting anywhere. Show an example of the text you want to convert to a list, and a ward you want to search for
there is no need to use the 'for each' block - the 'in list? thing/list' block is a search function.
why don't you import the aia and run it and determine if that's what you want. if you want something else, describe your input/s and expected output