Select to view content in your preferred language

Warning when combining calculated expressions and editable field logic

275
0
01-22-2026 02:51 PM
ChrisH2
Frequent Contributor

Environment: Field Maps Designer, ArcGIS Enterprise 11.2. Hosted feature layer

 

Smart form where I'm seeking to control logic between the following fields:

USER TYPE field (domain): Possible values are "Employee", "Contractor" or "Volunteer"

USER ORGANISATION field (free text)

 

My requirement:

  • If a user selects USER TYPE = "Employee" then I want to use a calculated expression to force the value of USER ORGANISATION to "My company name 123". In this case USER ORGANISATION field is non-editable and is being filled with a calculated expression. It is visible on the form
  • for all other values of USER TYPE the user has to enter free text into USER ORGANISATION. The variety of contractor and volunteer org's makes it awkward to use contingent values or domains at this stage

 

I've successfully applied this logic in my smart form however I'm receiving a warning against the Editable logic: "Form element has calculated expression. Ensure editing is disabled"

The form behavior and data entry is working as expected, so I was intending to ignore this warning. What's happening though is that in the field maps client I'm seeing a yellow warning triangle over the add point icon.

 

Again, functionality is working as expected but I'm hesitant to proceed with a user facing warning.

 

Editable logic expression for USER ORGANISATION:

// Field is ONLY editable if USER_TYPE is NOT "Employee"
if ($feature.user_type == "Employee") {
    return false; // Not editable
} else {
    return true;  // Editable
}

//Note that this produces a warning in Field Maps form but it does work in the client

 

Calculated expression for USER ORGANISATION

// If User Type is "Employee", force the value to "My company name 123"
if ($feature.user_type == "Employee") {
    return "My company name 123";
} 
// Otherwise, return the field's current value to allow manual entry
else {
    return $feature.user_organisation;
}

 

0 Kudos
0 Replies