Variable Enum List

Hi,

I’m trying to build an EnumList whose values changing on depending of the current row. The situation is the next one: I have two tables (the column names are in catalan): CIRQUIT_QULTURALS and DADES_CIRQUIT_QULTURALS. The mentioned EnumList is the “ENTREGUES” column (from CIRQUIT_QULTURALS table), whose base type is ref, referenced to DADES_CIRQUIT_QULTURALS, whose keys and labels are the values of “NOM” column. Each row of CIRQUIT_QULTURALS table has a zone attributed: Centre, Oest or Est (in another referenced table). What I need is that the EnumList just display the values of “NOM” column (from DADES_CIRQUIT_QULTURALS) only if the ZONA of the current row (attribute of CIRQUIT_QULTURALS each row) is one of the values of “ZONES” column (from DADES_CIRQUIT_QULTURALS).

For this images, and to be the most clearly I can, the EnumList should be the next: for the rows (of CIRQUIT_QULTURALS table) whose attributed zone would be “Centre”, the EnumList values should be only “Pack Màgic” and “Hola”. For the rows whose attributed zone would be “Oest”, the EnumList values should be only “Canòdrom” and “Hola”. And for last, the rows whose attributed zone would be “Est”, the EnumList values should be only “Canòdrom” and “Hola”.

I tried to include a FILTER(), SELECT() formula in Valid If field in the “ENTREGUES” EnumList column, but what I only reached is to display or not the EnumList (the dropdown list) entirely. But not changing the inner values of the EnumList.

Hope you can help me and very grateful in advance.

You would apply an expression in the the “Valid_If” property of your “Entregues” column. the expression would be:

SELECT(DADES_CIRQUIT_QULTURALS[Nom], IN([_THISROW].[Zone], [Zones]))

The expression chooses the names of each row where the Zone value from the CIRQUIT_QULTURALS table in included in the list of values in the DADES_CIRQUIT_QULTURALS table. NOTE: [Zones] must be defined as a list or the expression uses a function to create a list such as a SPLIT() function.

I hope this helps!

2 Likes

Thank you very much. It works. What I did not well is SPLIT() the [ZONES] column. Thank you!

1 Like