Author Topic: Searchhelp using function module  (Read 2494 times)

rajesh.sabbineni

  • GuiXT Forum
  • Newbie
  • *
  • Posts: 26
    • View Profile
Searchhelp using function module
« on: August 12, 2016, 03:04:01 PM »
On a Liquid UI inputfield we can bring F4 searchhelp display using function module. This method will allow to display custom field values and also restricted search help.

Note: Since F4 search help display will open in a new window, functions should be loaded in esession file.

LiquidUI code:
// Input field Display screen
del("X[IMAGE_CONTAINER]");
inputfield( [2,3], "Plant", [2,10],{ "name":"z_plant", "size":4});
pushbutton([2,15], "@8D@", {"process":getPlantList,"size":[1,2]});

// F4 values display screen
clearscreen();
windowsize([0,2,105,10]);

title("Select Plant");

del("P[Generate]");         // Toolbar Button on Popup
del("P[End Session]");      // Toolbar Button on Popup
del("P[Continue]");         // Toolbar Button on Popup
text('P[Cancel]','@02@Cancel');

if(plantValue.length > 0){
   rowNumber = 0;      // Row Number to start painting controls on the screen
   colNumber = 1;      // Column Number to start painting controls on the screen
   plantNumber = '';
   
   for (var loop=0; loop<plantValue.length; loop++){
      if (colNumber > 100){   // On the screen, if the width of the screen exceeds 100, then draw controls on next row
         rowNumber+=3;
         colNumber=1;
      }
      plantNumber = plantValue[loop].substring(0,4).trim();

      pushbutton([rowNumber,colNumber],plantNumber,{"process":selectPlant, 'using':{'l_plant':plantNumber},"size":[2,5]});
      colNumber+=7;
   }
}


onUIEvents['/12']={"process":exitPopup};
onUIEvents['Enter']={"process":exitPopup};

// Functions
function getPlantList(){
   plantValue = [];
   call("Z_GUIXT_GET_PLANT",{"table.TBL_PLANT":"plantValue"});
   if(plantValue.length > 0){
      enter('/o');
   }
}

function selectPlant(param){
   enter('/12');

   onscreen '*'
      set("V[z_plant]",param.l_plant);
      enter('?');
}
   
function exitPopup(){
   enter('/12');
}

see attachments..
« Last Edit: August 12, 2016, 03:22:39 PM by rajesh.sabbineni »