Custom formating rules on Query Field

Hi everyone!

This is my first post here, so it would be nice if you all could help me improving my future posts by pointing out my mistakes :wink:

Now let’s get to the topic:
I love the query field! They are amazing to get all the data I need. But often times the raw data is not as useful as some color coded rows.
For example:
The open notes field, which is default in shotgun, is really handy for a general overview of the review phase. But It would be way easier to differentiate the shots with comments from the other by changing the color of the fields. For example highlight it yellow if the value is above 1. Maybe if it is really high, like 15 or 20, it would be nice to highlight it in red or so. This is possible with every other field type in Shotgun, but not with query fields.

Another example is a custom entity that we use in our vfx production.
We track some shots by “setups”. They group different tasks like greenscreen sequences, mattepaintings or 3D elements per shot. It is a little bit like the asset structure but less complex.
We get the progress of these setups by query field. In them we summarize the shots with the final status or look for ommited shots. Setups are really handy for a general overview of projects. They also provide us an overview of the used bid per setup. This value is really critical as you might know. If the remaining bid gets to zero we need to show it to our production team and producers. But because the fields are query fields, we can’t use custom formatting rules to highlight low bids.

I understand, that query field are a little bit complex to calculate, but can’t you implement a callback after calculation to allow custom formatting rules?
It shouldn’t be so complex, or yes?

I’ve read this post here: https://support.shotgunsoftware.com/hc/en-us/community/posts/209480108-Ability-to-sort-group-and-or-filter-on-Query-fields
It is from 2013 and the latest comment is from 2018. It looks like a really important feature to some productions and I think it might be forgotten over the time.
There is also no comment from the Shotgun side, so I would like to use #wfh to reintroduce this topic. It is still important, I think.

Best regards,
Lukas

6 Likes

Hi @cglukas,

Welcome to the forums! Love the post and all the detail, I’ll do my best to answer this for you.

Query fields. We love them for what they can show us but there are some limitations which I hope I can explain here so you see why some stuff can’t happen.

Some operations in SG are conducted on the client side and others are done server side, e.g. calculated fields and conditional formatting are run server side, where as query fields and summaries are run client side, this means that since queries are run at the end, they can’t have things like conditional formatting or calculations made on them, pretty much for performance reasons, however I’m not a DB engineer and maybe things have evolved in the past 7 years that might enable us to do a performant method of having this feature, please do write in a feature request @ https://www.shotgunsoftware.com/roadmap/.

I’m pretty sure you understand all this all ready by the content of your post, just want to make it clear for any future readers.

This is a little bit of a long workaround but bear with me, having this set up can enable a lot of other things too, so can be a valid workflow and I have seen other studios utilise this. There is a way around this by using the event daemon and offsetting calculations to a separate server which would free you up to have conditional formatting and calculations run on it, the idea being that the daemon would see any notes created and update a static field on the DB which would enable you to have calculations and conditional formatting on those values.

Thanks for writing in and again, welcome to the Forums!

-David

5 Likes

Hi David,

thanks for the reply.
We already use the event daemon for this :sweat_smile: but I was hoping there might be a better solution. Especially for shotgun productions where I don’t get a script api key (I work currently in multiple productions).

I will open a feature ticket. Maybe the technology has advanced in this direction. We will see :grinning:

-Lukas

5 Likes

To add to this question - I’ve noticed that you can’t make conditional formatting based on linked fields - Is this due to the same limitation? Thanks!