Select to view content in your preferred language

Arcade expression not working in v. 3.0 and 3.1 but does work 3.2

306
2
01-23-2024 05:21 AM
HenriqueJoner
New Contributor III

Hello,

I am currently facing an issue in ArcGIS Pro 3.0 and would appreciate any insights or suggestions.

I am trying to add a column to a feature class that contains the ID of the attachment associated with each feature. The method I am using is the Arcade expression <First(Attachments($feature)).id>. However, I have encountered a problem – this method does not work in the version 3.0 of ArcGIS Pro that I am currently using. I've also tested it in version 3.1, and it seems to have the same issue.

After reaching out to ESRI technical support, I was advised to upgrade to version 3.2, where the method is reported to work. However, upon upgrading to 3.2, I encountered a new problem – all of my scripts stopped functioning. This is due to the fact that the environment in version 3.2 is significantly different from version 3.0, causing many of the packages I rely on to fail in a cloned environment of 3.2.

My main concern is whether there is a way to address this issue in version 3.0 so that the mentioned method works without having to upgrade to version 3.2.

Any assistance or suggestions would be greatly appreciated.

PS: Why cant we use different arcpy versions in different enviroments ??? Come one ESRI!

 

0 Kudos
2 Replies
RhettZufelt
MVP Notable Contributor

Not sure what is going on, but I tested your code in 2.9.3, 3.1.3, and 3.2.1 and all seem to be working as expected.

RhettZufelt_0-1706035953946.png

if I put the ".id" at the end like you have, it will only return the id.

R_

0 Kudos
HenriqueJoner
New Contributor III

I have the same output when i just click to view console messages, seems fine. BUT, when i run just <First(Attachments($feature)).id>, it return only null. You can see the variable ID_ATTCH which i got it through version 3.2, and the variable ID returning null in version 3.0, but it shows correctly at console messages as well.WhatsApp Image 2024-01-23 at 16.01.29.jpeg

0 Kudos