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 / Auto Populate Primary ...
Power Pages
Suggested Answer

Auto Populate Primary Key on a form based on two values in power pages

(0) ShareShare
ReportReport
Posted on by 6
Hello, 
I have been trying to find a way to prepopulate the column based on two different values.
there are two options - using calculated fields and forms' metadata "prepopulate" section.
Now the problem is i have been trying to populate the primary column of the table, Why primary column - because is it being used to name the folder which is created in SharePoint through document management integration.
I have been trying to populate the primary column with value - Concatenate (ContactName + Company Name).
Do you have any suggestions?
Categories:
I have the same question (0)
  • Suggested answer
    Fubar Profile Picture
    8,354 Super User 2025 Season 2 on at
    Couple of different options:
    • Put the Name field on the form, set it so the label is not shown on the form.  Then add a a metadata record to the form and add a CSS class to hide the field.  Then use JavaScript/JQuery to concatenate the 2 values.
    • Create a realtime Workflow in Dataverse that triggers on Create (or update of the respective fields if on an update form) and add both fields into the Name field. 
    • Create a realtime plugin to do the concatenation similar per the Workflow but all code
    • If it doesn't have to be realtime,(note: if you need to see the result on the portal straight away it needs to be realtime due tot he portals cache) then you could also do it with a Flow similar to the workflow (but as this is not synchronous it can add a 'gap' where the value is not populated - which may or may not be ok depending on your scenario)
  • CU17091722-0 Profile Picture
    21 on at
    Hello,
    You can try few options:
    - You can handle this directly in PowerApps when submitting the form or creating the folder
    - If you want SharePoint to handle the concatenation instead of PowerApps, you can create a calculated column in SharePoint that combines ContactName and CompanyName. However, calculated columns cannot be set as the primary column (Title), but you can set them as secondary columns.
    - When using document management integration, SharePoint uses the primary column (often Title) to name folders. To ensure folders are named properly withContactName +CompanyName

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
Fubar Profile Picture

Fubar 74 Super User 2025 Season 2

#2
Jerry-IN Profile Picture

Jerry-IN 55

#3
sannavajjala87 Profile Picture

sannavajjala87 31

Last 30 days Overall leaderboard