hi every one
its my first app so I’m grateful for any kind of help
i have a database containing 4 columns name, last name, school, phone number
what i trying to create is a phone book like this
there are 3 entry and a button if you put part of name or etc.in one or more entry and click on search button it show list of cases that contain said characters in format (last name, name, phone number) and by clicking on right one it take you to call screen with number already typed
i tried making it but struggling with if logic to make it ignore empty entry and how to connect 3 entry to filter part so it consider all 3 not just each on its own
thank toy for your time and consideration
this is what i have so far, obviously its not working
This is a good first attempt and I can certainly see what you are trying to do. Here are a few general recommendations.
I would recommend using app variables instead of stored variables.
As you are using blocks, I would encourage learning what the block does and what it returns. The way to do that is to set a label to a block to see what it gives you. For example, you have a “get value” purple data source block. I would encourage you to connect that with a label to see exactly what the block does. And if you look at the docs for information on the block, you will see that “row id” will be a number, not what column you are searching for.
Debugging and figuring out what is wrong is a skill that is painful to develop. It goes into what I said earlier, but if you come into a situation where it isn’t working as you expected, I would recommend going through each block and asking yourself if you know what the block does. This does not mean not to ask questions here, but rather to try to place blocks with intention.
Lastly, for now, I would recommend trying to make one thing work at a time. Instead of creating three searches, I would start with one and try to make that work first. Then use that one to create the others.
For your project specifically, I would do that following:
Create a button, list, and text input
When you click a button, use this block to set the list. Instead of column 1, it should be your name column. Test to make sure it works
Then add blocks such that when you type in a text input, the list is only set if the text input’s text = “name”.
Start out with this and see if you can get this working. Once it does, try to expand to include the other columns. It won’t get you to exactly what you want most likely, but it should give you the fundamentals to hopefully figure out how the blocks work and the logic to start to put it together