Morning…
Please advise if it is possible to switch a column type between Enum & Enum List based on a condition.
UseCase:
If a surveyor surveys one set of asset type the assets need to be Enum and for another set of asset types the assets need to be EnumList.
Something like…?
IFS(
IN([select_asset_type],
LIST("Cabinet", "Distribution Board", "FOSE", "HPR", "LPR")),
[asset_name] = Enum,
IN([select_asset_type],
LIST("CAT6A", "Fibre", "Jumper", "Power")),
[asset_name] = EnumList
)
Thanks…
Solved! Go to Solution.
Even in current setup you may wish to try following that is a bit less elegant as it involves another, so to say “checker” column. You could have another column called say [EnumlistOREnum] with a valid_if expression , something like below
IFS(
IN([select_asset_type],
LIST("Cabinet", "Distribution Board", "FOSE", "HPR", "LPR")),
COUNT([asset_name])<=1
IN([select_asset_type],
LIST("CAT6A", "Fibre", "Jumper", "Power")),
COUNT([asset_name])>=0
)
Please have [asset_name] as enumlist type column.
So, the instead of valid_if of the [asset_name] column whether it is filled with with one value ( enum behavior) or multiple values ( enumlist behavior) by the user will be checked by the [EnumlistOREnum] valid_if expression mentioned above. You could have a suitable error message in [EnumlistOREnum] column’ svalid_if error message setting,
If the enumlist could be populated in the [asset_name] column itself, the extra checker column was unnecessary as valid_if expression could have been entered in the [asset_name] column’s valid_if itself.
User | Count |
---|---|
19 | |
10 | |
7 | |
5 | |
5 |