Options

Propagating MARKEDONLY filter from List to Card

rocatisrocatis Member Posts: 163
edited 2015-10-01 in NAV Three Tier
Open the Customer List and set a filter. When you double click on a record, the Customer Card is shown, retaining the filters you set on the List.

Except for the MARKEDONLY filter, it seems #-o

I'm working on a solution where I use MARK and MARKEDONLY extensively to do cross-field filtering.

Has anybody found a way to work around this problem/error/shortcoming?
Brian Rocatis
Senior NAV Developer
Elbek & Vejrup

Comments

  • Options
    Wisa123Wisa123 Member Posts: 308
    I dont really understand your problem to be frank.
    What are you exactly trying to achieve? (Maybe share some code)?

    Regards, Wisa
    Austrian NAV/BC Dev
  • Options
    rocatisrocatis Member Posts: 163
    Customer.FINDFIRST;
    Customer.SETRECFILTER;
    PAGE.RUNMODAL(0,Customer);
    
    If you this code, you're presented with a list containing 1 Customer. Click View to open the Customer Card. Using the buttons Previous and Next (Ctrl+PgUp and Ctrl+PgDn) will not change the Customer because the filter (SETRECFILTER) was inherited from the Customer List.
    Customer.FINDFIRST;
    Customer.MARK(TRUE);
    Customer.MARKEDONLY(TRUE);
    PAGE.RUNMODAL(0,Customer);
    
    If you this code, you're presented with a list containing 1 Customer. Click View to open the Customer Card. Using the buttons Previous and Next (Ctrl+PgUp and Ctrl+PgDn) changes the Customer because the filter (MARKEDONLY) was not inherited from the Customer List.

    To me, this is an error, but I'm going to hold my breath until it gets fixed. The question is if anybody has figured out a workaround to obtain the correct functionality.
    Brian Rocatis
    Senior NAV Developer
    Elbek & Vejrup
  • Options
    BeliasBelias Member Posts: 2,998
    edited 2015-10-20
    You can probably do some fancy stuff with temp tables if the quantity of data is manageable.
    You'll need an action to overwrite the doubleclick event: this button should create a temptable based on the filters and then run the card page (on the temp table, of course).
    Or (based upon your nav version) take a look at the "selectionfiltermanagement" codeunit (no. 46 in nav 2016)
    -Mirko-
    "Never memorize what you can easily find in a book".....Or Mibuso
    My Blog
  • Options
    rocatisrocatis Member Posts: 163
    How would you go about creating an action to overlay the doubleclick event? I don't think you can do that.

    Temp tables are going to be quite messy, as the user can edit the records.

    Codeunit 46 is intriguing and somewhat clever, but doesn't stand the test of really complex filters (it eithers goes into an infinite loop or overflows). When faced with the alternatives it might be the best choice, though.


    Brian Rocatis
    Senior NAV Developer
    Elbek & Vejrup
  • Options
    BeliasBelias Member Posts: 2,998
    You're right, it's all about the amount of data you have to manage: CU 46 has limitations (possible overflow being the most evident...well, i suggest you to try it anyway, i don't really remember if there is an intrinsic maxlen for "limitless texts").
    About temp tables...well, i just didn't think about you had to modify the table, whops :smiley:
    Btw, you can overwrite the doubleclick by creating an action with "Return" as shortcutkey. It also overwrites the keystroke.
    -Mirko-
    "Never memorize what you can easily find in a book".....Or Mibuso
    My Blog
Sign In or Register to comment.