Auto-populating a contact lookup with the current portal user when creating a record in Power Pages or Power Portals is a user-friendly feature that simplifies data entry. By leveraging the Associated Table Reference configuration, administrators can automatically link the logged-in portal user to a specific contact entity without needing custom code. This approach reduces errors, improves data consistency, and enhances the user experience. It is particularly useful in scenarios where the logged-in user needs to be directly associated with records, such as case submissions or profile updates, streamlining workflows within portals.

The business need is, when a new record is created using above form, the Applicant lookup which is pointing to contact entity must be auto saved using current portal user login so that user should not select the value manually.
For this, we must follow the below steps.
Configure Associated Table Reference configuration
Open the form which needs to update. For my case, it’s Create Mortgage Application Form. Navigate to the form and select Tab Associated Table Reference.
Steps to Navigate to the Form -:
Go to the Power Pages Site and Sign In.
Select the app and click on the three dots

Select the Portal Management.

A portal app will open in a new tab. Go to the form, which in my case is the Mortgage Application Form (Information).

Click on Associated Table Reference.

After Clicking on Associated Reference, you will see a page.

Provide the Required Options -:
Table Reference on Save | YES |
Table Name | Contact |
Relationship | Select the required Relationship (Dropdown) |
Note -: Important | Save the form |
Target Attribute Lookup Logical Name | Select the lookup value |
Populate lookup Field | Enable the checkbox |
After providing all the Options. The Form will look like this.

In Table Reference source sub grid, select Source Type as Record Associated to current Portal User and in Record Source Relationship name select Master ID from drop down.

Now Click on Basic Form Metadata (Only Used for Text Fields).

Click on New Basic Form Metadata.

Add a new Basic Metadata of type attribute and select field applicant from the dropdown.

Scroll down the Metadata form and select Prepopulate Field. Enable Ignore Default Value, Type as Current Portal User, and Form as Contact Lookup for me its applicant.

Next Navigate to Set Value on Save and Configure the fields.

Go to Additional Settings.

Scroll down a little. Go to Associate Current Portal User on Insert Section and Enable Associated Current Portal User Option and Select the Contact Lookup from the column Dropdown.

Now Save the Changes.
Go to Power Pages Portal. Click on Sync Button and Preview it.
Testing the Application -:

(The Applicant Field is Empty. When I’ll submit the Application the Applicant Field will get Auto-Populate).

As You Can See the Applicant Field Automatically get Auto Populated.
This method effectively automates the process of associating the current portal user with new records, improving the overall user experience and efficiency. By leveraging the "Associated Table Reference" configuration, developers can avoid custom code while ensuring accuracy in user data. This approach simplifies record creation, reducing the chance of manual errors and ensuring a seamless interaction for users in Dynamics 365 Portals or Power Pages.
FAQ (Frequently Asked Questions)
1. Can I use this configuration for other lookup fields?
Yes, the method applies to any lookup field where the current user or another associated record needs to be auto populated.
2. Do I need custom code to implement this?
No, this is a no-code solution using the "Associated Table Reference" feature.
3. Can this method be used in all portal types?
It works across different types of Power Pages or Dynamics 365 Portals.