Hi @RaquelViana ,
if i was to do it, i would just create a url on that qrcode which contains the parameters as get parameters. The names of the parameters are not that important as you have to map them depending on your application.
so, the qr-url could be something like https://mygreatpowerappsportal.com/?machineid=4711&serialnum=0815&name=doorwatcher
I would highly recommend to add a kind of checksum to the data in the qr-code, so that your site isnt easily scannable. So you should add sth like &myinfo=4123874521387452187 which might be as simple as a random number or a complete jwt base64 encoded info. As you will give the qr-codes to your customers you should at least somehow integrate the seralnumber and machineid in the checksum and store it along in your dataverse so that you can verify that code.
So, then you create a template in power apps portals as @Anonymous mentions and you can access the data via
{% assign machineid = request.params["machineid"] %}
{% assign serialnum = request.params["serialnum"] %}
{% assign myinfo = request.params["myinfo"] %}
Then you eithe make a check via fetch, that that specific machine exists and has the right cheksum or if you do not care, pass the variables over to js on the page and prefill the data on the form. could be like:
<script>
var mydata = {
machineid : "{{ machineid }}"
,serialnum : "{{ serialnum }}"
,myinfo : "{{ myinfo }}"
}
$(document).ready(
function() {
$("#logicalnameofmymachine").val(mydata.machineid);
$("#logicalnameofserialnum").val(mydata.serialnum);
$("#logicalnameofmyinfo").val(mydata.myinfo);
}
);
</script>
I think, you get the idea 🙂
Hope this helps,
Christian
PS we are talking about power apps ports here. Was the question haow to prefill them in powerapps? Then forget about the above stuff and may be raise that question in the power apps forum: https://powerusers.microsoft.com/t5/Building-Power-Apps/bd-p/PowerAppsForum1 🙂