Hi! How can I create an searching function in an app?
Searching what?
I’m creating a periodic table and have a menu for each element. And I want to create a function where you can search for the elements
And I’ve done the elements in functions like this:
board={
{"H",1,w5,h80,w10,h88,Hydrogen,5,1.0079,"Hydrogen",-259,-253,0.0899,2.1,1766},--kg/m
{"He",2,w90,h80,w95,h88,Helium,3,4.0026,"Helium","Never solidifies at standard pressure",-269,0.178,"-",1895},
{"Li",3,w5,h72,w10,h80,Lithium,1,6.941,"Lithium",180.54,1342,0.534,1.0,1817}
}
Something like this.
function searchElements(searchTarget)
for i,element in ipairs(board) do
for _,v in ipairs(element) do
if string.find(tostring(v), searchTarget) then return element end
end
end
end
How can I get up the keyboard and search for the element?
Search the forum for examples using function keyboard
Try reading the Reference link at top, it has stuff on the keyboard
If you have a periodic table as a menu that shows all the elements, why do you need to search for the elements.
I guess the periodic table might only show the abbreviated names
@pontus712 Add another button to your table that takes you to a screen that lists the element in alphabetical order and shows their abbreviation.