Enumlist

In my job table, I have an enum with two choices: Routine and Project.

I have a enumlist list with multiple services available.

I want to set up an IF() formula which will auto assign the services as "Routine" or "Project".

Only three of the services are considered "Routine": "Used Oil", "Used Filters", and "Used Antifreeze".

When doing a job entry, more than one of these services can be selected in the enunlist; i.e., "Used Filters" with "Used Antifreeze".

I have tried multiple IF() and IFS() combinations and still have no luck the correct return on a false.

Basically, I am looking for if a service contains "Used Oil", "Used Filters", "Used Antifreeze", the true response will be "routine", a false response will be "project".

I am looking to do this as a initial value and a splice.

Any suggestions?

Thanks!

 

  

 

 

0 6 89
6 REPLIES 6


@VLMark37 wrote:

Basically, I am looking for if a service contains "Used Oil", "Used Filters", "Used Antifreeze", the true response will be "routine", a false response will be "project".


I think you may want to add more details. For example,

1. can the services enumlist contain only "Used Oil" or  "Used Oil" and "Used Antifreeze" , meaning less than three of those three routine services and still the service type should be "routine"

2. Can the services enumlist contain a combination of routine services and some other services in the same selection such as "Used Oil", "Used Filters", "Project Service 1". If so, in such cases what will be the service type?

 

The enumlist can contain more than one service type.  For our dispatch purposes, "routine" services "used oil", "used filters" and "used antifreeze" are picked up by the same group of drivers and is considered "routine".  So when we receive a call in, a combination of the three services can be chosen.  All other services, would not be assigned to this group of drivers and would be labeled as "project" job type completed by another group of drivers.

Thank you for more details. However these have raised some more queries.

But for now, based on understanding so far, if certain group of drivers are only going to select one or more of those three routine services and nothing more from other services, the expression could be as follows

IFS(INTERSECT([Services], LIST("used oil" ,  "used filters"  , "used antifreeze" )) >0,  "routine",

       ISNOTBLANK([Services]) , "project"

       )

 

Here [Services] is assumed to be enulist type of column.

 

Just tried the formula.  This is the error response I am getting:

Cannot compare List with Number in (INTERSECT([Service],LIST("used oil","used filters","used antifreeze")) > 0)

Sorry, please try the following 

IFS(COUNT(INTERSECT([Services], LIST("used oil" ,  "used filters"  , "used antifreeze" ))) >0,  "routine",

       ISNOTBLANK([Services]) , "project"

       )

This worked!  Thanks so Much!

Top Labels in this Space