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 / populate system requir...
Power Pages
Unanswered

populate system required field based on the answer of another field

(0) ShareShare
ReportReport
Posted on by 2

Hello
I'm using a basic form for the portal, which has a system required field for contact.

I need to set the contact either by the logged in user, which I have managed by using entity metadata.  However if the user is not logged in I would like the field to be populated from the answer of another field, answers would be anonymous or guest.  So if anonymous was selected the system required contact field would be populated with the anonymous contact.  If guest was selected the system required contact field would be populated with guest.

 

Contact field is system required and I am not able to alter this.


Is there a low code/no code way of doing this?

Any help or advice is greatly received.

Categories:
I have the same question (0)
  • EmadBeshai Profile Picture
    806 Moderator on at

    Hi @BOB007 ,

     

    Since you have an anonymous contact record and you want to set it in case of select an anonymous option, then you can trigger the on-change function on the option-set and based on the selected value if it is equal to anonymous then set the anonymous contact like below

     

    $(“#contact_name”).attr(“value”,contactName); /*contact_name = record name*/
    $(“#contact”).attr(“value”,contactId); /*contactId= Guid of the record*/
    $(“#contact_entityname”).attr(“value”,”contact”);/*contact = entity name*/

     

     

    If this post helps you with your problem, please mark this answer as Accepted Solution.
    If you like my response, please give it a Thumbs Up. 

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Pages

#1
Valantis Profile Picture

Valantis 49

#2
11manish Profile Picture

11manish 33

#3
Haque Profile Picture

Haque 28

Last 30 days Overall leaderboard