Expand my Community achievements bar.

SOLVED

Show filtered result in aem 6.5 inbox on load based on payload

Avatar

Level 4

Hi Team,

 

I have a requirement to land user to aem 6.5 inbox on click of a link on custom page.

The user when landed on aem inbox should be able to see only the tasks associated with the payload by default.

Any pointers appreciated.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

you can create use an OOTB filter to filter out results based on palyload. Just add payload as query string and open filter using javascript.

 

Screenshot 2021-02-16 at 19.38.23.png

 

 

 

 



Arun Patidar

View solution in original post

4 Replies

Avatar

Correct answer by
Community Advisor

you can create use an OOTB filter to filter out results based on palyload. Just add payload as query string and open filter using javascript.

 

Screenshot 2021-02-16 at 19.38.23.png

 

 

 

 



Arun Patidar

Avatar

Level 4

@arunpatidarThanks for the suggestion. I too tried using the same approach, I am able to open filter and add the payload there. The actual challenge I am facing with this is updating the omnisearch param so that the query gets triggered.

 

Basically what am trying to do is triggering the click events on filter and updating the payload using /libs/cq/inbox/gui/components/inbox/clientlibs/inbox/js/inbox.omnisearch.js and updating the dom.

However, am unable to figure out how that selected payload goes in the payload path displayed on omnisearch bar as "Path", Since this actually triggers the search query.

Avatar

Community Advisor
you just have to submit form e.g. $('.path-predicate .coral3-Textfield.coral-InputGroup-input').val('/content/we-retail'); $('input[name="2_payloadPath"]').val('/content/we-retail'); $('form').submit();


Arun Patidar

Avatar

Level 4
Thanks @arunpatidar !! Combining below with other click events on load of aem inbox, I am successfully able to populate the payload path and get the filtered result.