Skip to main content
Answer

Set column filters from code

  • May 4, 2023
  • 4 replies
  • 239 views

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<>
 

4 replies

aaghaei
Captain II
Forum|alt.badge.img+10
  • Captain II
  • 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

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
  • 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!