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 / It's simple right ? I ...
Power Apps
Answered

It's simple right ? I want to update rows in an existing Dataverse table from within an app.

(0) ShareShare
ReportReport
Posted on by 698

Hello all,

 

Super new and enjoying the learning curve, and now I am lost. 

 

I have an app that acts as a bunch of input forms, 

My first landing page contains a formUserDetails grabs the basics, username, email, etc...I get this by setting the text input defaults to things like User().FullName and Office365Users.MyProfile().Surname


This is linked to a Dataverse table called 'Conflict of Interest'.

 

My submit button has : SubmitForm(formUserDetails)

and OnSuccess I navigate to a new page

On the new page I have another form formShareholders which then asks for other user input and populates further rows in the same table.

I essentially want to update the same table and row for each step... ie append the data rather than create a new row.
Is this possible? and how do I match up the records based on the required field *name without displaying that field or requesting the user to populate it each time?

 

Hope that makes sense.

 

Thank you

I have the same question (0)
  • Verified answer
    CU22081303-0 Profile Picture
    150 on at

    Hi, I think I understand what you're asking and I may be able to help. If I understand correctly, you have a canvas app where you are gathering information and saving all of that information to a table called "Conflict of Interest". You want to save to the same record on that table each time the user completes a form on a page, but you are using information from the first page to find that record and you don't want to ask it again on each page.

     

    If my understanding is correct, here is what I would do. Bear in mind, canvas apps are not my strongest suit. You need to figure out which record is being worked on and store it in a variable (store the unique identifier, aka the GUID, then on each page you can do a Patch function where you simply use that guid to find which record to update.

     

    I'm having a hard time picturing the end to end process. Is this an app that many people will have access to, but they can only ever modify their own record? Or will someone be using a gallery to look through multiple records, editing them, and maybe there is a "new" button to add a record?

     

    Regardless, whenever the first action is taken that decided what record we are editing, you want that button to set a Global Variable by using a formula such as:

    Patch( 'Conflict of Interests', First( Filter('Conflict of Interests', 'First Name' = txtFName.Text , 'Last Name' = txtLName.Text) ), { Phone: txtPhone.Text, Email: txtEmail.Text } );
    Set('CurrentConflictGUID',First(Filter('Conflict of Interests', 'First Name' = txtFName.Text , 'Last Name' = txtLName.Text)).ConflictOfInterest);

     This is placeholder code, your fields and inputs will be differently named. But this basically says "When we click this button, find the first COI record where the fields on that record match the info in these fields (first and last name here), and then update the fields on it with some info from this form (the phone number and email). Then, set a global variable called CurrentConflictGUID, and set its value to the guid of whatever record meets the same criteria we used before. If you're not familiar, most records have a Unique Identifier field which is named the same as the table. That is why when setting the variable's value, we want to filter down to a single record, and then use a period to access a field called "ConflictOfInterest" on that record. This should be the GUID, but it may take some troubleshooting to get right.

     

    Now, you have the guid saved somewhere. We can access that from any page. So on your next page, the submit button or whatever should be something like this:

    Patch('Conflict of Interests', LookUp('Conflict of Interests', 'Conflict of Interest' = CurrentConflictGUID, { SomeField: txtField1.Text, SomeOtherField: txtField2.Text }));
    Navigate(NextScreen);

    This updates the first (and only) record where the GUID matches the GUID we saved to our variable. We can use different fields for the update payload (the last argument in the patch function, surrounded by curly braces) depending on what info is on the page.

    Take close note of when I used 'Conflict of Interest' versus 'Conflict of Interests". Using the plural version, I am asking for a table by that name. Using a period and then the singular version, I am asking for a field CALLED that to get the GUID.

     

    Be sure if you ever do something that changes what record you are editing, you reset that variable, or you will start putting data in the wrong records.

    Set(CurrentConflictGUID, Blank())

     

    This has been a bit of a ramble, but I hope something in here helps you figure out how to achieve your goal. Be wary, its hard to write good PowerFx code when I don't have a correct table for your example, there are probably missing parenthesis and such in my examples. 

  • RandomDept Profile Picture
    698 on at

    First of all, thank you so much for the quality information. That is bang on the money and exactly what I was looking for. That was a stack of information and I thank you for your time to answer me. Super useful!!

  • RandomDept Profile Picture
    698 on at

    deleted

  • CU22081303-0 Profile Picture
    150 on at

    So happy I could 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

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!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 525 Most Valuable Professional

#2
Haque Profile Picture

Haque 273

#3
Kalathiya Profile Picture

Kalathiya 232 Super User 2026 Season 1

Last 30 days Overall leaderboard