I am working on an App for a car detailing company and I’m trying to create an initial value expression to set a Price type column [AMOUNT] based on the value of an Enum List type column [DETAIL]. The desired behavior is:
- If the value of [DETAIL] is “Exterior” set initial value of [AMOUNT] to 100.00
- If the value of [DETAIL] is “Interior” set initial value of [AMOUNT] to 80.00
- If the value of [DETAIL] is “Exterior , Interior” set initial value of [AMOUNT] to 180.00
- If the value or [DETAIL] is blank, then initial value of [AMOUNT] is blank or zero
I thought I could achieve this through an IF() expression, but I am getting the message Cannot compare List with Text in ([DETAIL] = “INTERIOR”). I believe the issue is because [DETAIL] is an Enum List column type, but I can’t seem to figure out a workaround.
My current expression is:
IF(
[DETAIL] = “EXTERIOR”, “100.00”, “”,
[DETAIL] = “INTERIOR”, “80.00”, “”,
[DETAIL] = “INTERIOR , GLASS”, “180.00”, “”
)