cancel
Showing results for 
Search instead for 
Did you mean: 

BindingObject of a selected list picker item

Angelo_Ab
Participant
0 Kudos
368

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
Amisha1
Newcomer

access the selected value from the ListPicker, such as using a TargetPath to retrieve the binding directly:

 

 

let selectedBinding = clientAPI.evaluateTargetPath("Page:CreateSalesOrderItem/Control:ListPicker/SelectedValue");