Read pfilters in DDX Brick

We have created APP in DOMO and we are using pfilters to load the dashboard as per filters passed like we are passing client id, date range. We had to create DDX Brick as we wanted some custom logic for one card so DOMO suggested to use DDX bricks. We have created a DDX Brick and added card in APP for this Brick.
We have used querying logic on dataset in that brick where we can pass filters, group by, order by etc to query on the dataset associated that brick. Now we want to pass the pfilter of APP to pass to this brick so that APP including this brick card will show data based on the pfilters. 
domo.get(stationquery).then(function(data) {});

We tried below option but no luck
var filters = window.pfilters; //Giving undefined all the time

domo.get('/domo/environment').then(function(env) {
    console.log('Environment:', env);
});// Giving 400 error

can you please suggest how can I read pfilters of the APP in DDX Brick?

Answers

  • Have you tried leveraging the domo.onFiltersUpdate()?

    https://developer.domo.com/portal/e947d87e17547-domo-js#domoondataupdate

    **Was this post helpful? Click Agree or Like below**
    **Did this solve your problem? Accept it as a solution!**
  • Vishal
    Vishal Member

    @ @We are asking about how to read pfilters applied. Like if we have passed pfilter clientid=123 then we should be able to read like for column name "clientid" filter value "123" applied so that in DDX bricks we can apply same to filter the dataset associated with the brick.