Form Choice Filtering

I thought i understood choice filtering, but have run into a frustrating wall.

Tables…
General Rates (row id, name)
PAX Types (row id, name) - there are only three of these (Private, 1 person, 2+ people)
Price Rates (general_rate_id, pax_type_id, price)
Pay Rates (irrelevant to this except for that price rates is not the only collection on the page)

In the detail page for a given General Rate row, the collection of Price Rates (source: relation column in General Rates table) lists the Price Rates that belong to the General Rate.

As an action at the top of the Price Rate collection, i have a button to open a form screen for Price Rates.

General Rate ID is added as a special value, price is a number entry and then a choice component lists the possible PAX Types. Here is the issue.

I want the choice component to only show the options that do not already exist in the Price Rates that belong the general rate. I have tried a "Row Id (of pax types) is not found in “Screen->Pax Type ID” but this doesn’t do anything. I am not sure if it is referring to all PAX type IDs found in the onscreen collection list, the top row, or what.

Twice now i have put that filter on and it worked exactly as i wanted, but then if i close the form and re-open it doesnt show correctly. If i undo then re-add the filter it still doesnt. I assume this is not a glide error but a me thing, but i truly cannot figure it out.

Ive tried many different computed column to bring information into different places but i just cannot get it to work.

How to go about it? Beyond this specific question, what is the screen referring to in this moment?

The Form…

The Table…

1 Like

So to summarize your problem:

  • You want a form in Glide Apps to let you pick a PAX Type, but only show options that haven’t already been used for the current General Rate.
  • You tried using a filter so the choice list hides PAX Types already linked to that General Rate, but it doesn’t always work.
  • Sometimes the filter works at first, but if you close and reopen the form, it stops working.

Can you show us how you configure the filter part for the choice component?

I want a form that lets me pick a PAX Type, but only show options that haven’t already been used for the current PRICE RATE (which belongs to a general rate).

This photo is on a detail page for the general rate named (Rate 2 - placeholder names while i build).

On the screen behind the slide in, there are the Price and Pay Rates that belong to it. Currently, there are 2 existing price rates (1 for private, and one for 1 person - the difference being they didnt request private, we just couldnt fill the extra spots). There are only 3 possible pax types (Private, 1 and 2+).

The filter shown is row id (of the Pax type choice) is not included in Screen > Pax Type ID. It is showing Private and 2+ as options, but if i click on “2+” it shows Private and 1. If i leave an return to the form, all three options show.

My understanding was the “screen” referenced the data BEHIND the slide-in menu. This “Screen” appears to be the row that would be created by the form selections. I have tried as many different ways of bringing the data into the PAX Types, General Rates, and Price Rates tables (arrays of selections, arrays of unselected PAX Types, joined lists) and none of them seem to filter correctly.

It seems to stem from a misunderstanding of what SCREEN> is referring to here.

The source for my choice component is the PAX Types table.

I guess i could also source it from a relation from the General Rates table. That would mean pulling in all price rates to the general rates table, looking up what PAX Types are used, bringing in all the PAX Type options, using a remove element column and then relating the remaining PAX type ids to the PAX Type table and using that relation column as the source. This seems way more complicated than it feels like it should be though.

This newest version of this app I have normalized the data to 3NF, and it has solved alot of issues but i am struggling with the amount of relations and how it all fits on the front end now.