QR Code image Bug

I have an app to randomly generate a unique password based on criteria I pass to it and then the app generates a QR code image. Everything works great except 2 things.
When using a string of text that contain a “%” or “&” sign, the image will not show in the app.

EXAMPLE:
-My [Password] column has the following text “%”
-Virtual column as text =ENCODEURL([Password])
This will kick out a result of “%25”
-Virtual column [QR Code] that is set as an image with the following app formula:
=CONCATENATE(“https://chart.googleapis.com/chart?chl=”, [ENCODEURL], “&chs=200x200&cht=qr&chld=H%7C0”)
-If I take the [QR Code] output, I get the following URL
https://chart.googleapis.com/chart?chl=%&chs=200x200&cht=qr&chld=H|0
Screen Shot 2021-04-02 at 12.43.39 PM
-I can paste this in a web page and it displays the QR code. The app just shows a triangle
Screen Shot 2021-04-02 at 12.44.02 PM

This also happens with the “&” sign or any string of text with those two symbols in it. All other characters work great. Any ideas?!

1 Like

Here is another example

Results from app
[Password] VNAn&gc#HONg
ENCODEURL([Password]) VNAn%26gc%23HONg
[QR Code] https://chart.googleapis.com/chart?chl=VNAn%26gc%23HONg&chs=200x200&cht=qr&chld=H|0
App image results
https___chart.googleapis
If you scan the QR code from the app, you only get characters up to the

If you paste the ENCODEURL([Password]) into a webpage, it displays all characters.
Screen Shot 2021-04-02 at 12.54.35 PM

1 Like

just wanted to resurface this to see if there are any fixes…

Could you please try the following?

Please
1)convert the [QR Code] column to Text type, leaving the expression as it is.
2) add another VC called say [QRCodeFinal] as Image type and with an app formula of
ENCODEURL([QR Code])

Could you check if this [QRCodeFinal] VC produces QR code image as desired?

That is the way I have always had it setup but just to be safe I deleted the original VC’s and rebuilt them and I get the same results. It will not produce an image if the “&” or “%” are in the string.

Thank you for the update. Sorry to understand it does not work for you.

I had of course tested it before suggesting but maybe I am missing some point. Just in case it helps, below are two screenshots from the detail view in the test app. I have used the identical [Password] field text strings you have shared and relevant columns are also progressively displayed starting from ]Password] to [Final QR Code] along with barcode image.

Password: “%”

Password: VNAn&gc#HONg

Still no dice. I have 3 VC’s in an attempt to get this to work.
[Password Text] type text

VC [ENCODE Password] type text Expression: ENCODEURL([Password Text])
VC [ENCODE Website] type text Expression: CONCATENATE(“https://chart.googleapis.com/chart?chl=", [ENCODE Website] ,“&chs=200x200&cht=qr&chld=H%7C0”)
VC [QR Code Image] type image Expression: [ENCODE Website]

As you can see, the app will not display the QR Code Image with a password of “%”

Please note changes below

  1. Columns [Password Text] and [ENCODE Password] need no changes in the expression and type.

The above expression needs to be as below ( Please note the highlighted change below in expression You seem to have used the same column [ENCODE Website] in the expression of the column.

CONCATENATE(“https://chart.googleapis.com/chart?chl=", [ENCODE Password] ,“&chs=200x200&cht=qr&chld=H%7C0”)
Type : Text is correct.

The above expression needs to be as below. Please wrap it with ENCODEURL() again.

ENCODEURL([ENCODE Website])
Type image is correct

Strictly speaking, I believe three VCs are not required, those could be possibly converted into one VC with a combined expression. I had used 3 VCs to describe the concept in steps.

BEAUTIFUL!
The issue was in my image column. I had a VC type Image with the expression [ENCODE Website]
The solution
VC type Image with the expression ENCODEURL([ENCODE Website])

I had assumed that since I was encoding the url already, that I could just put that in an image column with no need to encode it again.

Thank you!!!

1 Like

Yes , exactly that was my suggestion right from from the first post as below :slight_smile:

Good to know it works. Yes the character “%” is used by the ENCODEURL() as a substitute for other special characters. So eventhough you had URL encoded the [Password} column, I believe the concatenated long URL text in [ENCODE Website] column , needed another ENCODEURL() to take care of % and & in the URL

I had seen you following up on your post for solution , so I ensured I test it well before suggesting. Again nice to know it works. All the best.

1 Like