Enumlist from a ref column

I would like to be able to choose more than one option from a dropdown list of options. That would be an enumlist.

But the list is a column in a table, and i cant figure out how to reference that column and still be able to add new unique values to the column (as though it were a referenced column. i tried a Valid_if statement, and i can add a new entry, but it doesnt update the original column because its not actually referenced.

Basically, i would like to have a dropdown ref column with the ability to pick more than one value. Can that happen?

I did try using an ENUMLIST and setting the base type to REF, but then there’s nowhere I can find to set the REF value to point it to my list of values, and I get the following notification:

Column Name ‘Base_For_FACTORY REP’ in Schema ‘Test1_Schema’ does not specify a referenced table. Picking a default.

Hi, I just tried this in my app and it seems to work. Specify the table to look for ref values in the Valid_if setting of your ENUMLIST.

3 Likes

Hello @Belinda,

You are talking about one to many references.
I have asked about this recently as well.
Unfortunately the only way to achieve what you want is to use an interim table that has a reference to the table in which you are trying to make the one to many reference and a reference to the table in which you hold the list column that you wish to reference.

To make things more clear let’s say we have only three tables.

Table A - this is the table in which you’d like to reference several items from a list in another table.

Table B - this is an interim table which has a reference to table A (make sure to mark this reference as Ispartof to make it a child table of table A) and also has a reference to table C.

Table C - this is a table which holds a list column which you will reference in table B.

Because you marked the reference from table B to table A as Ispartof, it will now appear as a child table within table A in which you can make as much references to table C as you’d like.

I would advise you to make a slice table of table A to have control over the way your columns are presented in the form view.

Guillemo,
Using your example I created 3 tables. Collection Events ©, Disposal Events (A) and Interim Table (B) I wanted to have collection events associated with a service location and then associate many collection events with a single disposal event. I created a collection event from a location and all is good. When I create a disposal event, the collection event record is removed. Is this the expected result that you got as well?

@Riki_Armstrong It works perfectly.
I was getting crazy to find the solution, this is the best and the more simple!
Thank you very much

2 Likes

Hi, what formula did you enter?

@Riki_Armstrong, can you help with how you were able to do this? I’m struggling to get this right. Thanks.

1 Like

That all sounds good, but I have no idea what to do :slight_smile: Any help would be appreciated.

Enumlist from a ref column should work if the type is set to “Enumlist” and the base type to “Ref”.

When the base type is selected as “Ref”, the option to choose the referenced table doesn’t show up immediately and requires a “Save” first. Then the option to choose the “Referenced Table” shows up perfectly. This might be a bug, an issue, but I have been making it work that way and it has worked for me so that’s not too big of a problem for me.

Pulling values using Valid_if works perfectly, but with one little problem, it doesn’t give a “New” option that can add an entry to the referenced table.

3 Likes

What do I type in the “valid if” statement in the enum column?

I have another table called “ADM-GsuiteUsers” and the ref column in this table is called “Navn”

Sorry, pretty noob here.

Filter(“ADM-GsuiteUsers”, Condition)

Make sure the Navn column is the label column