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 / Submit Form - Update t...
Power Apps
Answered

Submit Form - Update two different SPO Lists if Field is specific Value

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Now sure how to do this.

Here is my App.

When we click submit, all this information is submitted to the SPO Lists Assignments.

The time is updated with this formula:

DateValue1.SelectedDate +
Time(If(AMPMValue.Selected.Value = "PM",12,0) +Mod(Value(HourValue1.Selected.Value),12),Value(MinuteValue1.Selected.Value),
0
)

 

This is all working great.

What I would like is for the App to make the exact same update, in a different SPO list.

Engineers.LastCritAssigned

Only if the CaseType is Critical.

I dont think I can do it here, but thought maybe on the Submit button?

I would assume I would need an If statement there, but how do you make the update?

 

 

lardo5150_0-1643234173085.png

lardo5150_1-1643234205600.png

 

Categories:
I have the same question (0)
  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @lardo5150 

    You definitely don't want to do it on the submit button...that is before the data is submitted, how would you know if it was successful?

    This should be done in the OnSuccess action of your form.

    Example formula would be:

    If(Self.LastSubmit.CaseType = "Critical",
     Patch(Engineers,
     {column: Self.LastSubmit.column}
     )
    )

    This would create a new record in the Engineers list and set the column specified to the value that was last submitted.

     

    I am not clear if you are attempting to create a new record or update an existing, so the above is just to create.  I'd need more information to suggest further on updating an existing.

     

    I hope this is helpful for you.

  • lardo5150 Profile Picture
    Microsoft Employee on at

    Let me see if I can do this from my phone lol.

    Assignments spo list is where we log the cases.

    The engineer spo list holds all our engineers data, including total count of cases, total count of critical cases, etc.

    So we are UPDATING a record.

    So on the submit of the edit form, we are creating a record in assignments.

    So want I want to do is if the case type is critical take the same update of time you helped me with and update the engineer.lastcritassigned field for that engineer that matches the assignments.assignedto field.

    Does that help?

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

    @lardo5150 

    So in that case, you want to lookup that record in your formula.

    Example:

    If(Self.LastSubmit.CaseType = "Critical",
     Patch(Engineers,
     LookUp(Engineers, somecolumninEngineers = Self.LastSubmit.AssignedTo),
     {lastcriticalassigned: Self.LastSubmit.column}
     )
    )

     

    By the way...pretty good from your phone!  I always have a hard time with the forum from the phone.

  • lardo5150 Profile Picture
    Microsoft Employee on at

    Ha thanks!

    Ok let me try this tomorrow.

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

    @lardo5150 

    Sounds good!

  • lardo5150 Profile Picture
    Microsoft Employee on at

    That was it!  THANK YOU again!!!

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 401 Most Valuable Professional

#2
11manish Profile Picture

11manish 201 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 128 Super User 2026 Season 2

Last 30 days Overall leaderboard