Dropdown columns

Rui
New Member

Hi there,

suppose i have a dropdown column and the user may have to select more than one references. Is it possible?

Thanks,
Rui

Solved Solved
0 8 432
1 ACCEPTED SOLUTION

Itโ€™s possible yes, but if youโ€™re wanting the ability to use the Ref column and allow people to select multiple options, itโ€™s not a natively supported behavior by AppSheet; but thatโ€™s not to say you canโ€™t make it work.

Best thing about AppSheet is the fact that you can do any one thing 3,000 different ways.

If you want to select multiple references, AND have those records show up in the inline view like they would if you had used a Ref column, you need to get a little fancy with formulas and virtual columns.


Thereโ€™s two elements to this setup:

  1. the selection dropdown, and
  2. the virtual column that holds list of related records .

The Dropdown

To setup the dropdown, use the column type โ€œEnumlistโ€ and set itโ€™s basetype to Ref.
2X_b_bba10adf01eda35914225f3f28de509950955012.png
After you save, another field will be visible that allows you to select which table the ref should point to:
2X_8_810135f999176359f8ca2010e5e23d424a4d68bd.png

The Virtual Column

Once this is setup, itโ€™s time to build the virtual column; youโ€™ll need to construct a formula to pull in the related records that correspond to what was just selected in the dropdown:

FILTER(โ€œTableโ€, in([Key], [_thisrow].[Dropdown_Column]))

You can read more about FILTER() here:

View solution in original post

8 REPLIES 8

Itโ€™s possible yes, but if youโ€™re wanting the ability to use the Ref column and allow people to select multiple options, itโ€™s not a natively supported behavior by AppSheet; but thatโ€™s not to say you canโ€™t make it work.

Best thing about AppSheet is the fact that you can do any one thing 3,000 different ways.

If you want to select multiple references, AND have those records show up in the inline view like they would if you had used a Ref column, you need to get a little fancy with formulas and virtual columns.


Thereโ€™s two elements to this setup:

  1. the selection dropdown, and
  2. the virtual column that holds list of related records .

The Dropdown

To setup the dropdown, use the column type โ€œEnumlistโ€ and set itโ€™s basetype to Ref.
2X_b_bba10adf01eda35914225f3f28de509950955012.png
After you save, another field will be visible that allows you to select which table the ref should point to:
2X_8_810135f999176359f8ca2010e5e23d424a4d68bd.png

The Virtual Column

Once this is setup, itโ€™s time to build the virtual column; youโ€™ll need to construct a formula to pull in the related records that correspond to what was just selected in the dropdown:

FILTER(โ€œTableโ€, in([Key], [_thisrow].[Dropdown_Column]))

You can read more about FILTER() here:

Hello, when I select the โ€œBase Typeโ€ to โ€œrefโ€ the โ€œBase Type Detailsโ€ box does not come up. Can I no longer make use of the solution above?

Have you saved the change to the column of the enum type yet? If you donโ€™t save it, the place where you select the table that the reference is from doesnโ€™t appear.

Hello, I was able to get the โ€œBase Type Detailsโ€ box to show up and was able to successfully select the right table. Thank you for that.

However, there is another issue. When I click on the dropdown, I can only a limited amount of the refs. Even if I try to search in the dropdown, it does not find all the right refs. Is there a way to fix this?

Do you have anything inside the Valid If space?

If you have a select() style formula there, that will restrict the options available in the ref dropdown; if you leave the valid-if formula blank, then all the records of the selected table will be shown.

No I do not. The table that this dropdown is linked to has many rows. Is there a limit on how many refs are loaded for the dropdown?

Nope

Are you sure every row has a non-blank and unique key column value?

Yes, I just double checked.

Top Labels in this Space