Liquid UI Forum

Using Your Liquid UI Products => Mobile Products (Android, iOS and CE) => Topic started by: Ashfaq Ahmed on April 21, 2020, 04:25:56 AM

Title: Implementing Beep Sound using LUI Script.
Post by: Ashfaq Ahmed on April 21, 2020, 04:25:56 AM
Purpose:

To Incorporate Beep Sound using LUI Script in Liquid UI Android, Mobile.

Example:

In the Below Example Implementing the Notify Bell Signal in VA01 Create Sales Order: Initial Screen in that when the User Left's the Order Type, Sales Organization Input field as Blank and tries to Navigates to the Next Screen it will Notify the User with Beep Sound.

Steps:

1. Create a script file "SAPMV45A.E0101.sjs" with the following code and save it in your WS scripts directory as configured in "guixt.sjs" file.

///////////////////////////////SAPMV45A.E0101.SJS///////////////////////////////

load('stringFunctions.sjs'); // Loading the stringFunctions.

text([0,20], "&V[G_RF_BEEP]");

// Function isBlank is used to check for blank string.
// Specifically used to determine if input exist in the edit field
.

function isBlank(strInput) {
   var strVal = getString(strInput);
   var blank = strVal == "";
   return blank;
}

function fn_belltest() {
set("V[z_order]","&F[Order Type]");
set("V[z_salesorg]","&F[Sales Organization]");
set("V[G_RF_BEEP]" ,"");

   if(isBlank(z_order) || z_order==undefined || z_order=="?" ){
      set("V[G_RF_BEEP]" ,"");      // Beep 1 Time.
       return ("E: Enter Order Type");
   }

   else if(isBlank(z_salesorg)) {
      set("V[G_RF_BEEP]" ,"");     //Beep 2 Times.
       return ("E: Enter Sales Organization");
   }
enter();
}
onUIEvents["Enter"]={"process":fn_belltest};


Refer to the Attachment for Clarity....