cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Shiva506
Level: Powered On

How to generate QR code and value when onclick button in Powerapps and that should be saved in SharePoint List

I am trying to generate QR code and its value, and those two should be save sharePoint list (two diff columns, one is picture or hyperlink data type and other single of text) when click on button.

 

If I go with Barcode everything is fine. But here I need QR Code

I am able to generate QR code but not a QR Code value and not able save in SharePoint list

 

Can anyone help me on this?

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: How to generate QR code and value when onclick button in Powerapps and that should be saved in SharePoint List

Hi @Shiva506 ,

Could you please share a bit more about your scenario?

How do you generate the QR Code within your app?

Do you want to save the QR Code picture into the 'picture or hyperlink' column in your SP List?

Further, do you want to recognize the QR Code value within your app with the generated QR code?

 

Firstly, if you want to recognize the QR Code value within your app with the generated QR code, I afraid that there is no way to achieve your needs in PowerApps currently.

Currently, there is no way or functions supported to analyze an QR Code generated within a PowerApps app. If you would like this feature to be added, please submit an idea to PowerApps Ideas Forum:

https://powerusers.microsoft.com/t5/PowerApps-Ideas/idb-p/PowerAppsIdeas

 

I agree with @RusselThomas 's thought almost. Actually, the QR Code value based on how do you generate the QR Code. As an alternative solution, you could consider add a Text Input box in your app to collect the QR Code value you want to type, then based on the typed QR Code value, generate an QR Code:2.JPG

Add a Image control in your app, set the Image property to following:

 

"https://chart.googleapis.com/chart?cht=qr&chl=" & TextInput1.Text &"&chs=100x100"

More details about generating a QR Code using Google charts, please check the following article:

 

https://developers.google.com/chart/infographics/docs/qr_codes

 

In addition, if you want to save the generated QR code picture and QR code value into your SP List, I think the Patch function could achieve your needs.

Firstly, you should set the Type of the "picture or hyperlink" column (Picture column) to Hyperlink rather than Picture as below:3.JPG

If you set the Type of the "picture or hyperlink" column to Picture, the "picture or hyperlink" column would be acted as Read-Only column in your app, which you could not specify a value for it.

Please take a try with the following workaround to saving QR Code and QR Code value into a SP list:4.JPG

Set the OnSelect property of the "Patch" button to following:

 

Patch('20190701_case7', Defaults('20190701_case7'), {Title: TextInput1.Text, UploadedPicture: Image1.Image})

On your side, you may type the following formula:

 

 

Patch(
'YourSPList',
Defaults('YourSPList'),
{
Title: "QR Test",
QRCodeValueColumn: TextInput1.Text,
PictureColumn: Image1.Image
}
)

5.JPG

 

More detais about the Patch function, please check the following article:

Patch function

 

Best regards,

 

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
Super User
Super User

Re: How to generate QR code and value when onclick button in Powerapps and that should be saved in SharePoint List

Hi @Shiva506 ,

It depends on how you're getting the QR code generated in the first place.  If you care to expand on that, perhaps we can find the best way to get the Code image and it's value into SPO?

In general, you would need to use Flow to save the image content to SPO, but as I said, it depends on how you're getting the QR code generated in the first place.

Kind regards,

RT

Community Support Team
Community Support Team

Re: How to generate QR code and value when onclick button in Powerapps and that should be saved in SharePoint List

Hi @Shiva506 ,

Could you please share a bit more about your scenario?

How do you generate the QR Code within your app?

Do you want to save the QR Code picture into the 'picture or hyperlink' column in your SP List?

Further, do you want to recognize the QR Code value within your app with the generated QR code?

 

Firstly, if you want to recognize the QR Code value within your app with the generated QR code, I afraid that there is no way to achieve your needs in PowerApps currently.

Currently, there is no way or functions supported to analyze an QR Code generated within a PowerApps app. If you would like this feature to be added, please submit an idea to PowerApps Ideas Forum:

https://powerusers.microsoft.com/t5/PowerApps-Ideas/idb-p/PowerAppsIdeas

 

I agree with @RusselThomas 's thought almost. Actually, the QR Code value based on how do you generate the QR Code. As an alternative solution, you could consider add a Text Input box in your app to collect the QR Code value you want to type, then based on the typed QR Code value, generate an QR Code:2.JPG

Add a Image control in your app, set the Image property to following:

 

"https://chart.googleapis.com/chart?cht=qr&chl=" & TextInput1.Text &"&chs=100x100"

More details about generating a QR Code using Google charts, please check the following article:

 

https://developers.google.com/chart/infographics/docs/qr_codes

 

In addition, if you want to save the generated QR code picture and QR code value into your SP List, I think the Patch function could achieve your needs.

Firstly, you should set the Type of the "picture or hyperlink" column (Picture column) to Hyperlink rather than Picture as below:3.JPG

If you set the Type of the "picture or hyperlink" column to Picture, the "picture or hyperlink" column would be acted as Read-Only column in your app, which you could not specify a value for it.

Please take a try with the following workaround to saving QR Code and QR Code value into a SP list:4.JPG

Set the OnSelect property of the "Patch" button to following:

 

Patch('20190701_case7', Defaults('20190701_case7'), {Title: TextInput1.Text, UploadedPicture: Image1.Image})

On your side, you may type the following formula:

 

 

Patch(
'YourSPList',
Defaults('YourSPList'),
{
Title: "QR Test",
QRCodeValueColumn: TextInput1.Text,
PictureColumn: Image1.Image
}
)

5.JPG

 

More detais about the Patch function, please check the following article:

Patch function

 

Best regards,

 

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (6,546)