<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Sap Build Qr Code Generator in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-build-qr-code-generator/m-p/13744651#M2039766</link>
    <description>&lt;P&gt;Just a quick look at your first image (where you have the script that actually prepares the qr code) you seem to lack the .makeCode() method.&amp;nbsp;&lt;/P&gt;&lt;P&gt;So what you have written is this part:&amp;nbsp;&lt;/P&gt;&lt;P&gt;```&lt;BR /&gt;&lt;SPAN&gt;const qrcode = new QRCode("test", {&lt;BR /&gt;text: "&lt;A href="https://google.com" target="_blank"&gt;https://google.com&lt;/A&gt;",&lt;BR /&gt;width: 128,&lt;BR /&gt;height: 128,&lt;BR /&gt;colorDark : "#000000",&lt;BR /&gt;colorLight : "#ffffff",&lt;BR /&gt;correctLevel : QRCode.CorrectLevel.H&lt;BR /&gt;});&lt;/SPAN&gt;&lt;BR /&gt;```&lt;BR /&gt;&lt;BR /&gt;But this just creates the object of the qr code, that will not yet actually generate the qr code. At least as per the docs based on a quick google search here: &lt;A href="https://davidshimjs.github.io/qrcodejs/" target="_blank" rel="noopener"&gt;qr code js by davidschimjs&lt;/A&gt;&amp;nbsp;&lt;BR /&gt;So my suggestion that instead of the&amp;nbsp;&lt;BR /&gt;```&lt;BR /&gt;return qrcode;&lt;BR /&gt;```&lt;BR /&gt;write:&amp;nbsp;&lt;BR /&gt;```&lt;BR /&gt;return qrcode.makeCode();&lt;BR /&gt;```&lt;BR /&gt;&lt;BR /&gt;I have not tried it yet, but as far as I can see in the codepen on the docs it returns a base64 string. So make sure to handle that in your code or the logic canvas accordingly.&amp;nbsp;&lt;BR /&gt;Suggestions:&amp;nbsp;&lt;BR /&gt;1. Turn the base64 code into a blob and return the blob url in js.&amp;nbsp;&lt;BR /&gt;2. Return the base64 string and use a 'write file' flow function where you actually store that as a local file and can use it in the image preview. Or you can also upload it to storage if that's something that you would need to do.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Let me know if this helps.&lt;BR /&gt;&lt;BR /&gt;PS, I like the way how you utilise the 'globalThis', I was not aware of that prior to your post. Does the globalThis work on the native version of the apps (preview and build) or only on the web runtime?&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 27 Jun 2024 12:31:42 GMT</pubDate>
    <dc:creator>mihaly-toth-nc</dc:creator>
    <dc:date>2024-06-27T12:31:42Z</dc:date>
    <item>
      <title>Sap Build Qr Code Generator</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-build-qr-code-generator/m-p/13656788#M2039764</link>
      <description>&lt;P&gt;Hey, Im currently trying to code a qr code generator by input data per SAP Build apps i tried calling an api also tried require to generate yet. Im facing the issue that it either doesnt understand the api or doesnt understand my code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Apr 2024 06:41:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-build-qr-code-generator/m-p/13656788#M2039764</guid>
      <dc:creator>fatihhan_aybirdi</dc:creator>
      <dc:date>2024-04-03T06:41:08Z</dc:date>
    </item>
    <item>
      <title>Re: Sap Build Qr Code Generator</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-build-qr-code-generator/m-p/13741374#M2039765</link>
      <description>&lt;P&gt;Hello fatihhan_aybirdi,&lt;/P&gt;&lt;P&gt;your second screenshot shows that the output is "undefined".&lt;BR /&gt;You have to decide what type should the QR code be.&lt;BR /&gt;Inside the "output" configurations you have to define it (make it fit your data type).&lt;BR /&gt;&lt;BR /&gt;My experience so far with QR codes is:&lt;BR /&gt;If you get the QR code as an IMG url, choose the IMG url to display it.&lt;BR /&gt;If you get the QR code back as an SVG+XML data string, use the "Dynamic SVG Image" element from the market place.&lt;BR /&gt;&lt;BR /&gt;I experienced issues with the SAP Build Apps Preview app. It worked flawlessly inside the browser on the Desktop(Laptop) device. But the mobile device wasn´t working (iOS).&amp;nbsp;&lt;BR /&gt;Using the Dynamic SVG Element made it work on mobile, too!&lt;/P&gt;&lt;P&gt;Hope that helps.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Koni_0-1719256627552.png" style="width: 400px;"&gt;&lt;img src="https://community.sap.com/t5/image/serverpage/image-id/128192iAA9220E3D9F420AE/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Koni_0-1719256627552.png" alt="Koni_0-1719256627552.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 24 Jun 2024 19:17:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-build-qr-code-generator/m-p/13741374#M2039765</guid>
      <dc:creator>Koni</dc:creator>
      <dc:date>2024-06-24T19:17:14Z</dc:date>
    </item>
    <item>
      <title>Re: Sap Build Qr Code Generator</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-build-qr-code-generator/m-p/13744651#M2039766</link>
      <description>&lt;P&gt;Just a quick look at your first image (where you have the script that actually prepares the qr code) you seem to lack the .makeCode() method.&amp;nbsp;&lt;/P&gt;&lt;P&gt;So what you have written is this part:&amp;nbsp;&lt;/P&gt;&lt;P&gt;```&lt;BR /&gt;&lt;SPAN&gt;const qrcode = new QRCode("test", {&lt;BR /&gt;text: "&lt;A href="https://google.com" target="_blank"&gt;https://google.com&lt;/A&gt;",&lt;BR /&gt;width: 128,&lt;BR /&gt;height: 128,&lt;BR /&gt;colorDark : "#000000",&lt;BR /&gt;colorLight : "#ffffff",&lt;BR /&gt;correctLevel : QRCode.CorrectLevel.H&lt;BR /&gt;});&lt;/SPAN&gt;&lt;BR /&gt;```&lt;BR /&gt;&lt;BR /&gt;But this just creates the object of the qr code, that will not yet actually generate the qr code. At least as per the docs based on a quick google search here: &lt;A href="https://davidshimjs.github.io/qrcodejs/" target="_blank" rel="noopener"&gt;qr code js by davidschimjs&lt;/A&gt;&amp;nbsp;&lt;BR /&gt;So my suggestion that instead of the&amp;nbsp;&lt;BR /&gt;```&lt;BR /&gt;return qrcode;&lt;BR /&gt;```&lt;BR /&gt;write:&amp;nbsp;&lt;BR /&gt;```&lt;BR /&gt;return qrcode.makeCode();&lt;BR /&gt;```&lt;BR /&gt;&lt;BR /&gt;I have not tried it yet, but as far as I can see in the codepen on the docs it returns a base64 string. So make sure to handle that in your code or the logic canvas accordingly.&amp;nbsp;&lt;BR /&gt;Suggestions:&amp;nbsp;&lt;BR /&gt;1. Turn the base64 code into a blob and return the blob url in js.&amp;nbsp;&lt;BR /&gt;2. Return the base64 string and use a 'write file' flow function where you actually store that as a local file and can use it in the image preview. Or you can also upload it to storage if that's something that you would need to do.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Let me know if this helps.&lt;BR /&gt;&lt;BR /&gt;PS, I like the way how you utilise the 'globalThis', I was not aware of that prior to your post. Does the globalThis work on the native version of the apps (preview and build) or only on the web runtime?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jun 2024 12:31:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-build-qr-code-generator/m-p/13744651#M2039766</guid>
      <dc:creator>mihaly-toth-nc</dc:creator>
      <dc:date>2024-06-27T12:31:42Z</dc:date>
    </item>
  </channel>
</rss>

