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 / Update SharePoint List...
Power Apps
Unanswered

Update SharePoint List user records to closed from PowerApp

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hello,

 

I have a PowerApp built for tracking Associate coaching records.  When they are submitted by the supervisor, they get stored in a SharePoint List with the supervisor and their direct reports Office365 User information selected for tracking by our department heads.     When I submit a form with a selected commitment like "Attention to Detail" and mark it as Open.  I want the supervisor to submit a new form later in the coaching process to mark it as closed and submit, when that occurs it marks the other records in the SharePoint List for the Associate selected "Attention to Detail" as closed as well.  Is this possible?

jrem36_0-1637523113096.png

 

Currently what I have for the submit button.

 

SubmitForm(Form1);
Navigate('Coaching Home Screen');
NewForm(Form1)

 

Thanks,

 

Joshua

Categories:
  • WarrenBelz Profile Picture
    156,576 Most Valuable Professional on at

    Hi @Anonymous ,

    On the OnSuccess of the Form

    If(
     Self.LastSubmit.YourOpenClosedField = "Closed",
     UpdateIf(
     SPListName,
     Associate = Self.LastSubmit.Associate && 
     YourCommitmentField = Self.LastSubmit.YourCommitmentField &&
     YourOpenClosedField = "Open"
     ),
     {YourOpenClosedField:Closed}
    )

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    Visit my blog Practical Power Apps

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    I made some updates based on how my form is set up, but can't get it to update the other records that match in SP List.  The form for the Leader will look like this and is connected like the Associate Field via Office365 User Connector.

    jrem36_0-1637527895096.png

    Commitment Area (Choice Field)

    jrem36_1-1637527983477.png

    Associate (People or Group)

    jrem36_2-1637528047006.png

    Commitment Status (Choice Field)

    jrem36_3-1637528185273.png

     

    onSuccess for Form1

     

    If(
    Self.LastSubmit,
    DataCardValue22 = "Closed",
    UpdateIf(
    'Digital Locker',
    Associate = Self.LastSubmit.Associate && DataCardValue21 = Self.LastSubmit.'Commitment Area' && DataCardValue22 = "Open"
    ),
    {DataCardValue22: Closed}
    )

  • WarrenBelz Profile Picture
    156,576 Most Valuable Professional on at

    Hi @Anonymous ,

    You need to refer to the field values, not the control values.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @WarrenBelz  I tried updating to both options below.  It just submits the record like it was already, with out updating any of the older records for the users marked as "Open" to "Closed".  

     

    If(
    Self.LastSubmit,
    "CommitmentStatus" = "Closed",
    UpdateIf(
    'Digital Locker',
    "Associate" = Self.LastSubmit.Associate && "CommitmentArea" = Self.LastSubmit.CommitmentArea && "CommitmentStatus" = "Open"
    ),
    {CommitmentStatus: Closed}
    )

     

    and

     

    If(
    Self.LastSubmit,
    CommitmentStatus = "Closed",
    UpdateIf(
    'Digital Locker',
    Associate = Self.LastSubmit.Associate && CommitmentArea = Self.LastSubmit.CommitmentArea && CommitmentStatus = "Open"
    ),
    {CommitmentStatus: Closed}
    )

     

     

  • WarrenBelz Profile Picture
    156,576 Most Valuable Professional on at

    @Anonymous ,

    Try

    If(
     Self.LastSubmit.CommitmentStatus = "Closed",
     UpdateIf(
     'Digital Locker',
     Associate = Self.LastSubmit.Associate && 
     CommitmentArea = Self.LastSubmit.CommitmentArea && 
     CommitmentStatus = "Open"
     ),
     {CommitmentStatus: "Closed"}
    )

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    Visit my blog Practical Power Apps

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @WarrenBelz unfortunately that didn't work.  I don't know if a Patch or PowerAutomate would work better?  Or if i don't understand the field values correctly, but so far zero luck getting it to find the office365 user I submitted past coaching's for and then closing them all out based on the relevant area.

     

    If( DataCardValue22.SearchText.Value = "Closed",

      Set(_fieldVar,txtOpen.Text),

      Set(_fieldVar,txtClosed.Text))

      

    // Then run Patch  

    Patch('Digital Locker', Defaults('Digital Locker'),

      {

          CommitmentStatus: txtCommitmentStatus.Text,

          Field: _fieldVar, txtClosed.Text

      }

     

    or 

     

    If('Commitment Status_DataCard1'.Selected.Value= "Closed",

     

    PowerAppsbutton.Run ('Commitment Area_DataCard1'.Selected.Value, 'Team Leader_DataCard1'.Selected.Value, 'Commitment Status_DataCard1'.Selected.Value

    ))

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 396 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 323

#3
WarrenBelz Profile Picture

WarrenBelz 193 Most Valuable Professional

Last 30 days Overall leaderboard