Select to view content in your preferred language

Auto-running a python script after attaching a document

277
2
Jump to solution
07-09-2024 07:59 AM
Shane_EU
Occasional Contributor

Hi all, I have implemented step 1, but could use some help with steps 2 (event-based running of a script) and 3 (the logic to extract the text). Thanks!

Shane_EU_0-1720537014063.png

 

0 Kudos
1 Solution

Accepted Solutions
HaydenWelch
Frequent Contributor

The only things that run on database events in Pro are Attribute Rules. You could try implementing the scraper there, but because the JavaScript version (arcade) is limited, you'd probably be better off putting in a flag field that is set by default to something like "unprocessed" then setting up a validation rule that notifies the user that they have unprocessed documents and prompts them to run a python tool that checks for "unprocessed" records and does the processing.

You can't trigger the script on event, but you can make it harder for people to forget to run it or make it easy for a batch script to traverse a ton of projects looking for that "unprocessed" flag and do the processing.

View solution in original post

0 Kudos
2 Replies
TonyAlmeida
Frequent Contributor

I don't think you can execute direct event-driven scripts like you are wanting. Maybe the use  of database triggers and scheduled tasks.

HaydenWelch
Frequent Contributor

The only things that run on database events in Pro are Attribute Rules. You could try implementing the scraper there, but because the JavaScript version (arcade) is limited, you'd probably be better off putting in a flag field that is set by default to something like "unprocessed" then setting up a validation rule that notifies the user that they have unprocessed documents and prompts them to run a python tool that checks for "unprocessed" records and does the processing.

You can't trigger the script on event, but you can make it harder for people to forget to run it or make it easy for a batch script to traverse a ton of projects looking for that "unprocessed" flag and do the processing.

0 Kudos