Options

Positioning when opening a list

AtreiuAtreiu Member Posts: 51
edited 2011-06-01 in NAV Three Tier
Hello everybody,
can you suggest me a way to automatic choose (by code) a position in a list when I open it?

For example when opening customer invoice list it always put in the middle of the list... and I need a lot of scrolling to reach the last invoice.
Does anyone know how to automatic say that when I open this page the system automatically will go to the end of the list and/or in a specific position (for example the ones beginning by '11-')?

thanks in advance

Answers

  • Options
    mohana_cse06mohana_cse06 Member Posts: 5,503
    You can reach last record by pressing Ctrl+End
  • Options
    fitolfitol Member Posts: 46
    Atreiu wrote:
    can you suggest me a way to automatic choose (by code) a position in a list when I open it?
    Try this code in OnOpenPage in the list page:
    SETFILTER("No.", '%1..', '11-');
    IF FINDFIRST THEN ;
    SETRANGE("No.");
    
  • Options
    AtreiuAtreiu Member Posts: 51
    thanks for this tip.

    But I want this to be automatic when opening the page.
  • Options
    fitolfitol Member Posts: 46
    Atreiu wrote:
    But I want this to be automatic when opening the page.

    What?
    You asked how to do it by code.
    And when putting the code in the page it will be done automatically.
    ](*,)
  • Options
    AtreiuAtreiu Member Posts: 51
    fitol wrote:
    Atreiu wrote:
    can you suggest me a way to automatic choose (by code) a position in a list when I open it?
    Try this code in OnOpenPage in the list page:
    SETFILTER("No.", '%1..', '11-');
    IF FINDFIRST THEN ;
    SETRANGE("No.");
    
    thank you!
    i'll try it now
  • Options
    AtreiuAtreiu Member Posts: 51
    I tried to use your solution to achieve this: go to the last record.
    So i write only:
    IF FINDLAST THEN
    SETRANGE("No.");
    

    and it works!

    my (stupid) question is: does not SETRANGE work as an actual filter on the page? It does not exclude records and show some... Why?


    however... thank you!
  • Options
    SavatageSavatage Member Posts: 7,142
    on the form there is also a property "SourceTablePlacement"

    A specific record -->Record
    The first record in the table --> First
    The last record in the table --> Last
    The record being shown the last time the user displayed the form --> Saved (default)

    no coding needed
Sign In or Register to comment.