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

How to set two functions in a button.

Hi everyone!

 

I'm creating an application that randomly pick a winner when a button is clicked. At the same time after the button is clicked, it will the display a pop-up message showing the winner name.

 

The function that randomly pick a winner is working but I'm having difficulty on how to put the pup up message function inside the button because there is alredy SET function used. Here is the code that generates the random function.

Set(WinnerIs,First(
Shuffle(NameLIST)
).'IC NO')

 

WinnerIs is the name of my label and NameList is my SharePointList. The name of my Visible for the pop up message is NotificationValue,

 

I appreciate all feedbacks!

 

1 ACCEPTED SOLUTION

Accepted Solutions
zmorek
Super User
Super User

I think I see what you're doing - your formula actually creates a variable (WinnerIs) with the value of the winner. Set the Text property of the label to your variable, WinnerIs, then after your formula add something like this to set your popup variable to true

;Set(NotificationValue, true)

 

So your full formula can look something like:

 

Set(WinnerIs,First(
Shuffle(NameLIST)
).'IC NO'); Set(NotificationValue, true)

 

Use the ";" operator to chain together semi-sequential formulas. I say semi-sequential because it's not necessarily sequential all the time (but that won't affect what you're attempting).

View solution in original post

2 REPLIES 2
zmorek
Super User
Super User

I think I see what you're doing - your formula actually creates a variable (WinnerIs) with the value of the winner. Set the Text property of the label to your variable, WinnerIs, then after your formula add something like this to set your popup variable to true

;Set(NotificationValue, true)

 

So your full formula can look something like:

 

Set(WinnerIs,First(
Shuffle(NameLIST)
).'IC NO'); Set(NotificationValue, true)

 

Use the ";" operator to chain together semi-sequential formulas. I say semi-sequential because it's not necessarily sequential all the time (but that won't affect what you're attempting).

HF306
Helper I
Helper I

Thank you!

Helpful resources

Announcements
October Events

Mark Your Calendars

So many events that are happening this month - don't miss out!

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.

Users online (2,529)