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 / Multiple action on a B...
Power Apps
Answered

Multiple action on a Button OnSelect

(0) ShareShare
ReportReport
Posted on by 5

Hello friends,

 

Please help me solving this problem.

 

For an OnSelect of a button, I would like to have two actions upon selecting the button.

The first action,

Upon selecting the button, it will clock in; formulas I used for the clock in action as below:

 

If(ThisItem.display = Self.Text && ThisItem.enabled,

Patch(TimeTracker, Defaults(TimeTracker),
{Title: glbUser,
ActivityType: ThisItem.display,
ActivityDateTime: Text(Now(), "[$-en-US]yyyymmddhhmm"), ActivityDate:Now()
}
),
UpdateContext({lclCorrection: LookUp(TimeTracker, Title=glbUser && ActivityType=ThisItem.display && ActivityDate=ThisItem.value)})

)

 

And the section action

Upon selecting the button, it will save the location; formulas I used for saving the location. it works when I used it on a separate screen and button.

 

SaveLocation.Run(FirstName.Text,Location.Longitude,Location.Latitude,Now())

 

****** both of the formulas work fine on separate screens. Please help me to work them on the same button. Thanks for your support.

 

Regards

Nadim

 

Categories:
I have the same question (0)
  • Verified answer
    Pstork1 Profile Picture
    69,657 Most Valuable Professional on at

    Set the button up to run the flow first.  Then insert the other code in front of the SaveLocation.Run() formula and separate them with the command separator for your region.  In my area it would look like this.

    If(ThisItem.display = Self.Text && ThisItem.enabled,
    
    Patch(TimeTracker, Defaults(TimeTracker),
    {Title: glbUser,
    ActivityType: ThisItem.display,
    ActivityDateTime: Text(Now(), "[$-en-US]yyyymmddhhmm"), ActivityDate:Now()
    }
    ),
    UpdateContext({lclCorrection: LookUp(TimeTracker, Title=glbUser && ActivityType=ThisItem.display && ActivityDate=ThisItem.value)})
    
    );
    SaveLocation.Run(FirstName.Text,Location.Longitude,Location.Latitude,Now())
  • mdnadimh Profile Picture
    5 on at

    Awesome, that works.

    Really appreciate your help mate.

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

#2
11manish Profile Picture

11manish 209 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 179

Last 30 days Overall leaderboard