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 Apps / From a table record, E...
Power Apps
Answered

From a table record, Edit, Delete or Add a New record on a related form

(0) ShareShare
ReportReport
Posted on by 316

Hi,

I have the following Data Table and Form pointing to the same SharePoint List:

Iamglt_0-1612224116399.png

What I am trying to achieve is:

a) A record in the table can be selected and will populate in the form below and then edited and saved or deleted.

b) If I click the 'New' button the form will be blank and will allow me to add a new record to the SharePoint list (also updating the table above).  I cannot either of the functions working - is there a way to populate the form manually by selecting a record in the table and also a way I can add a new record?

Any assistance is always greatly appreciated...

Cheers,

Geoff.

Categories:
  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @Iamglt 

    Your Form should be in EditMode and your Item property should be set to the Table Selected Item.

    Your New button should be calling the NewForm(yourFormName) function.  The form will do all the rest.

     

    I hope this is helpful for you.

  • Iamglt Profile Picture
    316 on at

    Hi Randay,

    Thanks for your reply - my form is in Edit mode:

    Iamglt_0-1612232335748.png

    And the Item property for the form is set to the following:

    Iamglt_1-1612232454031.png

    The new button is set to the following:

    Iamglt_2-1612232498151.png

    Whenever I click on anything in the table, the bottom fields stay blank.  Also, if I add a new entry, it will not save - any idea why this is happening?

    Cheers,

    Geoff.

  • Iamglt Profile Picture
    316 on at

    Ok I finally got this working:

    - All  of the columns in the table (FullName, EmailAddress, HR, Security & Admin) -  'OnSelect' were changed to: EditForm(Form1)

    - The Items for the form is:  DataTable1.Selected

    - The New button Onselect property is:  NewForm(Form1)

    - The Save button OnSelect button is:  SubmitForm(Form1); NewForm(Form1)

  • Verified answer
    Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    Your save button should only have SubmitForm(Form1)

    The NewForm(Form1) should be moved to the OnSuccess property of the form so that it is only executed if the form successfully saves.

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @Iamglt 

    Glad you were able to get things going.

    As @Drrickryp mentioned, you should move any actions you want to occur once a form is submitted to either the OnSuccess or the OnFailure actions of the form.  You don't want things to happen if actions fail.  This is one of the absolute beauties of the EditForm...use it!

     

     

  • Iamglt Profile Picture
    316 on at

    Thanks Randy for your help with this - very much appreciated 🙂

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 411 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 338

#3
WarrenBelz Profile Picture

WarrenBelz 256 Most Valuable Professional

Last 30 days Overall leaderboard