Hello everyone, following scenario:
2 SharePoint lists: Assets and Bookings. Every item in Bookings has a lookup to the booked asset and an amount of how many have been booked, while the Assets list has a total amount called stock.
Currently I have a Combobox with all available assets, and when I select one, I have a label that tells me how many are still available during a previously selected timeframe between StartDate and EndDate.
The code looks like this:
LookUp(
Assets,
ID = cmb_Asset.Selected.ID
).Stock - Sum(
Filter(
AssetBooking,
Asset.Id = cmb_Asset.Selected.ID && StartDate <= eventSelected.EndDate && EndDate >= eventSelected.StartDate
),
Amount
)
This work fine for me. But now I want to change the combobox in a way, that it only shows the assets, that have at least 1 available item during the event.
I played around a lot with filters and lookups, but I can't seem to get it right. Can anyone help me with this?