allandecastro / BarCode

BarCode is a barcode generator written in JavaScript (based on JsBarcode). It supports multiple barcode formats and the visual aspect can be modified.
MIT License
3 stars 4 forks source link

Unmanaged ZIP Uploaded to a Power App Environment #13

Open ricardoteixxeira opened 1 month ago

ricardoteixxeira commented 1 month ago

I have successfully uploaded the package into my unmanaged solutions, then I opened my custom table where there was a simple text field, I was able to add the control "barcode generator" and see all the configs there, but no one worked, the field always shows as empty. That's for model-driven app.

allandecastro commented 1 month ago

Hello Ricardo,

Does the field actually contain data? Does refresh show the barcode?

This PCF is quite old, and may no longer be working :/

ricardoteixxeira commented 1 month ago

Hello Allan, thanks for your reply. This solution would be perfect in the context I want to use it, however I couldn't make it happen. As per your question, as soon as I assign the barcode generator as a component for the text field called "barcode" it doesn't allow me to type anymore, I understand that the text we want to show along with the barcode should be filled in the option "text" where you can either associate with another column or create a static value, I've tested with both and no one worked. If you have no idea what I could try on my side to fix it do you happen to know another option to use barcode within dataverse (model-driven app)?

allandecastro commented 1 month ago

@ricardoteixxeira : Can you try to add two times your field on the form ? One field without the PCF allowing you to enter the data and the other one for which the component is setup.

ricardoteixxeira commented 1 month ago

2024-08-12_13-34 Yes, now I have the "barcode" one with the PCF and the "test" one as a simple text field as you can see in the screenshot. I tried also to associate the "test" one in the PCF text field. BTW this isn't for commercial use, this a Microsoft Nonprofit tenant where I'm trying to create a library for them as a volunteer.

allandecastro commented 1 month ago

And when you reload the form/browser tab, is the bar code displayed ? You must ensure that it's a correct format too. Maybe you can check the developers console if some errors are displayed ?

Otherwise I will have to reproduce it on my side :/

ricardoteixxeira commented 1 month ago

I'm trying to don't play with all the options it has just to make sure it is working prior to start the customization. Therefore, as soon as I assign the PCF to the text field it comes with the EAN13 format, as per the developers it is a 13 character long format, they also give us an example such as 1234567890128. So, the simpler way I have done on my side was:

  1. Create a text field column (Barcode).
  2. Assign the PCF to the column.
  3. Leave the default options as it is (EAN13).
  4. Define a static value for the text in the PCF options, such as 1234567890128, close it and save/publish.
  5. Create a new record, fill out the required fields, save it and refresh the page to see the results.

Unfortunately by following these steps the bar code doesn't show up.