cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Helper V
Helper V

Single button with a toggle/different record

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

6 REPLIES 6
Super User III
Super User III

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.

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

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.

 

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

 

 

 

 

 

 

 

 

 

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.

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

 

 

Helpful resources

Announcements
News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

Power Apps Community Call

Power Apps Community Call- January

Mark your calendars and join us for the next Power Apps Community Call on January 20th, 8a PST

PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

Top Solution Authors
Top Kudoed Authors
Users online (10,590)