Sample simple code for Barcode Scanner. for Reference thank you! 

Sample simple code for Barcode Scanner. for Reference thank you! 

  

I just want to be clear from scratch for Barcode Plugin , How to use it and how to put it in a app, how it works. Thank you i know  that this link https://www.outsystems.com/forums/discussion/19419/outsystems-now-barcode-help/ its not enough for me to understand it well from scratch. I just want to make my barcode app from scratch. Thank you and Have a nice day! Programmers and Developers

After I created a new Mobile App, I opened the Manage Dependencies dialog and found the BarcodePlugin and clicked on it.  Then I checked on the topmost checkbox to ensure all checkboxes were checked.

Then I did the same for the CommonPlugin since the BarcodePlugin depends upon the CommonPlugin.

Attached is an OML which has 1 button, and 1 Input Textbox.  The Button OnClick event calls the btnBCScanOnClick Client Action.  Double-click this Action to see what it does... it's really straight forward.

In the Action I am checking for a network connection which isn't really needed... so you can delete those nodes if you want.

The Input Widget is tied to a Local Variable named varBCNbr.  In the Action, once I have scanned the BarCode, its results are assigned to this variable... and so... show up in the Input Textbox.

In the Action you'll see 2 Client Actions... CheckBarcodePlugin and ScanBarcode.  These are placed into the logic flow by clicking on the Logic tab (top right corner of UI) and expanding the BarcodePlugin Reference... and then dragging the Action you want onto the flow.

Hope this helps.




Davidk wrote: Good day, how can i get the barcode number of the barcode 

After I created a new Mobile App, I opened the Manage Dependencies dialog and found the BarcodePlugin and clicked on it.  Then I checked on the topmost checkbox to ensure all checkboxes were checked.

Then I did the same for the CommonPlugin since the BarcodePlugin depends upon the CommonPlugin.

Attached is an OML which has 1 button, and 1 Input Textbox.  The Button OnClick event calls the btnBCScanOnClick Client Action.  Double-click this Action to see what it does... it's really straight forward.

In the Action I am checking for a network connection which isn't really needed... so you can delete those nodes if you want.

The Input Widget is tied to a Local Variable named varBCNbr.  In the Action, once I have scanned the BarCode, its results are assigned to this variable... and so... show up in the Input Textbox.

In the Action you'll see 2 Client Actions... CheckBarcodePlugin and ScanBarcode.  These are placed into the logic flow by clicking on the Logic tab (top right corner of UI) and expanding the BarcodePlugin Reference... and then dragging the Action you want onto the flow.

Hope this helps.






I'm not sure what you mean.  In the attached app, you tap the button with the barcode icon on it... the device camera will open and a red line acts as a guide to scan your barcode.  Once scanned, the barcode number will show in the textbox.

Thanks! Last question. Once the barcode number appears, how can I get the last digit number of the barcode? I cant disseminate it. Sorry if im new at outsystems, im an android studio developer for android. I want to learn at your community more. And also I want to be a part of outsystems. Thank youuu !! 

That really depends on how you want to get the last digit... and where... and what for.

For example, you could add another Input Box and Local Variable to the Screen... and in the Flow add another Assign node.

Or... you could add a Button which calls an Action which contains a Javascript node.  The barcode would be passed into the JS node as a parameter and you'd then grab the last digit and pass that number back out.

The button Action would have an Input Param which the JS node would get via it's properties.

The Javascript would then grab the last digit and assign the JS node Output param that value.

An Assign widget would then grab that Output param and assign it to an Input widget.

The attached OML goes through both of these options.

Thank you for your reply. I ll check and study my case.! Thank you sir David, Can i be your mentor. If i had a problem here in outsystems. First of all i am new here at using your programming platform. Im an android developer here at the Philippines at country's number one mall and services company named SM Retail Corporation. They wanted me to study outsystems for our future projects and studies .