Enumlist from a ref column

Belinda
Participant IV

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?

1 15 9,842
15 REPLIES 15

Belinda
Participant IV

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.

@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

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.

๊ณ ๋ง™์Šต๋‹ˆ๋‹ค.
๊ณ ๋ฏผํ•˜๊ณ  ์žˆ๋˜ ๋ถ€๋ถ„์ด ํ•ด๊ฒฐ๋˜์—ˆ์Šต๋‹ˆ๋‹ค.

์ €์˜ ๋ฌธ์ œ์™€ ํ•ด๊ฒฐ๋ฒ•
๋ฌธ์ œ :
๋‹ค๋ฅธ ํ…Œ์ด๋ธ”์„ ๊ฐ™์ด ์ฐธ์กฐํ•˜๋Š” ๋‘๊ฐœ์˜ ์ปฌ๋Ÿผ์ด ์žˆ์Œ
๊ฐ ์ปฌ๋Ÿผ์—์„œ ํ•˜๋‚˜๋Š” ํ•˜๋‚˜์˜ ๊ฐ’๋งŒ์„ ์„ ํƒํ•˜๊ณ 
๋‘๋ฒˆ์งธ ์ปฌ๋Ÿผ์€ ์—ฌ๋Ÿฌ๊ฐœ์˜ ๊ฐ’์„ ์„ ํƒํ•ฉ๋‹ˆ๋‹ค.
๊ทธ๋ž˜์„œ ์ฒซ๋ฒˆ์งธ ์ปฌ๋Ÿผ์€ Type์„ Ref๋กœ ์„ค์ •ํ•˜๊ณ  Source table์„ ์›ํ•˜๋Š” ํ…Œ์ด๋ธ”๋กœ ์„ค์ •ํ•˜์—ฌ ํ•ด๊ฒฐํ–ˆ์Šต๋‹ˆ๋‹ค.
์ผ๋ฐ˜์ ์ด ๋ฐฉ๋ฒ•์ด์ฃ 
๋‘๋ฒˆ์งธ๊ฐ€ ๋ฌธ์ œ์˜€์Šต๋‹ˆ๋‹ค.
Ref๋กœ๋Š” ์—ฌ๋Ÿฌ๊ฐœ๋ฅผ ์„ค์ •ํ• ์ˆ˜ ์—†์—ˆ์Šต๋‹ˆ๋‹ค.
๊ทธ๋ž˜์„œ
Type : Enumlist
Base type : Ref
Referenced table name : ์ฐธ์กฐํ•  ํ…Œ์ด๋ธ”
๋กœ ์„ค์ •ํ•˜๋‹ˆ ๊ฐ’์ด ๋ณด์ง€ ์•Š์•˜์Šต๋‹ˆ๋‹ค.
๊ทธ๋ž˜์„œ ์ž๋ฃŒ๋ฅผ ์ฐพ์•„๋ณด๋‹ˆ ์œ„์™€ ๊ฐ™์€ ๋ฐฉ๋ฒ•์€ ๋‹ค๋ฅธ๋ฐฉ๋ฒ•์ด๋ผ๊ณ  ํ•˜๋„ค์š”.

๊ทธ๋ฆฌ์„œ ์œ„ ๊ธ€์—์„œ ์„ค๋ช…ํ•˜๋Š”๊ฒƒ๊ณผ ๊ฐ™์ด Valid if๋ฅผ ์ด์šฉํ•˜๊ธฐ๋กœ ํ–ˆ์Šต๋‹ˆ๋‹ค.
Type : Enumlist
Base type : Address
Valid if : Table_name[Colume_name]
์œผ๋กœ ์„ค์ •ํ•˜๋‹ˆ ์—ฌ๋Ÿฌ๊ฐœ๋ฅผ ์„ ํƒํ•˜๊ณ  ๊ฐ’๋„ ๋ณผ ์ˆ˜ ์žˆ๊ฒŒ ๋˜์—ˆ์Šต๋‹ˆ๋‹ค.

๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค.
Thank youโ€ฆ

Cubaine
Participant IV

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?

That all sounds good, but I have no idea what to do 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.

I just confirmed that the above is true. You can set the โ€˜base typeโ€™ under the EnumList column to โ€œRefโ€ but you cannot specify the table until you SAVE the app and then go back into the EnumList column.

I requested before, but not much support gaining on this .

Ratatosk
Participant V

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

Finally someone provided an actual example of what to type in the valid field. This worked for me:

  • Set "type" to EnumList .
  • Click on the pencil next to the column name and then set "Type Details" -> "Base Type" = Ref and "Base type details" -> "Referenced table name" = the reference table name.
  • Then under "Auto Compute" -> "Suggested Values", enter the above formula
    • Filter(โ€œTable Nameโ€, Condition). If you want to get everything, just set Condition to 'true'.
Top Labels in this Space