Skip to main content
Community site session details

Community site session details

Session Id :
Power Pages - Power Apps Portals
Answered

Populate a field when editing entity through edit form

(0) ShareShare
ReportReport
Posted on by 118

Hi,

 

I am trying to populate a field when modifying the entity through an edit form. I have been able to do this exact thing when inserting a new record through an insertion form, but I haven't been able to do it in an edit form. I have tried to use the same functionality provided in the form (see images attached) to link one entity to another with no luck. Maybe this functionality is only available when "inserting" as the title of the area I'm filling says...

 

Is there support in the platform for what I am trying to do or do I have to use JS?

 

Thanks in advance.

  • MS5 Profile Picture
    118 on at
    Re: Populate a field when editing entity through edit form

    Hi,


    The problem was that I was trying with the "Prepopulate field" when I need to fill in the "Populate on save" area.


    Thanks for you help!

  • Verified answer
    v-xida-msft Profile Picture
    on at
    Re: Populate a field when editing entity through edit form

    Hi @MS5 ,

    Do you want to populate the "Modified By" field with current portal user?

     

    If the Contact field that you mentioned is "Modified By", I think it is not necessary to fill in the areas "Associate to user when inserting"  and add a new record within "Entity Form Metadata" (rather than "Entity reference").

     

     

    The  "Modified By" field is a System field in CDS Entity, which could not be assigned value manually, which would be populated automatically by CDS System automatically.

     

    You could consider create a new LookUp field (which bind to Contact Entity) in your Primary Entity, then try above solution I provided, check if the issue is solved.

     

    Best regards,

  • MS5 Profile Picture
    118 on at
    Re: Populate a field when editing entity through edit form

    Hi @v-xida-msft ,

     

    Yes, I am trying to populate a field named "modified by" with the user that is modifying the record.

     

    Regarding your solution, do I still need to fill in the areas "Associate to user when inserting" and "entity reference" ? Also, the field I am trying to autopopulate is linked to a relationship with contact, as you can see I have done everything exactly the same as if I wanted to autopopulate the field when inserting a new record, which worked.


    Thanks!

  • v-xida-msft Profile Picture
    on at
    Re: Populate a field when editing entity through edit form

    Hi @MS5 ,

    Could you please share a bit more about your scenario?

    Which field in your Entity Form do you want to populate? Contact LookUp field?

     

    Based on the screenshot that you mentioned, I suppose that you want to auto-populate the Contact LookUp field in Entity form (in Edit mode) with current sign in Portal user, is that true?

     

    If you want to auto-populate the Contact LookUp field in your Entity Form (in Edit mode), I think the following solution mentioned by @Byron Dittberner  could achieve your needs:

    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

     

    On your side, you need to create a new record within the "Entity Form Metadata" tab of your Edit form (which is in "Edit" mode), then configure the attributes as below:

    4.JPG

     

    5.JPG

    Please consider take a try with above solution, check if the issue is solved.

    Best regards,

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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Pages

#1
Lucas001 Profile Picture

Lucas001 60 Super User 2025 Season 1

#2
Fubar Profile Picture

Fubar 55 Super User 2025 Season 1

#3
surya narayanan Profile Picture

surya narayanan 35