Recommendation for non-required numeric fields in form
I have several numeric field in my enterprise geodatabase that are nullable.
If the user leaves the field empty, the create feature activity fails due to the null value.
As a partial workaround, I set a default value of 0.0 in the form, but the user can decide to clear it and leave the field blank, which is preferrable and expected UX behavior.
I have tried several approaches with the javascript ternary operator in the Create Features activity to check for empty/null/undefined values in the numeric field, but to no avail.
What is the recommended way to handle null numeric values?
Thanks!
-
Think I found successful logic.
In Create Features, I use this ternary to check the NumberRef for null.
If null, pass null to the feature. If not null, pass the numeric value to the feature.
($form1.state.number4.value == null ? null : $form1.state.number4.value.numeric)
0
Comments
1 comment