Is there any way how to set attribute rule using python expression instead of Arcade???
Thanks
Hi @kirken ,
To confirm Dan's suspicion, Attribute Rules will only work with Arcade expressions. You cannot create an attribute rule using Python as the expression. The link shared by @DanPatterson before uses Python to configure the Attribute Rule, but inside it is still using the Arcade expression defined as a string inside the Python script.
In short, if you want to use Attribute Rules you will always need Arcade...
@XanderBakker looking for a way to use Attribute Rules to refresh lat/long fields after a point is moved. Right now we must do this manually with Calculate Geometry tool, and I am seeing it is possible to do it with Python, but I can't use Python to calc an Attribute Rule. I also can't use Arcade to translate into lat/long unless it is in Web Mercator... (we are using State Plane).... thoughts anyone?
I don't think arcade imports python libraries
Ok. I meant more like writing the script expression of the rule in python because it is quite complicated and currently uses some python libraries but I guess i have to learn that arcade now..
both... python is the delivery... attribute rule is the package 😁 Like Amazon (python home range)
Is that actually used to fire a rule or just add one?
Well yes and no.
You can use a python script to use an Arcade expression. See the example here
Add Attribute Rule (Data Management)—ArcGIS Pro | Documentation
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.