Help with visibility

Hello people, I’m a novice on app creation and I was looking for some help on the app that I am building for my business

I have a very large wine cellar with more than 500 types of wine and I wanted to create an app where customers can look up the price of each item by searching either its name or barcode number

I’ve created a data table with a few entries that include Article name, barcode number, image, and price. I then created a new screen with the data and now each article is neatly listed where people can see its information

Here is my problem: I want to make it so when you open this data screen, no articles are displayed by default. The only way to find an article price is to search for it in a unique manner (i.e. an article only shows up if you completely type its barcode number)

Can someone please help me with this? I’ve been playing around with it for weeks and can’t figure it out

Ideally you would have a separate table with a single row. In that table add a user specific text column. That table will be the source of your tab. On the tab screen, add a text entry component, which will serve as your search. In the wines table add a single value column that retrieves the value from the user specific column in your single row table. Now you can add IF columns in the wines table that compare that single value to other columns. For example…If value is included in barcode then return true, or If value is included in wine name then return true. Add a collection to your tab and filter it to only show rows where the if column is checked (true) and the single value column is not empty.

2 Likes

Hi Jeff,

Thank you for your answer. I’ve completed those steps up until the IF columns - I’m a little lost and I was wondering if there is some kind of tutorial on it

If you can show some screenshots showing where you are stuck, we should be able to help you out.

Hi Jeff,

Thanks again for your reply. Here are the steps I am following based on what you suggested:

creating a separate table with a single row with a user specific text column:

adding a text entry component:

Adding a single value column in the wines table that retrieves the value from the user specific column:

Here lies my confusion, you mentioned to add if values and your example is if value is included, then return true, which is what I am doing below:

(1) should I create the same IF values as above for every column in my wine table?
(2) is the above screenshot correctly formatted. i.e. should it actually say “included” and “true” or do I need to complete anything else
(3) once all the IF columns are completed, how does the text entry component turn into a search bar?

Thank you for your answers

I don’t know if you have fixed this, but the entry should point to “New Column” instead of “Name”.

image

This is incorrect. The right conditions should be:

If “single value” is empty then don’t return anything, make sure this is the first condition
If “single value” is included in Article then true
else if “single value” is included in Barcode then true

Do that for all columns that you want people to be able to search.

Then on the screen, add a collection pointing to the Wines table, filter by that If > Then > Else column “is checked”.

2 Likes

I deleted the previous columns in my wines table so I can replace them with IF columns but when I enter my conditions, these squares appear and I cant enter my actual data. Was I supposed to create new columns for them or just make an entirely separate column for conditions?

The “squares” indicate that the column will return a boolean value, which is what you want.
But you’re not configuring that correctly.
The idea is that the if-then-else column will return true (checked) for any row that matches the bar code that’s been entered.

Now presumably the single value column - if you have that setup correctly - should be showing the entered bar code in every row. (If it doesn’t, please show me a screen shot of how you configured it, so we can help you fix it).

So what we want to do is compare that to the actual bar code value in each row and figure out if any of them match. And the that’s the purpose of the if-then-else column.

In plain english, the logic for that should be:

  • If the single value column is empty, that means the user hasn’t entered anything, so return false/empty
  • If the single value matches the actual bar code, then return true/checked

So in your if-then-else column, you need two CASES:

  • The first one will be: IF single value column IS EMPTY, THEN nothing (leave that part empty)
  • And the second one will be: IF single value column IS Barcode Column (use the three dots to select that), THEN true

Give that a try, and let us know how you get on.

1 Like

Hi Darren,

Thank you for your reply. So I should have all of my data normally in the table, and then, create a separate column to add the two cases that you listed. Correct?

Yes, those two cases should be in the if-then-else column - the one that’s shown in your last screenshot.

These are the conditions I set based on what was suggested:

Now, when I go back to my layout, when I enter text in the search bar that we created, nothing comes up. Is it as simple as adding a text entry component and redirecting it to the single row table? Or is there more to it

For reference,

I’m doing Create new screen → Custom screen → Add component → Text entry component → Source of component: Single row table

‘Is empty’ in the same box is what you want… change ‘is’ to ‘is empty’ by using the drop down arrow.

The way you have it now you are checking if your single value matches the word empty

And your second condition… you may want to change ‘is’ to ‘is included in’ using the same drop down arrow.

‘Is’ will only return an exact match

‘Is included in’ will return partial matches

2 Likes