cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Priti1
Helper I
Helper I

Is there a way to generate the barcode using power apps?

Hello, 

Is there a way to generate the barcode through free API using power apps? 

for example - when I enter the custom values in the text input field it generate the barcode in the HTML text. 

I have watched this video (https://youtu.be/3-GuyDtViXI) on YouTube but the http://barcodes4.me has been discontinued. 

Thank you in advance for any help or suggestions. 

2 ACCEPTED SOLUTIONS

Accepted Solutions
RandyHayes
Super User
Super User

@Priti1 

Yes, you would just need to put that in your formula:

Example. If you have a TextInput control called txtBarCode then you can change your image formula to the following:

"https://www.barcodesinc.com/generator/image.php?code=" & txtBarCode.Text & "&style=197&type=C128B&width=167&height=50&xres=1&font=3"

Whatever you type into the text input will display a barcode for that value. 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

@RandyHayes 

You are great. Thank you so much! 

I have tried the barcode instead of the QR code and it worked well. 

 

Here is the formula I used on the HTML Text  property- "<img src='http://bwipjs-api.metafloor.com/?bcid=code128&text=" & TextInput1.Text & "'>". 

 

Thanks,

View solution in original post

9 REPLIES 9
RandyHayes
Super User
Super User

@Priti1 

You will not be able to generate Barcodes directly in PowerApps.  You can use an image control and set it to any barcode generating site of your choice in the Image property.

For example, an Image control with the Image property set to :

"https://www.barcodesinc.com/generator/image.php?code=123456789&style=197&type=C128B&width=167&height=50&xres=1&font=3"

Will give you a barcode for 123456789

 

You will not have a lot of luck with this for the HTML in the app, but just fine for an image.

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

@RandyHayes 
Thank you for your quick response. So, the link that you shared will only generate the code for 123456789.

Is there a way to connect that barcode to the text input field? So that the barcode generate based on the value we enter in the text input field? 
Thank you for your help. 

RandyHayes
Super User
Super User

@Priti1 

Yes, you would just need to put that in your formula:

Example. If you have a TextInput control called txtBarCode then you can change your image formula to the following:

"https://www.barcodesinc.com/generator/image.php?code=" & txtBarCode.Text & "&style=197&type=C128B&width=167&height=50&xres=1&font=3"

Whatever you type into the text input will display a barcode for that value. 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

@RandyHayes 

You are great. Thank you so much! 

I have tried the barcode instead of the QR code and it worked well. 

 

Here is the formula I used on the HTML Text  property- "<img src='http://bwipjs-api.metafloor.com/?bcid=code128&text=" & TextInput1.Text & "'>". 

 

Thanks,

Hi @RandyHayes,

 

The link used in the URL to generate barcode is free to use and can reliably be used for our production apps?

RandyHayes
Super User
Super User

@PurpleDeveloper 

Choose your sources wisely!!  The barcode is reliable, not sure on the provider. Luckily there are a bunch of them out there to choose from.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

Thanks, @RandyHayes.

 

Could you please suggest other sources which are most commonly used?

 

Also, what needs to be added in below link to add the text in the barcode ? 

"https://www.barcodesinc.com/generator/image.php?code=" & txtBarCode.Text & "&style=197&type=C128B&width=167&height=50&xres=1&font=3"

 

I tried adding &includecode but didn't work.

 

Appreciate your help!

RandyHayes
Super User
Super User

@PurpleDeveloper 

Not really sure of other ones that may be more or less reliable.  If you do a search for Online Barcode Generator - you will find lots of results.

 

I am not sure what &includecode is, so I can't give much guidance on that.  The "txtBarCode.Text" part of the URL is what you would change to adapt to your app.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

Thanks @RandyHayes.

 

Nevermind I got the solution of having text in barcode. It was coming by adding &style=197 in the URL which I took out while I was testing. 

 

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (2,282)