Field Maps Update Domain Status Loses Attribute Information

522
6
Jump to solution
05-14-2021 12:36 PM
JoshConrad1
New Contributor II

Hello:

I have developed a web map that our field crews are using to track work orders through Field Maps. The web map has a hosted feature service published from ArcMap.

I have the map symbolized by a domain field drop down, along with grouped fields and conditional visibilities based off of the status chosen.

The field crews have been able to successfully fill out the form, however when they change the domain back to the status that has the conditional visibility expression attached to, the attribute information gets completely cleared out.

Please help.

0 Kudos
1 Solution

Accepted Solutions
JoshConrad1
New Contributor II

@AaronPulver 

We are using the form to track work orders based off a status field, and we want a conditional visibility expression to make an associated date field appear based off the status as it progresses, all while making sure that we never lose data along with making the date fields required.

Knowing our workflows, I am going to configure the conditional visibilities on the date fields in a semi-pseudo descending order (very similar to your solution in your first reply):

If we have the following statuses: STATUS 1, STATUS 2, STATUS 3,  then STATUS 1 is the first step of the work. The field crews cannot get to the remaining statuses because those are later in the work order process. So logically, when the field crews are on STATUS 3, there is no way they will need to return to STATUS 1.

STATUS 1 DATE FIELD CONDITIONAL VISIBILITY =

$feature["LAYER_NAME"] == "STATUS 1" | | $feature["LAYER_NAME"] == "STATUS 2" | | $feature["LAYER_NAME"] == "STATUS 3" 

STATUS 2 DATE FIELD CONDITIONAL VISIBILITY =

$feature["LAYER_NAME"] == "STATUS 2" | | $feature["LAYER_NAME"] == "STATUS 3"

STATUS 3 DATE FIELD CONDITIONAL VISIBILITY =

$feature["LAYER_NAME"] == "STATUS 3" 

 

Configuring the conditional visibilities this way allows the date field for STATUS 1 to remain as the work flow progresses throughout the project. Then when the work order gets to STATUS 3, the date of STATUS 1 and 2 will remain.

View solution in original post

0 Kudos
6 Replies
AaronPulver
Esri Regular Contributor

Hi @JoshConrad1 this is intentional behavior. If a field becomes hidden, it's values are cleared. The reason for this is to prevent "invalid" data from being persisted (primarily when creating new features). If you are using some kind of status field, where different sections of the form are visible based on the status field, you'll need to use a more complex Arcade expression like:

$feature.status == "value1" || $feature.status == "value2"

This would show the field/group for either of the two statuses.

Can you describe your data model a bit more? Are the workers updating existing features, adding related records, or creating new features?

0 Kudos
JoshConrad1
New Contributor II

@AaronPulver 

Thank you very much for your quick response.

Our data model consists of crew members updating existing features and creating new ones. No related records. They will create the new point, and the status will be set to scheduled. It will remain scheduled until the work is scheduled to start, then they will update that point to active, and so on throughout the work order until it is complete.

Our form consists of 15 or so fields, and 3 of those fields are generic base data: work order #, location, and work type. Those are required regardless of any status or conditional visibility.

The rest of the form is conditionally visible based on the status field entry (scheduled, active, backfilled, etc.). If the work order is set to scheduled, then the rest of the form is not visible (it is designed to keep it simple for our field crews - only see the fields they need to when they need to). Not only this, but we want certain fields to be required, and without this conditional visibility, they would not be able to complete the form due to the fact that they will not know certain entries (excavation size for example) until the work order is set to active. Additionally, when the crews update the work order to anything but scheduled, they see the rest of the form. Those fields are grouped, and the group has a conditional visibility:

$feature["LAYER_NAME"] != "SCHEDULED"

Everything is working as it should, however my only concern is if our workers decide to change the status back to scheduled (logically, they should never have to do this but I am trying to eliminate all possibilities of error) they will lose all of the important information they filled out during the work order process.

Knowing that it is an intentional behavior, and assuming my conditional visibility expression is correct, then it seems like my plan of attack would to be informing them of the lost data possibility.

Am I understanding this correctly?

Thank you again!

AaronPulver
Esri Regular Contributor

Yes, I think you understand it correctly.

0 Kudos
JoshConrad1
New Contributor II

@AaronPulver 

Is there an expression or functionality that I can build into my form such that once the status is set to anything but "SCHEDULED", the field crews will be unable to change it back to that status?

Thank you again for this insight.

0 Kudos
AaronPulver
Esri Regular Contributor

@JoshConrad1there isn't anything that can do this right now. Potentially this could be accomplished with Attribute rules or Contingent values in the future.

0 Kudos
JoshConrad1
New Contributor II

@AaronPulver 

We are using the form to track work orders based off a status field, and we want a conditional visibility expression to make an associated date field appear based off the status as it progresses, all while making sure that we never lose data along with making the date fields required.

Knowing our workflows, I am going to configure the conditional visibilities on the date fields in a semi-pseudo descending order (very similar to your solution in your first reply):

If we have the following statuses: STATUS 1, STATUS 2, STATUS 3,  then STATUS 1 is the first step of the work. The field crews cannot get to the remaining statuses because those are later in the work order process. So logically, when the field crews are on STATUS 3, there is no way they will need to return to STATUS 1.

STATUS 1 DATE FIELD CONDITIONAL VISIBILITY =

$feature["LAYER_NAME"] == "STATUS 1" | | $feature["LAYER_NAME"] == "STATUS 2" | | $feature["LAYER_NAME"] == "STATUS 3" 

STATUS 2 DATE FIELD CONDITIONAL VISIBILITY =

$feature["LAYER_NAME"] == "STATUS 2" | | $feature["LAYER_NAME"] == "STATUS 3"

STATUS 3 DATE FIELD CONDITIONAL VISIBILITY =

$feature["LAYER_NAME"] == "STATUS 3" 

 

Configuring the conditional visibilities this way allows the date field for STATUS 1 to remain as the work flow progresses throughout the project. Then when the work order gets to STATUS 3, the date of STATUS 1 and 2 will remain.

0 Kudos