Drop-down menu

HELLO
in a table called service I have a drop-down menu that takes data from another table ref. (TEST)
how can I not see the services I have already added?
THANK YOU

Solved Solved
1 10 529
  • UX
1 ACCEPTED SOLUTION

Steve
Platinum 4
Platinum 4

Iโ€™m going to guess what you mean is that you want the drop-down menu to only display entries from the referenced table that havenโ€™t already been referenced in the same column of other rows of this table.

In the Valid_If for the column:

FILTER("ThatTable", TRUE)
- SELECT(
 ThisTable[ThisColumn],
 ([KeyColumn] <> [_THISROW].[KeyColumn])
)

where ThatTable is the name of the referenced table, ThisTable and ThisColumn are the names of the table and column you want the drop-down menu in, and KeyColumn is the name of the key column for ThisTable

  1. FILTER(...) gets a list of all key column values from ThatTable.

  2. SELECT(...) gets a list of existing values in the ThisColumn column of ThisTable thatโ€ฆ

  3. ([KeyColumn] <> [_THISROW].[KeyColumn]) excludes the current rowโ€™s reference to ThatTable. If we donโ€™t do this, the column value will be considered invalid if you edit the row again in the future.

  4. FILTER(...) - SELECT(...) removes all of the references that occur in ThisTable (the โ€œusedโ€ references) from the list of all possible references, leaving only those that are unused.

See also: FILTER(), SELECT()

View solution in original post

10 REPLIES 10

Do you have a Valid_If formula that filter the listโ€ฆ or do you have slice or security filter?

Sorry, but I did not understand
The drop-down menu takes the values from another table with the REF function

@francesco_cannone
What @Aleksi wants to say is, there are a couple of ways to filter a REF dropdown content.

1.) Using a Slice: You can create a slice and slightly change your REF_ROWS expression in the [Related โ€ฆ] column to read the values from this slice,

2.) Using a Security Filter: You can set a Security Filter for you ref table which will filter away the rows that you donโ€™t want to display

3.) Using a Valid_if Expression: You can use a Valid_if expression in your REF column, to filter away ref rows i.e. SELECT(ParentTableName[Key],{Y/N condition})

Hope itโ€™s clear now.

1X_584317bc14e5d54b90cbf7d004618e5a1ac6eb09.png

I think the number 3 option is the best
I would like to do something like this in the picture

@francesco_cannone
Is your ref table a READ_ONLY table? Because there is no +New link on top of your dropdown to add a new ref record. Not a bid deal but just asking.

yes exactly is read only!

Steve
Platinum 4
Platinum 4

Iโ€™m going to guess what you mean is that you want the drop-down menu to only display entries from the referenced table that havenโ€™t already been referenced in the same column of other rows of this table.

In the Valid_If for the column:

FILTER("ThatTable", TRUE)
- SELECT(
 ThisTable[ThisColumn],
 ([KeyColumn] <> [_THISROW].[KeyColumn])
)

where ThatTable is the name of the referenced table, ThisTable and ThisColumn are the names of the table and column you want the drop-down menu in, and KeyColumn is the name of the key column for ThisTable

  1. FILTER(...) gets a list of all key column values from ThatTable.

  2. SELECT(...) gets a list of existing values in the ThisColumn column of ThisTable thatโ€ฆ

  3. ([KeyColumn] <> [_THISROW].[KeyColumn]) excludes the current rowโ€™s reference to ThatTable. If we donโ€™t do this, the column value will be considered invalid if you edit the row again in the future.

  4. FILTER(...) - SELECT(...) removes all of the references that occur in ThisTable (the โ€œusedโ€ references) from the list of all possible references, leaving only those that are unused.

See also: FILTER(), SELECT()

Thank you
It works perfectly !!!

@francesco_cannone
SELECT(ParentTable[Key],NOT(IN([ThisTableRefColumn],ParentTable[Key])))

I am a newbie with no experience and I was wondering what the easiest way to create a drop down within a selection in the app would?
I have done what is is said in the tutorial but I must have missed something.

Top Labels in this Space