Author Topic: Liquid UI - selectedrows option  (Read 7626 times)

Sai Siddhartha

  • GuiXT Forum
  • Newbie
  • *
  • Posts: 47
    • View Profile
Liquid UI - selectedrows option
« on: February 15, 2018, 06:09:54 AM »
Purpose:
To determine selected rows in a table using 'selectedrows' option in 'gettableattribute' command.

Liquid UI Code:
//////////////////////////////// SAPMV45A.E4001 //////////////////////////////

pushbutton( [TOOLBAR], "Selectedrows ","?",{  "process": print_selectedrows});

function print_selectedrows(){
     gettableattribute("T[All items]", {"firstvisiblerow":"FVisRow", "lastvisiblerow":"LVisRow", "lastrow":"LastRow",
                             "selectedrows":"SelRows"});
     for(i=0;i<LastRow;i++){
            ROW_NUMBER = i;
            if(SelRows[ROW_NUMBER]=="X"){
                   // adding 1 as SelRows is array which has index begin from 0
                 selected_row_number = ROW_NUMBER+1;
                 println("Selected row is>> " + selected_row_number);
            }
       }
 }

After executing the function you will see row number of selected rows in a table on Cornelius output window.

See attached document for more information and screenshots.