cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
mholdsworth2022
Frequent Visitor

Storing text every time a button is pushed

Hi Team,

 

I have been trying to wrap my head around a concept that is pretty easily done in other languages normally. I have created a custom component using the CLI method that allows me to copy text from a text input into the windows clipboard so this can be pasted into a different program. 

 

Where I am now struggling is every time a user clicks a button I want that value to be added to the text input. At the moment I can only get it to add it one time. I was thinking maybe it would be a collection but they don't play nice with text inputs. Would this be done with a count statement? I have added some pictures of a current java application and what I am trying to replicate in the power app. I have tried Set, Update and collection and now I am out of ideas. Any assistance would be greatly appreciated.

 

What the Java Application Does

mholdsworth2022_0-1655307440814.png

 

What I can only get power apps too do

 

mholdsworth2022_1-1655307486314.png

 

1 ACCEPTED SOLUTION

Accepted Solutions
TheRobRush
Super User
Super User

I have 3 buttons, one says Add 15 minutes, the next 10, the next 5. each one has a onselect of 

Switch(variableVar,
       Blank(),Set(variableVar, Concatenate(variableVar, Self.Text)),
       Set(variableVar, Concatenate(variableVar, ", ",Self.Text)))

there is a label and its text value is

variableVar

and a clear button with the onselect of

Set(variableVar,Blank())

 

result is

TheRobRush_0-1655308813986.png

 

_____________________________________________________________________________________
Like my answer? - Hit that Thumbs Up. Resolved the Issue? - Hit Accept as Solution.
This helps others find solutions to future issues!

View solution in original post

1 REPLY 1
TheRobRush
Super User
Super User

I have 3 buttons, one says Add 15 minutes, the next 10, the next 5. each one has a onselect of 

Switch(variableVar,
       Blank(),Set(variableVar, Concatenate(variableVar, Self.Text)),
       Set(variableVar, Concatenate(variableVar, ", ",Self.Text)))

there is a label and its text value is

variableVar

and a clear button with the onselect of

Set(variableVar,Blank())

 

result is

TheRobRush_0-1655308813986.png

 

_____________________________________________________________________________________
Like my answer? - Hit that Thumbs Up. Resolved the Issue? - Hit Accept as Solution.
This helps others find solutions to future issues!

Helpful resources

Announcements
Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Super User 2 - 2022 Congratulations

Welcome Super Users

The Super User program for 2022 - Season 2 has kicked off!

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Users online (3,127)