Saving Scan timestamp before delayed sheets upload

my first bar code scan entry is blank. then after all i is done.. i want even timestamp entry too at of the time when one had scan and not the time of entry when it become online. please suggest what am doing wrong

You did not include the event that catches the bar code scan result.

That's the place where you should capture the timestamp and start your upload attempt.

You should not be trying any of that in the Button click event where you initiate the scan, because the information is not yet available.

thanks for support. my intentions was not to keep 2 separate buttons. in that case how can be even in block can be enter in same button. how block can arrange. please suggest.

You don't need two buttons...when you call to "DoScan" the result is received in AfterScan block (result parameter).


In that block is where you have the result of your scan and in that block is where you must to place your Web call.

BarcodeScanner.Result has not value where you are using it currently.

then in that case "next" "do" with web block will be not working right?
am confuse now

If you want to use the result of the scan, then you have first to scan, and get the result of it. Then use it in whenever you want.

If OnConnect event is triggered before you have scan and get the result...then you will have the same problem.

Anyway, when, you are trying to scan and, if connected, send the data. But, in next procedure, it is supposed that the data you want to send is stored in "unsentdata" you have already stored in the list all the necessary data (textboxes and scan result) and you can get them from it.

Other weird point is that you are trying to recover data from TinyDB, but you are not storing anything.


Motive is,

  • Data Contain username, QR code scan result, Timestamp.
  • When there is no net then data to get store offline.
  • When Mobile have net then data will shift to google sheet.
  • While it shifts to google sheet timestamp should be same when QR code being scanned.

I never studied offline storage like TinyDB but seen one program and tried to set same block with some changes in my app.

Please check my codes, and please suggest what changes can be done.

tinybtrail.aia (12.8 KB)

Then, store here the data in TinyDB to be sent later.

When you connected, then check tinyDB if there is stored data to be sent. All the fields are stored so, you don't need to scan again. Only, send the data, and remove it from tinyDB, once it is sent.

When initializing, check if there is connection and if so, check if there is data stored in tinyDB to be sent (again, when sent, remove it from tinyDB).

its resolved. thanks.