Skip to main content
Solved

Set column filters from code


Forum|alt.badge.img

Hello!

Is there any way to set a column filter from a custom action in the graph?

Like:

 

Best answer by aaghaei

Assuming what you are showing here is result of a public view then yes you can.

If you want your public view be filtered by a fixed value like True/False or any similar constants, then just rewrite your public view in graph ext (use the same view name but with revised where statements)

If you want your view results change by some dynamic parameters, then you will need a view delegate in the graph ext which is a bit more complex. In the delegate then you can append the desired view by WhereAnd<> or WhereOr<> or even set a whole new where statement by WhereNew<>
 

View original
Did this topic help you find an answer to your question?

4 replies

aaghaei
Captain II
Forum|alt.badge.img+10
  • Captain II
  • 1202 replies
  • Answer
  • May 5, 2023

Assuming what you are showing here is result of a public view then yes you can.

If you want your public view be filtered by a fixed value like True/False or any similar constants, then just rewrite your public view in graph ext (use the same view name but with revised where statements)

If you want your view results change by some dynamic parameters, then you will need a view delegate in the graph ext which is a bit more complex. In the delegate then you can append the desired view by WhereAnd<> or WhereOr<> or even set a whole new where statement by WhereNew<>
 


Forum|alt.badge.img
aaghaei wrote:

Assuming what you are showing here is result of a public view then yes you can.

If you want your public view be filtered by a fixed value like True/False or any similar constants, then just rewrite your public view in graph ext (use the same view name but with revised where statements)

If you want your view results change by some dynamic parameters, then you will need a view delegate in the graph ext which is a bit more complex. In the delegate then you can append the desired view by WhereAnd<> or WhereOr<> or even set a whole new where statement by WhereNew<>
 

Thanks aaghaei.

I’ve tried using a view delegate. But the problem here is that I would like to keep the original view results, and just filter the records the user would see on the grid after executing an action.

When I tried the view delegate the results are modified on every reload.


aaghaei
Captain II
Forum|alt.badge.img+10
  • Captain II
  • 1202 replies
  • May 5, 2023

It is exactly what I meant by passing parameters. If a parameter for example is provided then you filter by its value otherwise you show all. If you want the filtered result as initial display, then you can set your default parameter value in code and user can reset the filter if needed or vice versa


Forum|alt.badge.img

Thanks Aaghaei. Looks like.. This is the way!


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings