Select to view content in your preferred language

Have a GUID field auto populate with an Attribute rule

1775
5
Jump to solution
03-29-2022 01:07 PM
CHedger1227
Occasional Contributor

Hello,

I am trying to create an attribute rule that will auto populate a GUID field type. I know how to do it with the field calculator but I am unsure of an attribute rule that can do this. I want it so when a new piece of data is put in it populates the GUID field with GUID data without me having to do anything.

Is this possible?

Thank you
1 Solution

Accepted Solutions
KimGarbade
Frequent Contributor

Sorry about that.  Try just  'Return guid()' (without the 'digits').  This worked for me (I just tested it).

return guid()

 

View solution in original post

5 Replies
KimGarbade
Frequent Contributor

There is a GUID Arcade function that should do the trick.

Data Functions | ArcGIS Arcade | ArcGIS Developer

So I think the below will work if that is the format you are looking for.

return GUID('digits')

 

 

0 Kudos
GdB_Admin
Occasional Contributor

That did not seem to work for me. all i had to do was paste the code as is correct? because that gave me an error saying invalid expression.

Thank you for your time on this. Please let me know if you have any questions
0 Kudos
CHedger1227
Occasional Contributor

Thank you @KimGarbade for the response 

It gives an error that says Invalid Expression. I do not believe that works for me. was it able to work for you Kim?

Thank you
0 Kudos
KimGarbade
Frequent Contributor

Sorry about that.  Try just  'Return guid()' (without the 'digits').  This worked for me (I just tested it).

return guid()

 

CHedger1227
Occasional Contributor

@KimGarbade 

that was it thank you!

Thank you