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 / Autopopulate fields in...
Power Pages
Unanswered

Autopopulate fields in form of portal

(0) ShareShare
ReportReport
Posted on by 4

Hi, 

Is it possible to automatically populate fields based on data selected in the other fields in the Power Portal Forms ?
Eg: I have table ProductID, Name and Price. When the user selects ProductID, Name and Price should be filled in automatically.

Thanks in advance !

Categories:
I have the same question (0)
  • H V Profile Picture
    1,510 on at

    Hi @SaraRao 

     

    Yes, it is possible. You have to trigger onchange event of ProductId field. When user select/change the ProductId field, you can retrieve data of Name and Price fields.

    $(document).ready(function(){
     $("#new_logicalname").change(function () {
     // Get value of your trigger field
     let currentVal = $("#new_logicalname").val();
     
    	//Retrieve data using WebApi based on your requirements
    		
     });
     });

     

    Please refer this links: 

    https://docs.microsoft.com/en-us/power-apps/maker/portals/web-api-overview

    https://docs.microsoft.com/en-us/power-apps/maker/portals/read-operations

     

    You can retrieve data using below code:

    function getResponseData() {
     var response = null;
     try {
     $.ajax({
     type: "GET",
     url: "https://contoso.powerappsportals.com/_api/accounts(e0e11ba8-92f6-eb11-94ef-000d3a5aa607)",
     dataType: "json",
     cache: false,
     }).done(function(json) {
     response = json;
     });
     } catch (e) {
     console.log("getResponse :: " + e.message);
     }
     return response;
    }

     

    --------------------------
    If you like this post, give a Thumbs up. Where it solved your query, Mark as a Solution so it can help other people!

     

     

     

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 Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Pages

#1
sannavajjala87 Profile Picture

sannavajjala87 42 Super User 2026 Season 1

#2
Valantis Profile Picture

Valantis 31

#3
11manish Profile Picture

11manish 18

Last 30 days Overall leaderboard