Filtering available options in selection column

In my equipment form I have dependant drop downs that you first choose the object type and then the class, there is also a field called fleet that I want to filter it down on based on an earlier y/n question if the equipment is fleet

I did this previously: on the data validity EquipClass[Object Type] and EquipClass[Class] on the data table

but how do I also make it filter on the fleet column based on the previous answer in the form?

Solved Solved
0 4 425
1 ACCEPTED SOLUTION

To the best of my recollection, the pattern for dependent dropdown Valid If expressions is:

SELECT(
  MyTable[ColumnA],
  TRUE,
  TRUE
)
SELECT(
  MyTable[ColumnB],
  ([_THISROW].[ColumnA] = [ColumnA]),
  TRUE
)
SELECT(
  MyTable[ColumnC],
  AND(
    ([_THISROW].[ColumnB] = [ColumnB]),
    ([_THISROW].[ColumnA] = [ColumnA])
  ),
  TRUE
)
SELECT(
  MyTable[ColumnD],
  AND(
    ([_THISROW].[ColumnC] = [ColumnC]),
    ([_THISROW].[ColumnB] = [ColumnB]),
    ([_THISROW].[ColumnA] = [ColumnA])
  ),
  TRUE
)

and so on.

View solution in original post

4 REPLIES 4

I can get the first dropdown to work with:

SELECT(
    EquipClass[Object Type],
        ([fleet] = [_THISROW].[Fleet])
)

but then the dependent dropdown is no longer dependent

so I guess I need another select that filters on both Fleet and Object Type
working on figuring it out…

To the best of my recollection, the pattern for dependent dropdown Valid If expressions is:

SELECT(
  MyTable[ColumnA],
  TRUE,
  TRUE
)
SELECT(
  MyTable[ColumnB],
  ([_THISROW].[ColumnA] = [ColumnA]),
  TRUE
)
SELECT(
  MyTable[ColumnC],
  AND(
    ([_THISROW].[ColumnB] = [ColumnB]),
    ([_THISROW].[ColumnA] = [ColumnA])
  ),
  TRUE
)
SELECT(
  MyTable[ColumnD],
  AND(
    ([_THISROW].[ColumnC] = [ColumnC]),
    ([_THISROW].[ColumnB] = [ColumnB]),
    ([_THISROW].[ColumnA] = [ColumnA])
  ),
  TRUE
)

and so on.

Since the output is already filtered by the Fleet in the first drop down I didn’t need the AND
This made it work. I may add it as you have shown if that makes any difference.

Select (
EquipClass[Class],
( [Object Type] = [_THISROW].[AssetType] ),
True
)

Steve
Platinum 4
Platinum 4

Please note that spreadsheet filters may/will affect AppSheet’s ability to see your data. I would advise against using spreadsheet filters in a worksheet used by an app.

Top Labels in this Space