[Column Filter Widget] Need help in creating two level search filter

[Column Filter Widget] Need help in creating two level search filter

  
Forge Component
(4)
Published on 2014-01-29 by Pedro Cardoso
4 votes
Published on 2014-01-29 by Pedro Cardoso

Hi,

I am trying to create two-level search filter as below

It means by selecting any of the two columns in the search bar the table should filter them. I used Column Filter to do this but I didn't observe any positive results. Can anyone please help me in this.

Regards,

Trinusha.


You can try to keep the selected values in a session variable. When the user clicks on search, apply the session vars to your query.

Pedro Cardoso wrote:

You can try to keep the selected values in a session variable. When the user clicks on search, apply the session vars to your query.


Hi,

Can you please explain in detail.

Regards,

trinusha.

trinusha karumanchi wrote:

Hi,

I am trying to create two-level search filter as below

It means by selecting any of the two columns in the search bar the table should filter them. I used Column Filter to do this but I didn't observe any positive results. Can anyone please help me in this.

Regards,

Trinusha.


Hello Trinusha,

I think you should split your context data but if you really want to do this i suggest a different approach.

First, replace your input for a radio button to control your variables. 


Then, use and advanced query and pass your joins as inline parameter.

Something like

JOIN:


WHERE_CLAUSES:

Don't forget to control if WHERE is empty or not.

Hope this helps.

Best regards!

João


Joao Luis Santos wrote:

trinusha karumanchi wrote:

Hi,

I am trying to create two-level search filter as below

It means by selecting any of the two columns in the search bar the table should filter them. I used Column Filter to do this but I didn't observe any positive results. Can anyone please help me in this.

Regards,

Trinusha.


Hello Trinusha,

I think you should split your context data but if you really want to do this i suggest a different approach.

First, replace your input for a radio button to control your variables. 


Then, use and advanced query and pass your joins as inline parameter.

Something like

JOIN:


WHERE_CLAUSES:

Don't forget to control if WHERE is empty or not.

Hope this helps.

Best regards!

João


Hi Joao,

If I do in this method, We have to hardcode the column with radio buttons. If we have more columns then it will be clumsy. Can you suggest me a way to do it dynamically


trinusha karumanchi wrote:

Joao Luis Santos wrote:

trinusha karumanchi wrote:

Hi,

I am trying to create two-level search filter as below

It means by selecting any of the two columns in the search bar the table should filter them. I used Column Filter to do this but I didn't observe any positive results. Can anyone please help me in this.

Regards,

Trinusha.


Hello Trinusha,

I think you should split your context data but if you really want to do this i suggest a different approach.

First, replace your input for a radio button to control your variables. 


Then, use and advanced query and pass your joins as inline parameter.

Something like

JOIN:


WHERE_CLAUSES:

Don't forget to control if WHERE is empty or not.

Hope this helps.

Best regards!

João


Hi Joao,

If I do in this method, We have to hardcode the column with radio buttons. If we have more columns then it will be clumsy. Can you suggest me a way to do it dynamically


Yes you have but it is more secure. imagine if the user instead write "Table_A, Table_B", writes "DELETE FROM" ..... You need to be very carefully 


Hi Joao,

I don't have much knowledge of queries. As I understood you are comparing two tables but we are working on a single table for filtering out two columns values. If I am wrong Can you please explain me in detail.

Regards,

Trinusha