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 / Single button with a t...
Power Apps
Unanswered

Single button with a toggle/different record

(0) ShareShare
ReportReport
Posted on by 249

Dear Powerapps Team, 

 

I want to use one button with 2 different usage. When I tried to use the collect function plus ";" (semicolon), I am getting this:

 

button1.PNG

 

What happens is : when I click the "button", it gives me 2 different records. 


Is there a way that I can use a single button, it gives me 1 record at a time?

 

For example, When I click it the first time, it will give me a timestamp plus the "Button 1" description.

And when I click it the 2nd time, it will give me the timestamp plus the "Button 2" description.

 

 

Thank You and Kind Regards,

Kharina

Categories:
I have the same question (0)
  • eka24 Profile Picture
    20,925 on at

    From your description, you have to put the formulas on different buttons. That is separate the collect formula one on each button.

     

    You can also add the next button as another column:

    Collect(stamp,{timestamp:Label4_5.Text, Description:Button4.Text, Description2: Button4_5.Text})

    ------------

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

  • kharina Profile Picture
    249 on at

    Hi @eka24 ,

     

    Thank you for the reply. 

    I'm sorry if I'm unclear. 

    I want to use one button to toggle the description everytime I press it. I don't want to use separate buttons.

     

    Kind Regards,

    KH

  • eka24 Profile Picture
    20,925 on at

    On the save button put:

    UpdateContext({SaveMe: !SaveMe});

    If(SaveMe,

    Collect(stamp,{timestamp:Label4_5.Text, Description:Button4.Text}),

    Collect(stamp,{timestamp:Label4_5.Text, Description:Button4_5.Text}))

    ------------

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

     

  • kharina Profile Picture
    249 on at

    Hi @eka24 , 

     

    I really appreciate your time.

    Sorry, i must've been doing it wrong because I'm not getting anything when I click the "save" button that I created. 

     

    I want to show you this: 
    1. When I click Start button, it creates a record:

    B1.PNG

     

    2. This also goes with the End button:

    B2.PNG

     

    3. However, when I click on the Toggle button, it gives me 2 records: 
    B3.PNG

    4. But when I click the Save button from your reply, I will get nothing:

    B4.PNG

     

     

    **I want to use just the  "Toggle" Button, to get a start and End record, at a time.
    Just like the "toggle switch" which creates a record whenever you push it. I just want to use a button. 

     

    Can you help me correct my formula?

     

     

    Thank You and Kind Regards,

    Kharina

     

     

     

     

     

     

     

     

     

  • eka24 Profile Picture
    20,925 on at

    I think am not getting you.

    **I want to use just the "Toggle" Button, to get a start and End record, at a time.
    Just like the "toggle switch" which creates a record whenever you push it. I just want to use a button.

     

    You are using Toggle button and button at the same time. Meanwhile i cant see any toggle on your form. what i see is a button you have named toggle. Where is the toggle button?

    ------------

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

  • kharina Profile Picture
    249 on at

    Hi @eka24 ,

     

    I'm sorry for the confusion. 

    I want to use the toggle button -- that I placed on my canvass. ( not the toggle button with on and off switch).

     

    I have 3 buttons: start, end and toggle.

    kharina_0-1594191428631.png

    I want to use the "toggle button" to get a record for Start and End.

    I don't want to use the"start button" - to get a record for start and the "End button" to get a record for the End.

     

    I watched  a video from Shane Young but, when he use one button, it shuffles the records in random. 

    kharina_1-1594191644002.png

     

    On my app, I just want continuous record of Start and End. (and not random result).

     

    Thank You and Kind Regards,

    Kharina

     

     

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