Two digit number not displaying on label



I am having strange problem with my UI. I have barcode scanner in my phone so I am scanning barcode and storing it to observable array (That’s working fine). I also have one label where I am displaying length of array.
everytime I add new item the label text is changing as per length of array but once the length increase to 10 it’s stop displaying in UI.


          <Label length="4" text="{{ qty }}" />


          var qty = dockReceive.wayBills.length

model class dockReceive

    var observableModule = require("data/observable");
    var observableArrayModule = require("data/observable-array");

 function DockReceive(info) {
 info = info || {};
console.log("in dock receive");

   var viewModel = new observableModule.fromObject({

  wayBills: info.wayBills || new observableArrayModule.ObservableArray(),
   qty: info.qty || 00,
 return viewModel;
 module.exports = DockReceive;

Please help me to find out solution for this strange problem.


Try using dockReceive.set("qty", qty.toString()); instead.


no that’s not working


Is it issue Android / iOS? Can you try reproducing the issue with Playground?


This issue is on android device.
how can I implement barcode scanner thing in playground?


Do you see any errors in console already? Also give this a try

var isAndroid = require("platform").isAndroid;
dockReceive.set("qty", isAndroid ? java.lang.String.valueOf(qty) : qty);


in console I can see changes of qty though it went pass 9 but I am not able to see on UI. If I navigate back to previous page and Come back to same page Then number start displaying.

I have tried your code but same problem.


I assumed it may be type casting problem, looks like not. You may try sharing a clean sample project where we can see the issue.


one more thing I have two mechanism to add data in list view

  1. Using Barcode Scanner (Broadcast receiver through) - problem
  2. enter manually and click on add this is working perfectly fine.


Could you make a reproducible sample and upload it on github? Perhaps the 2 digit number is treated like a character code, and that’s the reason it isn’t being displayed


I tried this


it’s still not displaying number so I try to reproduce it in playground and it worked perfectly there here is the link -


I thought so, which is why I expected java.lang.String.valueOf to solve this problem, but it didn’t do it seems :disappointed_relieved:

@radhe12 Try sharing a clean sample through Github.


Strange but this is my solution. I added width property of label

           <StackLayout orientation="horizontal" row="3" column="0" id="wbcount" visibility="hidden">
           <Label text="Received Waybill(s) :  " width="55%" /><Label text="{{rwbqty}}" width="40%" />