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 / Order of formulas help...
Power Apps
Unanswered

Order of formulas help on a single button

(0) ShareShare
ReportReport
Posted on by 38

Having some issues with a save button. Have several formulas on the OnSelect. At the moment this runs correctly once. The first patch runs correctly every time, the second patch runs correctly once.

 

First patch sends the input information to a second sharepoint list (Dates), second Patch goes to (Employee Names)

 

Do I even need the SubmitForm with the patches? Should I just patch everything?

This form is updated daily.

 

 

 

Patch(Dates, Defaults(Dates),{Name:Value(DataCardValue12.Text),CheckInDate:Value(DataCardValue15_CheckInDate.SelectedDate),Reason:Value(DataCardValue18_ReasonOut.Selected.Value),SickHoursTaken:Value(DataCardValue1_SickHours.Text),VacationHoursTaken:Value(DataCardValue23_VacationHoursTaken.Text)});
SubmitForm(Form2);
Set(currentRecord, LookUp('Employee Names', ID = Value(DataCardValue45.Text)));
Patch('Employee Names',currentRecord,{SickHoursTaken:Value(DataCardValue1_SickHours.Text), SickAvailableNow:currentRecord.SickAvailableNow - Value(DataCardValue1_SickHours.Text)});Patch('Employee Names',currentRecord,{VacationHoursTaken:Value(DataCardValue23_VacationHoursTaken.Text), VacationAvailable:currentRecord.VacationAvailable - Value(DataCardValue23_VacationHoursTaken.Text)});
Notify("Record Saved",NotificationType.Success);

 

 

AppExample.jpg

 

Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    155,677 Most Valuable Professional on at

    Hi @adyboon ,

    You have posted this twice - I have responded on the other post.

    Can you please close this one.

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 Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 431

#2
WarrenBelz Profile Picture

WarrenBelz 360 Most Valuable Professional

#3
Kalathiya Profile Picture

Kalathiya 280 Super User 2026 Season 1

Last 30 days Overall leaderboard