Accessing current filters in power-up?

Hi all,

I’ve developed a simple Trello power-up used to sum custom fields:

One of the users has raised a valid question regarding filters. They’re essentially saying that the sum should not include any cards currently filtered out of the list.

However, I’m having a hard time finding a method for implementing this as I can’t see any information regarding the active filter or filtered status of a card.

Is this actually possible?

1 Like

Hello @campbellmg

I think you’re out of luck. All the card filtering happens on the browser side using JavaScript to alter the DOM, so the cards really are always ‘there’, just hidden from view. There is no filter state that you can read, so you’d have to read the current page state via something like JQuery.

PowerUps like Bulk Actions deal with this situation by replicating all the cards to their own interface, with their own filtering, so that the state of the filtering being applied to the cards is known.

1 Like

Hey @sunnyape,

Thanks for getting back to me, I had a feeling that this might be the case.

I’ll see if I can work something out based on the information I’ve got handy.

1 Like