How to access Dashboard widget filter

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?

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

1 Like

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?

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

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.