Select to view content in your preferred language

Detect When Attachment is Added - Field Maps Tasks

91
2
Thursday
CodyPatterson
MVP Regular Contributor

Hey all,

Enterprise 12.0

We're looking into Field Maps Tasks, and we want a way to prevent final submission until an attachment is added, any ideas?

Currently a way that we're trying to detect in the moment if an attachment has been added to the actual item in Field Maps is the way below, is this possible?

if (count(Attachments($feature)) != 0) { 
  return "Passed"
}

This is just a demo text to verify if this would work, it adds the "Passed" value after it is submitted, but the value is not calculated until actual execution, I have seen other attributes like this in the past, but was curious if you all have had any ideas?

Cody

0 Kudos
2 Replies
RPGIS
by MVP Regular Contributor
MVP Regular Contributor

Hi @CodyPatterson,

It is possible to do so. The way to go about it is to add a constraint rule on the attachment table itself to look for the globalid of the related feature record and then set the insert trigger to have it look to see if the required attributes have been filled out.

0 Kudos
CodyPatterson
MVP Regular Contributor

Hey @RPGIS 

Thank you for the response! I'm currently blanking on where to find this constraint rule placement for the attribute table, I forgot to add it initially but this is Enterprise 12.0 if that helps the locating of this!

Cody

0 Kudos