Hello,
I'm working on a Booking Project, at this part
Assignment 12: RichWidgets
4. Display the Occupancy for the Next 7 Days Issue
at c), which is
In the Preparation, create the logic to build the data to be plotted on the chart:• Get all Rooms in the hotel, to calculate the percentage of occupancy.• Use a Local Variable to hold the Date to which the occupancy is calculated. The Variable should start on today’s date.• If the Date in the Local Variable is within the next 7 days:i. Get all Rooms Booked or Checked In on the date.ii. Build a DataPoint with the percentage of occupancy for the date.iii. Append the DataPoint to a List of Data Points.iv. Add one day to the date on the Local Variable.v. Define the flow to return to the If.
in the preparation of home screen, I create aggregate to get all rooms with (booked-check-in) status and I create a local variable TodayDate with currDate() as a default value.
But I did not understand what should I do then, could someone help me?
and what should I assign to the SourceDataPointList in Line Chart?
Hi Ghada,
These are my filters:
(the last one says Entites.Status.CheckedIn). Is that the problem with your filter, that you need a valid (non-empty) CheckOutDate?
Kilian Hekhuis wrote:
I make this change then my result was changed which is:
in the assign, before ListAppend I make these assignments:
and my filter is the same as previous so my result is:
do you think my result is correct!
I allow that the description is a bit unclear :). What you need to do is build a loop that creates a list of DataPoints, for today and the next 7 days, something like this:
Hello Kilian,
I will show you what I do
I did not create any logic like this before so I need a help on how to doing that
I assign to the SourceDataPointList in Line Chart to be equal DataPointList
This is the flow of Home preparation:
and the local variable I have are :
and here is my work
but I think my problem in the aggregation which I create it like this:
and the result of my work is :
Thanks all, you helped me al lot with this.
Hello Ghada,
True- complete the 5 steps, then add one day to the Local Variable;
False- move on to step d)
Regarding the chart itself maybe these examples in documentation will help you.
Kind regards
João Batista wrote:
Hello João,
could you please see my replay above, and respond to me if you can :)
Thanks.
The result is correct if it displays the correct data. I don't know what's in your database :). Just debug it a little, and you'll find the numbers, right?
Thank you for helping meI appreciate that : )
This was an extremely helpful exchange as I struggled with this part of the Bookings Assignment. My graph looks accurate, except for my Y Access. I can't figure out why? What am I missing? Also is the expectation that if a room is checked out it will update the chart immediately?
Hello Lisa could you please share with us the preparation for building this graph. Thanks
Hi Amal - I figured out my issues (see below comment). That said if you need to see my prep of the working prep, I unfortunately cannot help out. I no longer have access to the environment where I built the booking project. Sorry!
I figured it out. I forgot to tie back the YAxis Format action to the chart. Once completed then all was good to go. Thank You!
It does help! Thank you!
transks