Dereferencing question. I have a column with...

Dereferencing question.

I have a column with type Ref. Right now it shows a dropdown of all the rows in the refโ€™ed table, since I donโ€™t have a column on the form that has the same value as the key on the refโ€™ed table. (Donโ€™t ask).

I do want to narrow down the rows shown, however. Kind of like showing the user a slice of the refโ€™ed table, where only those rows are displayed where a certain column matches a value Iโ€™ll specify (actually the value in a column on the form).

Can I specify this as an expression on the Ref-type column definition itself?

I have a feeling I should know this but itโ€™s getting late and Iโ€™m getting punchyโ€ฆ

Thanks!

0 5 646
5 REPLIES 5

You can filter the list with a SELECT(TableName[KeyColumnName],[ColumnName]=โ€œDesiredValueโ€)

@Aleksi_Alkio thanks you! that worked great as far as showing the right list of rows goes. The next step: how does a user select a specific row? The idea is that once the user is presented with a list of matching rows they would select the right one, and I would then pull the values of a couple of columns from that row to add to the form.

@Aleksi_Alkio it also turns out that I can only add SELECT to a virtual column. Ideally I would like to filter the values shown to the user on the actual column on the form so they can pick oneโ€ฆ

Baby steps! I defined a slice for the table to look up and hard coded a value in the Row condition. I then refโ€™ed to that slice and the right thing happened: I only see the right rows from that table in my form, and can select the right one. Yay! So now - how do I specify a condition in the slice that uses a value in the form table?

Something like this. Passes the expression verify, but of course it doesnโ€™t work, probably because Iโ€™m not using this correctly. HMC Log is the form table that has a Member Number column (the slice also has a column named that, for maximum confusion)

[Member Number]=MAXROW(โ€˜HMC Logโ€™,_rownumber).[Member Number]

โ€ฆ found this demo and app, may be what I need:

youtube.com - Dropdowns - AppSheet Office Hours Excerpt Dropdowns - AppSheet Office Hours Excerpt

Top Labels in this Space