Have a GUID field auto populate with an Attribute rule

1133
5
Jump to solution
03-29-2022 01:07 PM
CHedger1227
New Contributor III

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
Occasional Contributor III

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
Occasional Contributor III

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
New Contributor III

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
New Contributor III

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
Occasional Contributor III

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

return guid()

 

CHedger1227
New Contributor III

@KimGarbade 

that was it thank you!

Thank you