If I select a value from an enum list in one field, can it prefill another field with the value from the enum list set up for that field? If so, where do I do this and what is the formula I use?
Example:
Fitting Type - can select (2ft fluro batten, 4ft fluro batten, downlight, tropher)
Lamp Type - can select (LED, Fluro, Circular Fluro, halogen)
If I select โ2ft Fluro battenโ in Fitting Type I want it to fill in the Lamp Type column with โFluroโ
@A_Pay77
You can use the below expression in the Initial Value of [Lamp Type] column
IFS(
[Fitting Type]="2ft Fluro Batten","Fluro"
)
OR
SWITCH(
[Fitting Type],
"2ft Fluro Batten", "Fluro",
"4ft Fluro Batten", "Circular Fluro",
"Downlight", "Halogen",
"Tropher", "LED",
""
)
My formula is:
IFS([Fitting Type]=โ2ft Fluro Single Batten,2ft Fluro Dbl Batten,2ft Fluro Triple Batten,2ft Fluro Quad Batten,2ft Fluro Single Trph,2ft Fluro Dble Trph,2ft Fluro Triple Trph,2ft Fluro Quad Trph,4ft Fluro Single Batten,4ft Fluro Dbl Batten,4ft Fluro Triple Batten,4ft Fluro Quad Batten,4ft Fluro Single Trph,4ft Fluro Dble Trph,4ft Fluro Triple Trph,4ft Fluro Quad Trph,5ft Fluroโ,โFluro Tube,LED Tubeโ)
It comes up with this:
The expression is valid but its result type โTextโ is not one of the expected types: List. Not sure what this means. Both Fluro Tube and LED Tube are in the Enum List for Lamp Type.
@A_Pay77
Enumlist type column produces a list type content, not a text. You need to change the expression like this:
IFS(
CONTAINS([Fitting Type],
{2ft Fluro Single Batten, 2ft Fluro Dbl Batten, 2ft Fluro Triple Batten, 2ft Fluro Quad Batten, 2ft Fluro Single Trph, 2ft Fluro Dble Trph, 2ft Fluro Triple Trph, 2ft Fluro Quad Trph, 4ft Fluro Single Batten, 4ft Fluro Dbl Batten, 4ft Fluro Triple Batten, 4ft Fluro Quad Batten, 4ft Fluro Single Trph, 4ft Fluro Dble Trph, 4ft Fluro Triple Trph, 4ft Fluro Quad Trph, 5ft Fluro}
{Fluro Tube, LED Tube}
)
User | Count |
---|---|
42 | |
34 | |
26 | |
23 | |
15 |