cancel
Showing results for 
Search instead for 
Did you mean: 

SAP MDK OnValueChange event issue

madhavi_beedam87
Explorer
0 Kudos

Hi Experts,

I am using a Android based TC72 device which has a inbuilt scanner.

My requirement is, in a page have a SimpleProperty with OnValueChange calling a rule. 

When a user  scans a barcode, I have to show an alert and clear the Input Field for next scan.

Issue : Its working for the first time as expected but second time its still retaining the first scan value. (I am scanning two different barcodes alternatively for testing) So my OnValueChange triggering twice. (one with OLD value and again with NEW value).

My Rule Code inside the default function as below

var scannedValue = clientAPI.getValue();
alert("Scanned Value first time :" + scannedValue + ":");
clientAPI.setValue("", false); // Doing this to stop second call to the event
alert("Scanned Value second time :" + clientAPI.getValue() + ":"); // this is still showing the value
 
 

 

 

 

bill_froelich
Product and Topic Expert
Product and Topic Expert
0 Kudos
What version of MDK are you using?
View Entire Topic
madhavi_beedam87
Explorer
0 Kudos

Hi Bill,

MDKClient Version : 23.12.0-002

com.sap.cloud.android.fundation : 7.1.0

 

-Madhavi Beedam