web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Is there a way to gene...
Power Apps
Answered

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

(1) ShareShare
ReportReport
Posted on by 75

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. 

Categories:
I have the same question (0)
  • RandyHayes Profile Picture
    76,297 Super User 2024 Season 1 on at

    @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.

  • Priti1 Profile Picture
    75 on at

    @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. 

  • Verified answer
    RandyHayes Profile Picture
    76,297 Super User 2024 Season 1 on at

    @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. 

  • Verified answer
    Priti1 Profile Picture
    75 on at

    @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,

  • PurpleDeveloper Profile Picture
    135 on at

    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 Profile Picture
    76,297 Super User 2024 Season 1 on at

    @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.

  • PurpleDeveloper Profile Picture
    135 on at

    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 Profile Picture
    76,297 Super User 2024 Season 1 on at

    @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.

  • PurpleDeveloper Profile Picture
    135 on at

    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. 

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 721 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard