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 / Updating an Excel Tabl...
Power Apps
Answered

Updating an Excel Table with an Edit Form

(0) ShareShare
ReportReport
Posted on by 8

Hey,

 

I am building a student roster type app for teachers.

 

I want the teachers to be able to, once a student is accessed, assign a pass.

 

I would assume to use an edit form to do this, but when I use SubmitForm(EditForm1) it creates an entirely new row, where I really just want to update the value of a column of a specific student. 

 

I feel like a Parent or ThisItem value would be neccesary but trying to use Patch as i found that is the right way to do this confuses me immensely.

 

This is mainly because I have one screen to find a student, and then a button to go to that specific student's info.

 

From there I have a button to go to a screen specifically for Passes, but I can only figure out how to make it work with making a whole new set of data rather than updating a value on the table.

 

The column I need to update is Column12 on the data source Table1_1 

 

Please help me, this is a really important project and I really would like for it to work as swiftly as possible.

 

Thank you,

 

Zachary Beer

Screen Shot 2019-01-30 at 10.36.08 AM.png
Screen Shot 2019-01-30 at 10.36.19 AM.png
Screen Shot 2019-01-30 at 10.36.13 AM.png
Categories:
I have the same question (0)
  • jhall Profile Picture
    636 on at

    I'm not 100%  clear on what's tripping you up, but let's hit the basics first.

     

    You don't have to use an Edit form, but you certainly can.  Patch or UpdateIf will also let you do this directly.  Really depends upon your goals for the app.

     

    Assuming we have a data source named Students, columns within that source named StudentID/Pass and a field on your screen named SIDNum (similar to your third screen shot), then you could do an UpdateIf along the lines of:

     

    ClearCollect(Students,{StudentID:1234,Pass:false});
    UpdateIf(Students,StudentID=Value(SIDNum.Text),{Pass:true})

    In my above example I'm creating the Collection just as an example, then updating a value within that collection for a record that matches the value of a current text field.  You could just as easily substitute the name of the Collection w/ the name of your data source that exists in SharePoint or elsewhere.

     

    This isn't really the BEST way to do this necessarily, but maybe this helps jump-start you into thinking about how you want your app to interact with data.

  • zbeer02 Profile Picture
    8 on at

    So basically I need to clear up some confusion.

     

    I have a data source from excel, and Column12 of that data source is a text value. I want to be able to, from the app, use a dropdown to update that text value depending on which student is selected. I attatched a video to hopefully clear up anything confusing. Basically Im trying to modify the "None" so that it updates in all places to wherever their pass is located to until it is updated back to none

  • zbeer02 Profile Picture
    8 on at
  • zbeer02 Profile Picture
    8 on at

    Let me kind of draw it out for you as I realize my latest responses are not the most specific. This is what I want my app to do.

     

    I have an excel table attached. This is through Microsoft OneDrive.

     

    Each value for student's Column12, which is passes, is at "None".

     

    I want to be able to go through the app and find a specific student on Screen 1, tap on the chevron to go to their details page on Screen 2, and tap on the Add Pass button to go to Screen 3. Then, I want to be able to use the drop down to pick a location and then click the check mark. When I click the check mark, I want it to update the Column12 cell for the student I went into on Screen 1 from the original "None" value to the value I select on the drop down. I want the value to be updated on the excel spreadsheet in the oneDrive.

     

    I cannot figure out how to do this. I am not set on one way to do this. So if you can help me out to find a way to get this to work in some way, I would greatly appreciate

     

    Thank you so much

  • medivestKT Profile Picture
    13 on at

    Patch(dataSourceName; First(Filter(dataSourceName; Column2 = galleryName.Selected.Column2)); 

    {Column12: Dropdown.Selected.Value})

    Just change the name of dataSoruceName, galleryName and Dropdown with appropriate name

  • medivestKT Profile Picture
    13 on at

    Or you can use column1, not column2 to find the record for update.

  • Verified answer
    v-xida-msft Profile Picture
    Microsoft Employee on at

    Hi @zbeer02,

    Do you want to select a specific student from a Gallery, then update the corresponding column12 value in your Excel table?

    Based on the needs that you mentioned, I think the Patch function could achieve your needs. I have made a test on my side, please consider take a try with the following workaround:

    Set the OnSelect property of the "Check mark" button to following formula:

    Patch(
     'YourExcelTable', 
     LookUp('YourExcelTable', Student_x0020_ID_x0020_Number = Gallery1.Selected.Student_x0020_ID_x0020_Number),
     {
     Column12: Dropdown1.Selected.Value
     }
    )

    Note: The Student_x0020_ID_x0020_Number represents the Sutdent ID Number column in your Excel table. The Gallery1 represents the Gallery control in your Screen1.

    More details about Patch function in PowerApps, please check the following article:

    Patch function

     

    Best regards,

  • zbeer02 Profile Picture
    8 on at

    Thank you so much!! Yours is the one that worked!!!

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

WarrenBelz 416 Most Valuable Professional

#2
11manish Profile Picture

11manish 205 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 128 Super User 2026 Season 2

Last 30 days Overall leaderboard