How to automatically update fields on ShotGrid on refresh?

Hi.

I have created an Event Daemon for ShotGrid on Python that automatically updates a field (Ex: ‘WIN Path to Frames’ on the Versions page) when another field (Ex: ‘Path to Frames’, also on the Versions page) is filled in - and it works as intended originally.

But now, I need it to automatically update the ‘WIN Path to Frames’ field for ALL the rows that have the ‘Path to Frames’ field already filled out when I refresh the page. Right now, I have to manually erase the ‘Path to Frames’ value and fill it again for the code to work.

Can anyone give me a suggestion on how to make that happen please?

Thanks in advance.

I am guessing that you just want to update older records that where generated before you made your Event deamon, right? It will be a one-time-run?

In that case why not write a quite python snippet to find all the versions you are looking for and update their fields accordingly.
Then from that moment onward the Event Daemon takes over for any future records.

1 Like

What exactly do you mean by “write a quite python snippet”?

Do you mean to write a separate python code that finds all the versions and update the fields of the older records and let the Event Daemon take care of all the future records?

Please clarify; thank you.

The event daemon reacts only to new changes - it does not care about existing records.
Just run the script on old records manually, and let event daemon handle future ones, like you and Ricardo said.
The code that changes records will be roughly the same, so you could pull as much of it as possible into a shared library.

1 Like