Skip to main content

How to access Dashboard widget filter

  • December 11, 2023
  • 4 replies
  • 385 views

  • New Participant
  • 4 replies

Hey everyone,
I am trying to filter the widget I have developed based on the native filter that is applied on on the widget itself.
I can’t seem to get the filter data by using monday.listen(‘filter’) or monday.get(‘filter’), I always get an empty result whenever I use these methods on the widget.

Did anyone have any experience with this in the past?

4 replies

Forum|alt.badge.img
  • monday.com Team Member
  • 34 replies
  • December 13, 2023

Hi Andy,

Would you be able to share your script with the parts that attempt to utilize monday.get('filter') and monday.listen('filter')?

In terms of our documentation, I am sure you have already read the docs on listen and get?

Best,
Joseph


  • Author
  • New Participant
  • 4 replies
  • December 13, 2023

Hi Joseph,
Thanks for replying.
I use the filter listen or filter get SDK methods in my main App.tsx under a useEffect like so:

useEffect(() => {
    const init = async () => {
      monday.listen("context", async (res: any) => {
        some logic to set the context...
      });

      //@ts-ignore
      monday.listen(['filter'], (res) => {
        console.log("filter listen", res.data);
      });
      //@ts-ignore
      monday.get("filter").then(res => console.log("filter get", res));
    };

    init();
  }, []);

When the app (widget) loads in the dashboard I do not get the filter setup but just an empty result as below:

Now this problem occurs only in the widget, because when I try the same thing in a board view I am able to retrieve the filter setup with the same code as above.

I also want to mention that I am trying this on a free developer plan. Could this also be the cause?


  • New Participant
  • 3 replies
  • October 17, 2024

Hello, experiencing the same issue. Any updates on this topic? Thanks.


  • Author
  • New Participant
  • 4 replies
  • October 18, 2024

Unfortunately still not possible to get the filter rules. I have been in contact with support as well but it doesn’t seem something which will be provided soon.