Options

Default Views in Filter pane

shibilyshibily Member Posts: 89
Hello,

I have a List page and it has a field named "Open". Also, I have Open and Closed views written in code for the page to filter on the field "Open", so that the user can click on each view to filter the records. I can see three views on the page "All", "Open", and "Closed". 

I have a Role center Cue to view only the opened records. When I click on this cue, it always filters only the open records as expected, but it defaults to "All" view on the page. Is there a way to get my custom filter to be the default one, which means it defaults to the Open when I click on the Cue in Role Center?



Thanks, in advance.

Shibily

Answers

  • Options
    vaprogvaprog Member Posts: 1,118
    edited 2023-06-20
    It is unclear what you want to get, and unclear how you realized your filter and associated GUI elements. Regardless, you probably need to check the filter set on Rec, and adjust the "state" you are maintaining accordingly. OnOpenPage may work. If it does not, or better anyway, use OnFind. Just add the following line after you have done your thing:
    EXIT(FIND(Which));
    
  • Options
    shibilyshibily Member Posts: 89
    @vaprog Thanks for your reply.

    Sorry that it is not clear.
    So, I have written code to add views in filter pane of the page. please see below.
    views
    {
    view(OnlyOpen)
    {
    Caption = 'Open';
    Filters = where(Open = CONST(true));
    }
    view(OnlyClosed)
    {
    Caption = 'Closed';
    Filters = where(Open = CONST(false));
    }
    }


    These additional filter views will help the user to toggle between the open and closed records.
    On top of these two custom Open and Closed Views, there is another system generated view called "All", and it shows all records.

    So, I have a Role center Cue, where I wanted to show only open records. When the user clicks on it, the page will filter only open records (based on the filter set in cue table), but as it is showing only open records, I wanted the "Open" View gets selected in that case. unfortunately, it is selecting the "All" view by default in this case. Please see the screenshot below where I have 3 views in the filter pane.
    nr7kkpzdcdcb.png
  • Options
    garmoogarmoo Member Posts: 17
    Hi @shibily did you ever resolve this?
Sign In or Register to comment.