Hi there,
I am working on a deskbooking canvas app, and am trying to implement functionality where users can book more than one desk at one time.
To do this, they select the desk number they want in the below first drop down. This then looksup to the Dataverse table to update the end dropdown to Unavailable if already booked, or Available if free. Here is the UI...

On each of the 'Select desk' dropdowns, I have the following for OnChange and OnSelect...
OnChange...
If(Multi4DeskStatus_1.Text = "Available", Remove(Car4FECol, {id: "deskone4FE"}, {desk: Desk1.Selected.Value}, {date: DateDesk1.SelectedDate}, {floor: MultiFloor4_1.SelectedText}, {area: MultiArea4_1.SelectedText}, {reservedforname: User().FullName}, {reservedforemail: User().Email}, {site: "Cardiff"}, {bookedby: User().FullName}));
If(Multi4DeskStatus_1.Text = "Available", Collect(Car4FECol, {id: "deskone4FE"}, {desk: Desk1.Selected.Value}, {date: DateDesk1.SelectedDate}, {floor: MultiFloor4_1.SelectedText}, {area: MultiArea4_1.SelectedText}, {reservedforname: User().FullName}, {reservedforemail: User().Email}, {site: "Cardiff"}, {bookedby: User().FullName}));
OnSelect...
If(Multi4DeskStatus_1.Text = "Available", Remove(Car4FECol, {id: "deskone4FE"}, {desk: Desk1.Selected.Value}, {date: DateDesk1.SelectedDate}, {floor: MultiFloor4_1.SelectedText}, {area: MultiArea4_1.SelectedText}, {reservedforname: User().FullName}, {reservedforemail: User().Email}, {site: "Cardiff"}, {bookedby: User().FullName}));
If(Multi4DeskStatus_1.Text = "Available", Collect(Car4FECol, {id: "deskone4FE"}, {desk: Desk1.Selected.Value}, {date: DateDesk1.SelectedDate}, {floor: MultiFloor4_1.SelectedText}, {area: MultiArea4_1.SelectedText}, {reservedforname: User().FullName}, {reservedforemail: User().Email}, {site: "Cardiff"}, {bookedby: User().FullName}));
Of course, each of the dropdowns for each of the seven desks increments the "_1" values each time, and 'id' changes to 'desktwo4FE', 'deskthree4FE' etc etc.
The effect of the above to be, if the user selects or changes their desk selection, remove whatever is in the collection for that desk already, and collect the new selection, but only if the desk is Available.
What I am then trying to do is Patch all of these in the collection to my Dataverse table.
To do this, I am trying this OnSelect of the Submit button is...
ForAll(Car4FECol, Patch(Car_Desk_Reservations, Defaults(Car_Desk_Reservations),
{'Car Desk Reservation Date': date},
{'Car Floor Number': floor.Value},
{'Car Floor Area': area.Value},
{'Car Desk Availability Status': "Reserved"},
{'Car Desk Booked By': bookedby},
{'Car Desk Reserved For': reservedforname},
{'Car Desk Reserved For Email': reservedforemail},
{Location: "Cardiff"},
{'Desk Reference': desk},
{'Car Pass Status': "Yes"}));
but this is erroring. The Dataverse table's mandatory column is 'Desk Reference', and it is erroring saying that this field is required... but I am putting the collection value here as part of the ForAll. I have tried wrapping in a Text command - so, {'Desk Reference': Text(desk)}, and this starts to patch (takes a very long time), but only patches the Text "" fields, a lot of blank rows with just the desk reference, but nothing from the collection??
Please can someone advise me where I might be going wrong here?
Thanks
K.