it works but I'm wondering if it can be combined into one statement...
In this case 'Seat Capacity' already exists in Events
But I need to calculated the available seats AFTER adding the ApprovedCount.
````
Set(
EventListingWithCounts,
ForAll(
Events As _e,
Patch(
_e,
With(
{
_rec: LookUp(
TicketRequestCounts,
EventId = _e.ID
)
},
{
ApprovedCount: _rec.CountApproved,
PendingCount: _rec.CountPending,
WaitlistCount: _rec.CountWaitlisted
}
)
)
)
);
ClearCollect(xxxx,AddColumns(EventListingWithCounts,"AvailableCount",'Seat Capacity'-ApprovedCount))
````
Do you really think that combining it into one statement is more beneficial overall?