Page 1 of 1

Filter by selected in table view

Posted: 2021-10-01 10:16
by amyat
dear,

What i need to write for this?
https://imgur.com/gcKUQ46

i want to filter on table view by selected this table view when click batch action (show action button)

I wrote step by step like a tutorial
----table-tv.js-----
function print_mail_labels(table_name, ids){
alert("IDs selected from " + table_name + ": " + ids);
}

What i need to write between this function?
How to save filter result link as like normal filter appgini.?

can u help me a little?
thank you..

Re: Filter by selected in table view

Posted: 2021-10-01 19:29
by pbottcher
Hi,
on what do you want to filter? Which field(s)?

Re: Filter by selected in table view

Posted: 2021-10-02 02:29
by amyat
hi,

i want to filter on
multi select rows(list check box) for table view

sry for my bad english

Re: Filter by selected in table view

Posted: 2021-10-02 10:24
by pbottcher
Hi,

sorry, I'm still unclear on what you try to catch. So from what I understand, you want to filtern only the rows you selected by the checkbox. Correct?

Re: Filter by selected in table view

Posted: 2021-10-02 13:21
by amyat
i want to filter only the rows i selected by the record_selecter_id.
sry:( for my english

Re: Filter by selected in table view

Posted: 2021-10-02 16:23
by pbottcher
Hi,

ok, so you could call your page ( the one with the selected rows) with an additional parameter. In the hooks file -> Init function you can check for that parameter and set the $query->QueryWhere to your id's, or set filters to your id's (which every you like more).

Re: Filter by selected in table view

Posted: 2021-10-08 05:04
by sacgtdev
Having querywhere set in hooks init, I am able to filter the record. But, if navigate from other page to the page that have querywhere set, the page will not load and require re-submission/refresh.

Re: Filter by selected in table view

Posted: 2021-10-08 05:32
by onoehring
Hi,

try to save the querywhere in a session variable. If the session variable is set just filter.
But make sure, that you/the user can clear this variable if needed ;-)

Olaf