cancel
Showing results for 
Search instead for 
Did you mean: 

BindingObject of a selected list picker item

Angelo_Ab
Explorer
0 Kudos
283

Hi,

we faced a recent issue on a rule that previously worked correctly on Tablet(Samsung A9+ on Android 14).

On the OnValueChange event of ListPicker we have a Rule with this code:

//  get selected value properties
let bindingObject = clientAPI.getValue()[0].BindingObject;

// get controllers
let barcodeControl = clientAPI.evaluateTargetPathForAPI("#Page:CreateSalesOrderItem/#Control:FCCreateItemBarcode"); let descriptionControl = clientAPI.evaluateTargetPathForAPI("#Page:CreateSalesOrderItem/#Contmdk mobile development kit clientrol:FCCreateItemDescription"); let customerProdControl = clientAPI.evaluateTargetPathForAPI("#Page:CreateSalesOrderItem/#Control:FCCreateItemCustomerProduct");
// set controllers values
barcodeControl.setValue(bindingObject.EAN); descriptionControl.setValue(bindingObject.Description); customerProdControl.setValue(bindingObject.CustMaterial);  

The instruction clientAPI.getValue()[0].BindingObject; does not works anymore and returns undefined

We need to get all the property of the selected item of the entity for set Value on some ReadOnly SimpleProprety fields.

On Phone(Samsung A23 on Android 14) seems to work correctly.

We tried to reset the app on both, phone and tablet but nothing changed.

Why this does not works anymore on Tablet ?

Thank you.

 

View Entire Topic
bill_froelich
Product and Topic Expert
Product and Topic Expert
0 Kudos

First thing would be to verify the MDK version in use on the tablet.  Access to the list picker binding object is only available in MDK 24.4 and above.

 

Angelo_Ab
Explorer
0 Kudos

@bill_froelichYes, probably this is the problem.

For debug purpose I had an older MDK Client(23+) for build and debug apps in VSCode.

I downloaded the 24.7.3 MDKClient. Now i have a new problem, after "create-client" and after "tns run android --device XXX" i can't authenticate in the app because after the Log In Button i got a "HTTP Status 400".

The BrandedSettings.json was the same of previous app, I checked all the ConnectionSettings and seems to be ok.

What else I can check ?

Thank you

bill_froelich
Product and Topic Expert
Product and Topic Expert
0 Kudos
I would double check your connection settings. You mentioned downloading the 24.7.3 Client. Did you download it from the Play Store? If so you should verify your connection settings since there may be changes in your Branded Client that are not part of the Generic client.
Angelo_Ab
Explorer
0 Kudos

I tried to remove the template folder and recreate and worked.

What I meant to say is that I downloaded the MDK Client SDK from SAP Download Center, i do not use the MDK Client from Play Store because I need to debug the App trough Android Studio Device Simulator and VSCode.

I do not know if there is another way to debug directly from device.