Select Multiple rows

shibilyshibily Member Posts: 89
Hi all,

I would require to select mutiple rows from a list and perfom some action based on the selected rows . Is there any work around for that? The List Box in the tool Box is always disabled.

Thanks in advance
Shibily

Answers

  • afarrafarr Member Posts: 287
    edited 2009-12-10
    So for example, the user would select some salespersons (from a list of all salespersons), press a button, and see a list of all the orders for the selected salespersons?

    The user could mark the records (with Ctrl + F1), and the SalespersonRec.MARKEDONLY (correction: Salesperson.SETSELECTIONFILTER - see next post) command will restrict your view to just the marked records.

    Is that the sort of thing you need?

    By the way, a quick search shows that apparently there is no Listbox functionality in Navision (even if there's a listbox icon in the toolbox):
    http://mibuso.com/forum/viewtopic.php?f ... it=listbox
    Alastair Farrugia
  • BeliasBelias Member Posts: 2,998
    afarr wrote:
    So for example, the user would select some salespersons (from a list of all salespersons), press a button, and see a list of all the orders for the selected salespersons?

    The user could mark the records (with Ctrl + F1), and the SalespersonRec.MARKEDONLY command will restrict your view to just the marked records.

    Is that the sort of thing you need?

    By the way, a quick search shows that apparently there is no Listbox functionality in Navision (even if there's a listbox icon in the toolbox):
    http://mibuso.com/forum/viewtopic.php?f ... it=listbox
    not completely true: you can achieve the result holding down ctrl button, clicking the rows you want, press the "mycommandbutton" and under that button use the SETSELECTIONFILTER instruction (search online help)...be aware of marks, they're quite tricky sometimes...
    -Mirko-
    "Never memorize what you can easily find in a book".....Or Mibuso
    My Blog
  • afarrafarr Member Posts: 287
    Thanks for the correction, Belias - I've modified my post accordingly.
    Alastair Farrugia
  • BeliasBelias Member Posts: 2,998
    afarr wrote:
    Thanks for the correction, Belias - I've modified my post accordingly.
    you're welcome :wink:
    -Mirko-
    "Never memorize what you can easily find in a book".....Or Mibuso
    My Blog
  • shibilyshibily Member Posts: 89
    Hi,
    I bound the form with Item Ledger Entry table and i selected the rows by using Cntrl+F1 and then used the SETSELECTIONFILTER .
    ie on the Button Push i have written the code
    CurrForm.SETSELECTIONFILTER(Rec);
    MESSAGE('%1',"Item No.");

    But i am not getting the message for the message for the selected items.
    Anything else need to be added?

    Shibily
  • BeliasBelias Member Posts: 2,998
    read carefully the help online:
    Notes the records that the user has selected on the form, marks those records in the table specified, and sets the filter to "marked only".
    means that you don't have to mark the records, and that the only thing nav does, is to mark the records you selected and set the "filter" as if you do a MARKEDONLY(TRUE) instruction.
    So.....
    you have just to select the records holding the ctrl button (if necessary) and click on the left side of the wanted rows in order to make them blue.
    moreover, you can't expect to have a result if you don't do a FIND instruction, at least...you have just set a filter on marks, but if you don't find at least one record, you will never get any value, just as if you do:
    customer.setrange(name,'Freddy Krueger');
    message(customer.name);
    
    -Mirko-
    "Never memorize what you can easily find in a book".....Or Mibuso
    My Blog
  • shibilyshibily Member Posts: 89
    Belias wrote:
    read carefully the help online:
    Notes the records that the user has selected on the form, marks those records in the table specified, and sets the filter to "marked only".
    means that you don't have to mark the records, and that the only thing nav does, is to mark the records you selected and set the "filter" as if you do a MARKEDONLY(TRUE) instruction.
    So.....
    you have just to select the records holding the ctrl button (if necessary) and click on the left side of the wanted rows in order to make them blue.
    moreover, you can't expect to have a result if you don't do a FIND instruction, at least...you have just set a filter on marks, but if you don't find at least one record, you will never get any value, just as if you do:
    customer.setrange(name,'Freddy Krueger');
    message(customer.name);
    


    Thank you,
    It worked for me.
Sign In or Register to comment.