Return list of labels to Enumlist column from ref based

I have almost read all threads about this issue and having a brain cramp now. I am trying to get a enumlist. I have a simple "projects" table with two columns, "projectid" and "projectname". I want to pull "projectname" (labels) to my staff's table "responsibilities" column. Each staff can have multiple projects. Also, I should be able to add new "projectnames" directly from staff table. A wise hand is appreciated much.

Solved Solved
0 7 269
2 ACCEPTED SOLUTIONS

Try the following:

  • [responsibilities] as EnumList with base type Ref to Projects
    • Set projects[projectid] in Suggested Values (not Valid-if)
  • [projectname] is set to label of projects table?

This way, when a user enters [projectnames], he/she should also get an option to press "New" which will open a data entry Form to Projects.

View solution in original post

Animation2.gif

FYI (please ignore names, they are gibberish...)โ€ƒ

View solution in original post

7 REPLIES 7

Try the following:

  • [responsibilities] as EnumList with base type Ref to Projects
    • Set projects[projectid] in Suggested Values (not Valid-if)
  • [projectname] is set to label of projects table?

This way, when a user enters [projectnames], he/she should also get an option to press "New" which will open a data entry Form to Projects.

Animation2.gif

FYI (please ignore names, they are gibberish...)โ€ƒ

I realized that my projects table was settled up with read-only. Thank you for your response TeeSee.

Aurelien
Google Developer Expert
Google Developer Expert

Hi @Atlas 

"Return list of labels to Enumlist column from ref based"

Type: EnumList

Base Type: Ref

Source table : your source table.

Allow other values: ticked

And the magic trick below !!!!

VALID_IF expression: 

YourSourceTable[keyColumnName]

Here in image:

Aurelien_0-1663303997071.png

Aurelien_2-1663304184967.png

Aurelien_3-1663304216431.png

Make sure that the correct column is tagged with LABEL Property in the source table ๐Ÿ™‚

 

" I want to pull "projectname" (labels) to my staff's table "responsibilities" column."

If you select the correct LABEL property, the users will see it, so if the purpose is to use only the information at working on the app, you don't need it.

If you need it for, let's say, an email or a PDF file: you could use this expression (not tested with an EnumList though):

[projectid][projectname]

 

"Also, I should be able to add new "projectnames" directly from staff table. "

As far as i know, this is not possible with a combination of EnumList+Ref. You can only do it with a column of type Ref.

Aurelien
Google Developer Expert
Google Developer Expert

Thank you @TeeSee1 ! 

Because of a previous bad experience, I never use the Suggested_Value, you just gave me a nice use of it !

@Aurelien 

I am curious if there are any watch outs for Suggested Values.

I use it a lot and have not come across any so far.

@TeeSee1 I honestly don't remember what was my issue, it was 2 years ago I think ๐Ÿ˜‚

I was probably not enough experienced at this time to manipulate it correctly !

I think my issue was that I got a "Ref" issue with the entry created from there. I just gave it a try, and that does not happen, so...I will consider it a very good tip ! Thank you again !

Top Labels in this Space