web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Pages / URL that fills in form...
Power Pages
Unanswered

URL that fills in form automatically

(0) ShareShare
ReportReport
Posted on by 4
Good morning, could someone tell me, how to create a url that automatically fills in x data in power apps?

 

Categories:
I have the same question (0)
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @RaquelViana ,

    So can you please give us a use a case so we can help? for example are u trying to add a button in portal that if customer click on it , takes them to form that will have field prefilled like contact/account etc.?

    if yes then its doable using liquids and js  

  • RaquelViana Profile Picture
    4 on at
     
     
    I have a database of machines, and these machines will have a Qr code, containing machine information, such as serial number, in that same Qr I would like to put a hyperlink, where when clicking on this hyperlink, it would redirect me to a form power apps, where it would automatically fill in the data of that machine, such as the serial number, the name, etc...
  • Christian Leverenz Profile Picture
    1,214 on at

    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  🙂

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Pages

#1
11manish Profile Picture

11manish 34

#2
Valantis Profile Picture

Valantis 30

#3
omkarsupreme Profile Picture

omkarsupreme 23

Last 30 days Overall leaderboard