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:
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;
}