Intitial Value

I am adding additional condition to an equation.  Working with two tables [Job Type] and [Service]

Here is the current formula:

IFS(COUNT(INTERSECT([Service], LIST("used oil-not assigned" , "used filters" , "used antifreeze", "NH/HW Routine" ))) >0, "Routine",

ISNOTBLANK([Service]) , "Project")

I need to add if the [Service]="used oil-assigned" is selected, the [Job Type] column will default "used oil".

All other conditions remain the same.

I tried adding:  jobs[Service]=List([Service],LIST("used oil-assigned"),"used oil", at the front end; however, "project" is still defaulted.

Any suggestions?

Solved Solved
0 12 166
1 ACCEPTED SOLUTION

AppSheet is very quirky about when it is case-sensetive and when it is not.  In the IFS() change "used oil" to "Used Oil".

View solution in original post

12 REPLIES 12


@VLMark37 wrote:

Working with two tables [Job Type] and [Service]


Did you mean columns?   Tables doesn't really make sense.

Additionally, based on the INTERSECT usage of [Service], I assume in is a list type column - maybe EnumList?

For this last item it seems you just need to check if "used oil-assigned" is one of the selected items in the [Service] column  For this you can use the IN() function.  So, the complete expression would be:

IFS(
COUNT(INTERSECT([Service], LIST("used oil-not assigned" , "used filters" , "used antifreeze", "NH/HW Routine" ))) >0, "Routine",

ISNOTBLANK([Service]) , "Project"),

IN("used oil-assigned", [Service]), "used oil"
)

You may need to swap the ISNOTBLANK() and IN() functions depending on which should take precedence.

 

 

Ugh!  Yes, the Table is Jobs.  The initial value is for Job Type column dependent on the Service Column input.

I tried the formula and received this error message:

Initial Value Screen Shot.jpg

It seems there is a parenthesis omitted just before the ">0" part.

I did that.  With the 3rd parenthesis I got this error:

Initial Value Screen Shot3.jpg

Ah!  Remove the parenthesis AFTER the ISNOTBLANK([Service]), "Project",.  I didn't removed it when I copied your expression.

The formula has no errors; however, it still does not default to "used oil" job status when "Used Oil -Assigned" is selected.  I tried all three orders of priority.

Initial Value Screen Shot2.jpg

Was this a new row you were adding or an existing row you were editing?

This would be for a new row added.

 

AppSheet is very quirky about when it is case-sensetive and when it is not.  In the IFS() change "used oil" to "Used Oil".

Well, that did it!  Thanks for the help!

Steve
Platinum 4
Platinum 4

@WillowMobileSys wrote:

AppSheet is very quirky about when it is case-sensetive and when it is not. 


In my experience, the FIND() function is the only place in AppSheet that upper- and lowercase matter; everywhere else, upper- and lowercase are equivalent.


@Steve wrote:

In my experience, the FIND() function is the only place in AppSheet that upper- and lowercase matter; everywhere else, upper- and lowercase are equivalent.


Apparently, assignment (and I assume matching - is FIND() used under the covers?) of Enum values is also case sensitive.   I tested this in my own test app yesterday.  

 

Top Labels in this Space