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 / Have a form with read ...
Power Pages
Answered

Have a form with read only fields filled dynamically

(0) ShareShare
ReportReport
Posted on by 127

I want to have a form where I fill the value for some fields in it (for them to be read-only) dynamically. So I want to pass a query string for the department ID, and when I fill a new value for the programmer, I want to add a new entry in the programmer entry with a reference to that department. If I add a new component from the left side and choose form, am not able to do this. Any hint or idea how to do this would be great. I'm still new to PowerApps portals. 

Categories:
  • v-xida-msft Profile Picture
    Microsoft Employee on at

    Hi @BrittanyR ,

    Could you please share a bit more about your scenario?

    Do you want to fill in value in several "Read-Only" fields within the Entity form based on the passed the department ID query string value?

     

    Regarding the needs that you mentioned, I think the combination of JavaScript code and Liquid expression in PowerApps Portal could achieve your needs.

     

    Please check and see if the following blog or article would could help in your scenario:

    https://www.briteglobal.com/blogs/community/pass-parameters-between-entity-forms/

    https://www.cloudfronts.com/prepopulating-lookup-dropdown-fields-form-d365-crm-portals-using-js/

     

    https://community.dynamics.com/365/f/dynamics-365-general-forum/307149/portals---populate-a-contact-lookup-field-with-the-currently-logged-in-contact-on-an-entity-form

    https://www.dancingwithcrm.com/custom-lookup-filtering-powerapps-portal/

     

    Liquid expression in PowerApps Portal

    Use Javascript code in PowerApps Portal Entity form

     

    Please try above solution, hopes it could help in your scenario.

     

    Regards,

  • BrittanyR Profile Picture
    127 on at

    @v-xida-msftThanks for your reply. 

     

    I'm having these issues: 

     

    1- Whenever I configure my form (Main) for my entity, add the fields I want, save it, publish. I go to my Portal, Sync Configuration, add the form as a component to a page, it doesn't show up as I configured it, it shows only the Name field, with the Status Reason (which am not even using) appearing as a label. Basically the form is just corrupted. 

    2- What I'd like to have, is for example, I have a department, on the department I want to click on "Add developer", so it would send me to a page with a form for adding a developer. In the "Add Programmer" form, I want to have the name of the department appearing as a label in the form itself (so when it's added, it's added as a lookup to the Department entity) because I have the Department as a lookup in the Programmer entity. So I'd like to have a the programmer form, appearing on the page, with all the fields, except for the "Department" field as read-only, filled from the query string with ID of the chosen Department. 

     

    So when I click on "Add programmer" button on the department page, I transfer the user to a new page with the Add Programmer form with a query string having the ID of the department. Is there a way to do that with Power Apps Portals? I am not even able to add the "Add Programmer" form to the page, it doesn't look like what I have it configured in the entity itself. 

     

    3- My third issue is, can I save an attachment for each entity? For example, to upload the resume for each programmer, is there a way to do that? 

     

     

     
     

     

  • H V Profile Picture
    1,510 on at

    Hi @BrittanyR

    For 1st Issue:

    1- Whenever I configure my form (Main) for my entity, add the fields I want, save it, publish. I go to my Portal, Sync Configuration, add the form as a component to a page, then Sync Configuration. it doesn't show up as I configured it, it shows only the Name field, with the Status Reason (which am not even using) appearing as a label. Basically the form is just corrupted.

     

    You have to sync configuration after add your form into page.

     

    For 3rd Issue:

    You can add NOTES section in the form and attach document into particular record.

     

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

  • oliver.rodrigues Profile Picture
    9,482 Most Valuable Professional on at

    Hi @BrittanyR 

    from what I understand, all your requirements you can achieve with Power Apps Portals, let's go:

     

    1 - this is an issue that for some reason the Portals can't find your form, and it doesn't render it properly, I am not really sure why it happens but to fix all you need to do is rename the form in your solution

    these days we had a Portals Community Call and I talked about this specific issue, take a look at the video if you have some time, it's probably in the end, maybe around 45 minutes of the video: https://www.youtube.com/watch?v=ky4X7chwl1I 

     

    2 - is "Developer" a subgrid? that's fine and you can add a related record, just note that the sub-grid won't appear if your "Department" entity form is in Insert mode, this is an expected behaviour as we need the parent record ID to associate any child record.. if your form is already in Edit mode, is fine.. but if you are creating a new Department, I would suggest you look at options like Web Form, or still use Entity Form but after create the record you need to redirect to another Edit mode Entity Form.. so it's up to you

    In your CDS form for Developer, you can leave the Department field as read-only (in my opinion you don't even need to show that in the form.. but at a first instance, just leave read-only).. then for your "Developer" Entity Form, you need to add an Entity Form Metadata related, and add the subgrid/create settings.. the Portals will automatically associate the parent and child record

     

    3 - yes, in your developer Entity Form you need to enable notes attachment (you also need to make sure the entity in your CDS has notes enabled): https://docs.microsoft.com/en-us/powerapps/maker/portals/configure-notes

     

    ------------

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

  • oliver.rodrigues Profile Picture
    9,482 Most Valuable Professional on at

    @BrittanyR did that help solving your issue? can you mark as the answer so it helps other users?

     

  • BrittanyR Profile Picture
    127 on at

    Hi @OliverRodrigues I created a new form in my entity, I sync the config, but I don't find this form in the list of forms when I add the form component. 

     

    I might be understanding this the wrong way, but I don't see the form name in the list of forms, I don't even get to select the form by name, I have a drop down to choose "Create new" or "Use existing", then I can choose the entity, then "form layout", I get "main form" or "Information", however I have more than one Information form with different names, how do I choose the form I need? Is it me or is it buggy? 

     

     

     

     

  • BrittanyR Profile Picture
    127 on at

    @OliverRodrigues  Watching some videos online, I would expect to see my custom form in the "Form layout" dropdown, however I don't really see it, I only see the "main form" and "Information" options. When I go to my solution, then to my entity, I can see the "Add Programmer Form" in the list of forms for that entity, with the form type as "Main". Isn't this what I am supposed to do?

     

    I keep syncing config, but no luck. 

     

  • oliver.rodrigues Profile Picture
    9,482 Most Valuable Professional on at

    in your solution, make sure you Publish your customizations

     

    can you try the same steps you are doing in the Portal Management App, instead of using Portal Studio

     

    go to make.powerapps.com --> apps --> portal management app --> Entity Form and create/update your entity form there, see if the options are refreshed there

  • BrittanyR Profile Picture
    127 on at

    Thanks @OliverRodrigues That did it! Didn't know that I can use the entity forms from that location. 

     

    For the read-only lookup. I am passing an ID to my form in the query string. This ID is for the parent entity. For example, the form is for adding a new programmer, however the ID is for the department, so I'd like the user to see in the "Department" the name of the department, but for it to be disabled and populated from the query string. You mentioned something in a previous comment about a "subgrid" but am not sure what that means :s I did it using the relationship between the programmer entity and the department entity as many to one relationship. 

  • oliver.rodrigues Profile Picture
    9,482 Most Valuable Professional on at

    the way you were adding the entity form should work in my opinion, not sure why it wasn't refreshing, but I am glad it worked via Portal Management App, I personally find it more reliable

     

    as you mentioned you already have a relationship between Department and Programmer (1:N), so a department contains a list of programmers, this is usually represented by a sub-grid in your CDS form

    the below posts/video show how to add a subgrid to your CDS form, those are old posts and are showing in the classic view, you can use the new modern view or switch to classic when customizing your CDS form

    https://www.websan.com/blog/item/714-sub-grids-in-dynamics-365-everything-you-need-in-one-place

    https://www.youtube.com/watch?v=WtWP4HuI7xc

     

    once you have your subgrid in the form, you need to add an Entity Form Metadata related to the subgrid: https://www.youtube.com/watch?v=8TgpYEaShzo

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

Leaderboard > Power Pages

#1
Mohsin Ali Profile Picture

Mohsin Ali 35

#2
M Bilal Khan Profile Picture

M Bilal Khan 33

#3
11manish Profile Picture

11manish 21 Super User 2026 Season 2

Last 30 days Overall leaderboard