Author Topic: Selecting and De-selecting Checkbox in a Table  (Read 3638 times)

Sai Siddhartha

  • GuiXT Forum
  • Newbie
  • *
  • Posts: 47
    • View Profile
Selecting and De-selecting Checkbox in a Table
« on: October 12, 2017, 08:46:55 AM »
Purpose:
To Select and De-select the checkboxes present in column of a table.

Usage:
To select and de-select the checkbox in a table we need to use set command with tablename,columnname and row number.
Syntax to select:
set('cell[tablename,columnname,rownumber]', 'X'); // 'X' select the checkbox in table
Syntax to Deselect:
set('cell[tablename,columnname,rownumber]', ''); // blank value de-select the checkbox in table

Below is a simple example to demonstrate the selection and de-selection of a checkbox present in a table with functions called by pushbuttons.
Liquid Code:
/////////////////////////// SAPLMEGUI.E0014.sjs ///////////////////////////////   

pushbutton( [TOOLBAR], "Select Checkbox",{ "process":z_select_ckbx});
pushbutton( [TOOLBAR], "Deselect Checkbox",{ "process":z_deselect_ckbx});

function z_select_ckbx(){
     onscreen 'SAPLMEGUI.0014'
          set('cell[TABLE,D,1]', 'X'); // select checkbox in first row
          enter("?");
}

function z_deselect_ckbx(){
     onscreen 'SAPLMEGUI.0014'
          set('cell[TABLE,D,1]', ''); // de-select checkbox in first row
          enter("?");
}

See attachment for more information and screenshots