Select to view content in your preferred language

Validating User-Input in a Smart Form

570
2
02-29-2024 07:21 AM
YS2388
by
Regular Contributor

Hello,

I am wondering if the following scenario is possible to implement in Field Maps:

- There is a point hydrant layer with a related table for hydrant inspections.

- In field maps, a user selects a hydrant to record a new inspection.

- In the inspection form, there is a field called "Inspection_number" where the user enters the number that identifies this inspection.

What I wish to implement is a validation rule that will check if this inspection number equals any of the other previous inspections for this hydrant. I cannot seem to find a way in arcade that will capture the user input either before or during form submission. 

Example: 

$feature.Inspection_Number - seems to capture the value that is in the field when the form is opened, which is Null for the most part. 

Is there a way to capture the user input as it is being entered or during submission. I.e. if the user enters an Inspection_number that has previously been used for this hydrant, there is an error message on submission.

I appreciate any help.

Thanks

2 Replies
YS2388
by
Regular Contributor

Does anyone have a suggestion for a solution to this problem?

0 Kudos
ShaunGibbins
Occasional Contributor

Wouldn't it be easier to use an attribute rule to calculate the inspection number? Increment it?

0 Kudos