How to search & compare 2 (or more) rows with data in different tables

Yes, now your picture looks correct but I cannot get how to implement it.
I created an if-then-else column in table 2 which does not contain column Subname.

I followed your original example:

Here is a link to the app I created it in, you can make a copy…

There are some extra tables, but just ignore those - this is just an app I muck around with to test things with. Your stuff is in Table 1 and Table 2

Yes, this was my mistake. I figured it out.
Thank you so much! This is really what I wanted to achieve.

BTW, if there are thousands rows in table 1… is there a search option in choice picker?

1 Like

Yes. If you use a choice picker in standard (non-segmented) mode, then you’ll get a search box.

I cannot see it.

That’s because you only have 3 choices.
Add more and it will appear.

1 Like

Hello,
Now when I have thousands of rows I have a problem with search.
The app is here: pills-app.net
I open a second tab where there is just a list of items and put Nurofen. As supposed I get results.

Then I open a third tab and in the first active choice box I put the same text Nurofen, I get just one row, not plenty of them as in the previous step. I expect to get the same results as both elements (a list of items in the database and active choice) have the same source database.

How many rows do you have in total?

In that list 17k

Can you show the settings for your choice component? I may be wrong, but I think the choice component will eliminate duplicates, because there is no use in showing the same choice multiple times. Most importantly, I’m curious what your Value and Display As settings are for the choice component. Do you have the Value set to column that’s the same for all Nurofren rows, so it’s only picking the first one to show?

Yes, I have

hmm, so I assume the Main_component column is the second column you are showing in your screenshot? If my theory is correct, then that would mean that you should at least see two values in your list of choices, since what I see are two unique Main_component values. But it’s only a guess and doesn’t seem to match what you are experiencing. Is it true that the second column you are showing of your data is the Main_component column? I can’t tell, since you didn’t include the headers.
Are you sure you don’t have some sort of filter on your choice component? Are you limiting the number of items visible in the choice component?

If you believe that everything is set up correctly…based on what I’m seeing, I would expect the list in the choice component to be smaller, but only because glide may be trying to eliminate items that may be duplicates base on the column you selected for your ‘Value’ setting. Another thought is that the large number of rows are causing some bugs to surface.

As an alternative, you could consider creating your own kind of choices screen. This would require you to first have a new sheet with a single row that will act as your tab. You will need a template column that can be filled with the word ‘key’. Create a similar template in your pills table. Then create a single relation in your pills table that links the key template to the key template in the new table. Your tab will use the new table. Now instead of a choice components, you could have two buttons. The action for each button would be ‘Show New Screen’. On each screen, you would add an inline list. The action on the inline list would be to Set Column and write that Main_Component value through the single relation in the pill table to a user specific column in your new table. So basically we would get rid of the choice components and create your own with Buttons, New Screens, Inline Lists, and Actions. I think it would work very similar and actually might work better if the choices are reacting the way I think they are and eliminating duplicate values.

2 Likes

Yes, it is true. I’ve shown it on the screen, but the forum engine cut the preview, just click on the picture to open it in full size and you will see headers.

There is no filtering or limitation in the choice component.

It would be strange but in any case this guess seems to be incorrect as even in this example there are 2 different values that must be displayed while only one is. I also have examples where no data is displayed.

This seems to be true.

I would try to think of what you supposed next but how glide can fix what I described above?

At this point, I think you would have to submit a support request to Glide.

https://glide-help.zendesk.com/hc/en-us/requests/new

1 Like

Could you please get more details on this.

  1. I created a new table with a template column.

  2. I created 2 rows in existed table (template + relation)

I’m confused about where to put 2 values from pills list to compare.

And after all, even if I put main_component values to the new table, how it correlates with the solution described by Darren_Murphy above?

@Jeff_Hager Could you please clarify that?

Anyone else thoughts?

I’ll come back around to this. When questions require deeper thought from me, I need to find time to sit down, fire up my computer and give it my full attention. I have a day job and personal life that demands my attention sometimes. I’ll get back to this in a day or two.

2 Likes

Sure, take your time. Just wanted to make sure it’s not forgotten. Thank you for your help.

1 Like

@Jeff_Hager I’ve figured it out finally. It’s a mix of what you suggested and some explanations in this topic Calculation/Relation with previous (list) data in inline list? Global var?

What was done in DB:

  1. Separate table with 1 row. Columns: Text(could be also template as you wrote)=“key”, User specific1="", User specific2=""

  2. Pills table. New columns: Template=“key”, Relation=Template.key in separate table.key

  3. Interactions table. New columns: Single value choice=Separate table.userspecific1, Single value choice=Separate table.userspecific2, IsInteract (IfThenElse column as Darren_Murphy described above but based on new sv columns).

What was done in UI:

  1. 2 buttons in new tab each writing main_component trough the relation column to its own column in the separate table
  2. Inline list with source of interactions table and with filter by IsInteract positive value.

Thanks again for your help.

2 Likes