So I have the seats being created but I would like to lookup a list of bookings which has a column for seatnumber as Row+Column.
In the loop of creating a seat there is an assign element of RowSeat.IsOccupied and if that seat appears in bookings list I would like to change it to True if it doesn't appear then it should be False.
I have created a loop to try and do this but hasn't worked and have noticed that really the SeatIsBooked node that changes a local variable (default False) to True should not loop back to the bookings for each, but should go somewhere else but cant work out where as each time I get an Ambiguous paths to For Each in OnAfterFetch. message.
Any help or anyone able to point me in the right direction would be greatly appreciated.
Hi @Connor EatonFixed your attached OML as well.https://assif.outsystemscloud.com/SampleSeating/SeatMap?_ts=638817227051361152
Although I would recommend you to save column & seat as well in booking table for better control. But I kept your structure as it is & fixed the OnAfterFetch
1- Prepare the Master List 2- Populated the existingBooking3- Loop on MasterList4- Find if any booking exist under column5- If yes then, Filter ExistingBookingData by Master-Col6- Loop on all ExisitingSeats of the filtered Columns7- Loop on All Seats of Master_Filtered-Col8- Compare Seat & Mark as Occupied : True
Good Luck
Assif
Hi Connor,
Here is another possible solution for your use case.
Below the widget is displayed a list with the booked seats.
Would it be possible for you to share an example .oml file with your use case?
I think you can use a list, and append the seat number to the list once it's marked as occupied.
Hi,
I have created a basic version of the page as an example .oml
Perfect, that works.
Thank you very much for your help with this
Hi @Connor Eaton
Please find the attached sample.I had created a sample booking-data list i.e ExisitingSeatList
This list I am merging to the MasteList
Demo :https://assif.outsystemscloud.com/SeatMapSelectorUI_DEMO/Teste?_ts=638817214056904352As you can see... the seat is now occupied in master data :)
Thank you for this,
In my bookings list, I store the seatID as "2B" (Row+Column)(I have changed the default seating so that rows are numbers and columns are letters), so would I need to split this into separate rows and columns?
Check my reply above.. I also fixed your OML https://www.outsystems.com/forums/discussion/102642/assigning-booked-seats-as-occupied/#Post449847or refer the attached belowthis is based on your OML ; where you are storing the Booking as concatinated string.If you split and store it would be easy fo you for future purpose...
Sorry, yes saw this after I had posted.