Is it possible to create condition based on already existing records ?

122
3
07-23-2019 04:10 AM
אלכסנדרהסביצקי
New Contributor

the question is:

in my table I got report id and cause for the report

can I deny insert of a record by checking if there's already record with the same 2 parameters ?

0 Kudos
3 Replies
Philip-Wilson
Esri Frequent Contributor

Hi there,

No, you can not check values from other existing records in the same feature layer. You can only check existing records in a repeat table or layer in the same feature service, if you have added those related tables to your survey as a repeat. Then you can use calculation to check if those values have been added before and use constraints or relevant expressions to hide or show to the user, or warm them with a message.

The only other way you could query the existing records that are not part of the current survey record you are adding or editing, would be to use a custom javascript function. Please refer to the Early Adopter Community for more information on javascript function support.

Phil.

אלכסנדרהסביצקי
New Contributor

Thanks for the reply Phil, the records I want to compare with the same records that the survey produce, so is it possible to prevent unwanted duplicates without javascript ?

0 Kudos
Philip-Wilson
Esri Frequent Contributor

Hi, no it is not possible if they are other features in the same feature layer, only if they are repeat records in the same parent layer, and all are loaded as part of editing via the Inbox and available in that survey record.

Phil.

0 Kudos