Shotgun List view with striped rows

I have a user that says, at another shop, they had an AMI that would format the rows on a Shotgun List page (e.g. “Sequences”, “Shots”, etc.) so that they were “striped” (i.e. the row backgrounds alternated between gray and white).

And I thought I knew a lot of Shotgun tricks, but this one has me stumped. :stuck_out_tongue:

Anybody know if this is possible? Any idea how to do it?

Thanks!

Josh

1 Like

Hi @JoshBurnell !

I can only guess but one way this would work is with a custom boolean field and “Row formatting with Rules”

.

  1. Add a rule that reacts depending on the boolean field.
  2. Create an AMI that queries the current page settings, including sort order.
  3. Let the AMI set the boolean field on every second row.
  4. Profit :slight_smile:

This obviously does not work anymore as soon as you change the sorting on the page but it might not be that bad.

Hope that helps! :slight_smile:

Cheers,
Fabian

3 Likes

lol Thanks!

Can you programmatically add a formatting rule? Like, with the API?

Or, with this example, would you need to set up the formatting rule on every page where you want to support this feature?

Josh

Formatting rules can be applied globally or per page. I think they are not exposed to the API.
Applying this technique globally is probably tricky since all the pages have different sorting order and the formatting rules needs to (or should) work with shotguns light and dark mode.
But good luck with the implementation! :grimacing:

Cheers,
Fabian

1 Like

lol Thanks, yo.