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!