4

I need through a QR code give an https address, with parameters, like https://MyWebSite/Mywebpage?Myparam=1234. The objective is to open a specific page of MyWebsite, and pass the parameter MyParam for further use in the page (i.e. prefill specific fields depending on the value passed).

I do not find the correct way of setting up this string, knowing that: https://MyWebSite/Mywebpage is a constant, as well as ?Myparam= and 1234 is the content of an attribute field in the shapefile. The problems start with the char ? That does not seem to be accepted/recognised.

I tested with the concat function, or with double pipes, but without success, the concat does not seem to be executed and is literally part of the QR code generated.

Any idea to have it work?

I also posted this question on github/qrbarcodeitem-plugin.

3
  • Are you working on Windows?
    – Taras
    Mar 19 at 18:46
  • Where do you try to make the string? Mar 19 at 19:30
  • Windows, QGIS 3.28.4. I edit in the plugin.
    – ClaudeVer
    Mar 20 at 6:49

1 Answer 1

4

This expression worked:

[%'https://MyWebSite/Mywebpage?Myparam=' ||
attribute(
  @atlas_feature,
  'value'  -- field name containing 1234 etc.
)%]

Expression window:
enter image description here

enter image description here

QR Code online decoder:
enter image description here

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.