Select to view content in your preferred language

Calculate and Stop Attachment(s) When The Size of Attachment is More than a default Size

837
2
Jump to solution
09-07-2023 11:55 AM
BHK
by
Occasional Contributor

Using ArcGIS Pro 2.7.1and having a simple Point feature class in GDB (schools) enabled for Attachment, I am trying to stop and prompt error message when user attached a big size images into the feature class.

I created a Field called `Attach_Size` in the School feature class and assigned a Calculation (Add Immediate Calculation Rule) to apply the code

 

 

 

 

 If(Count(Attachments($feature)) > 0) {
      return Attachments(size)
  }   

 

 

 

 

But this is not returning any thing either when creating a new feature or editing  existing feature. Can you please let me know what I am missing here?

 

Thanks

 

 

 

 

0 Kudos
1 Solution

Accepted Solutions
HusseinNasser2
Esri Contributor

So you want to add a constraint rule on the attachment table that says something like this

if ($feature.DATA_SIZE > 1000) return false;
return true;

HusseinNasser2_1-1694114780347.png

 

HusseinNasser2_0-1694114754793.png

 

View solution in original post

0 Kudos
2 Replies
HusseinNasser2
Esri Contributor

So you want to add a constraint rule on the attachment table that says something like this

if ($feature.DATA_SIZE > 1000) return false;
return true;

HusseinNasser2_1-1694114780347.png

 

HusseinNasser2_0-1694114754793.png

 

0 Kudos
BHK
by
Occasional Contributor

Thanks Hussein, This is exactly what I was looking for

0 Kudos