web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Unanswered

Power Apps Button OnSelect ad Power Apps Patch Funtion

(1) ShareShare
ReportReport
Posted on by 67
Hi Members,
 
I was developing a application for Desk Reservation. While developing it, I am stucked in. On the Power Apps screen divided into two containers, In 1st container, I have added a 9 button controls from Desk 1 to Desk 9. Also, in the second container added 9 button controls from Desk 1 to Desk 9.
 
In 1st container, Whenever the user selects a desk name as Desk 1, the color gets changed to white and in the second container "Desk 1" changed to green color, if they unselect the button in both container the color get backs to normal. The formula I used for container 1 for all desk buttons:
OnSelect :If(
          Find("Desk1,", varSelectedDesks) > 0, 
           // If Desk 1 is already selected, remove it from varSelectedDesks
           Set(varSelectedDesks, Substitute(varSelectedDesks, "Desk1,", "")),
           // If Desk 1 is not selected, add it to varSelectedDesks
           Set(varSelectedDesks, Coalesce(varSelectedDesks, "") & "Desk1,")
          );

Fill: If(
      Find("Desk1,", varSelectedDesks) > 0,
      Color.White,  // Turns white if Desk 1 is selected
      var_ThemeColor   // Default color (or any other color you prefer)
      )

Visible: If(
         !IsBlank(
          LookUp(
            'Desk Reservation Details_1',
            'Reservation Date' = DataCardValue3.SelectedDate &&
            'Desk Name' .Value= "Desk 1" &&
             'Reservation Status'.Value = "Booked"
           )
          ),
          false,true)
 


 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Now the problem is,

In the SharePoint list, the Desk Name is a lookup column, so I made it it allows multiple selections, after that in the Container 1 all the button control is not visible. Please help me out how can I achieve this:
 
 
 

 
 
 
 
 
 
 
 
 
 
 
 
 
 
Question 1:  How to make it all the desk button control visible in Container 1.
Question 2:  In Container 1, How to save the selected button desk names to SharePoint list using patch function.

Please, Help me to resolve this? Thank You in advance!
I have the same question (0)
  • WarrenBelz Profile Picture
    151,895 Most Valuable Professional on at
    Power Apps Button OnSelect ad Power Apps Patch Funtion
    I assume this is all part of the issue in this thread ? Am I correct that varSelectedDesks is Text ? If so why are you trying to add it to a multi-select column (please answer on the other thread)

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 624 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 381 Super User 2025 Season 2

#3
developerAJ Profile Picture

developerAJ 225

Last 30 days Overall leaderboard