Hi team. I had a workaround for this but since the March Field Maps update, my workaround stopped working. Now i need another one.
Here's the scenario - You enable tasks, you make a few Layouts, and they follow a sequential order to follow the field workflow from Unassigned to Assigned to Completed (I usually skip In Progress but that is not important right now). Each Layout has conditional visibility driven by the esritask_status field and a few "Edit Field" buttons for common actions. Some buttons are Automatic, Some are Manual and Automatic but all have one thing in common - they have a calculated expression for the esritask_status field that takes them to the "next Layout" (ie Unassigned goes to Assigned, Assigned goes to Completed, etc).
Thats great - HOWEVER, there is always going to be outlier situations where an Edit Field button is not going to cover what needs to be entered, and so in the Assigned Layout we also have an "Edit" button that opens the trusty old form they've all been using for years. One of the fields in the form is esritask_status which has a calculated expression of simply 3 to tell the form that when it submits, consider this job "Completed" and take it to the next layout
This has never worked. If you have a calculated expression in the form then you are stuck with it in your Edit Field buttons as well and if they conflict in any scenario you get stuck in the spinning wheel of nothing happening. No matter - we have a workaround! We just need to make an overly complex expression in the form like this that does not conflict with anything going on in the buttons:
var edittype = $editcontext.editType
if (edittype == "INSERT") {return 0}
else {
var thisstatus = $originalFeature.esritask_status
var nextstatus =
decode(thisstatus,
0,1,
1,3,
3,1,
1
)
return nextstatus
}(in case you were wondering what line 9 is all about, we have "undo" buttons in our Completed Layouts so folks can go back and change what they entered)
And that fine workaround was working fine until 12:30 Tuesday 3rd March NZDT when suddenly 26.1.0 was released, everyone's Field Maps auto-updated, and my phone blew up with angry Field Workers.
So after a bit of testing (on Android and iOS, 25.3.1 and 26.1.0, online and offline) i discovered that the issue everyone was getting was that the correct Layout was taking about a minute to load in 26.1.0 (as opposed to instantly in 25.3.1). (Weird that it was taking the same amount of time offline as online if it's just an issue with a calculated expression but no time to get hung up on that now).
Anway, i need a new workaround. This is all i have for the moment which is less than ideal.

Righto, lets solve this. Tasks is awesome but we still need to have a way to have a calculated expressions in Edit Field buttons and calculated expressions in Forms in the same map.
@JeffShaner happy to jump on a call to step through this with you - its a doozy. I'm totally open Friday 6th your time (Saturday here)
Cheers!