Select to view content in your preferred language

Auto-running a python script after attaching a document

194
2
Jump to solution
a month ago
Shane_EU
New Contributor II

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

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

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

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