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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Pages / Populate a field when ...
Power Pages
Unanswered

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.

Categories:
I have the same question (0)
  • v-xida-msft Profile Picture
    on at

    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,

  • MS5 Profile Picture
    118 on at

    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!

  • Verified answer
    v-xida-msft Profile Picture
    on at

    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

    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!

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Pages

#1
Jerry-IN Profile Picture

Jerry-IN 71

#2
Fubar Profile Picture

Fubar 62 Super User 2025 Season 2

#3
sannavajjala87 Profile Picture

sannavajjala87 31

Last 30 days Overall leaderboard