Author Topic: LiquidUI: Message Command with Pop-up  (Read 6533 times)

chirag.amin@guixt.com

  • GuiXT Forum
  • Newbie
  • *
  • Posts: 34
    • View Profile
LiquidUI: Message Command with Pop-up
« on: June 30, 2016, 11:05:37 AM »
In this scenario, we will use a pop-up to confirm whether the user wants to navigate to VA02 or not. Using the message command, we can utilize different types of pop-ups for different scenarios and do different logic depending on their choice. NOTE: this feature does not work for LiquidUI Server.

LiquidUI Code:

pushbutton([TOOLBAR], "GO TO VA02", "?", {"process":navigateVA02});

function navigateVA02(){
   onscreen 'SAPLSMTR_NAVIGATION.0100'
   
      // message_result will hold a value that depends on what the user clicks in  the popup
      // in the message command, specify the type, 4 is a Yes or No message box
      // in the message command, specify the title you want the message box to have
      message_result = message("ARE YOU SURE YOU WANT TO GO TO VA02?", {"type":4, "title":"NAVIGATE TO VA02?"});
      // if the result is 6, the user clicked yes
      if(message_result == 6){
         enter("/nva02");
      }
      // if the result is 7, the user clicked no
      else if(message_result == 7){
         enter("?");
      }
}