# Expressions: Displaying certain dates

I'm currently on the final project building the "Bookings" page. I'm trying to have all the bookings who are either 'checking-in' or 'checking-out' displayed on the home page on two different tables. I know I must write a certain code/equation in the expression displaying the check-in/out. Can anyone advise on how to write up the equation?

Solution

Hi Edward Winter,

For this implementation you don't need to add any equation/logical statement in the expression (I mean the expression is right).

1) Create two aggregate in preparation

- Aggregate 1 to bind with First Table Record i.e. Today Check In List

- Aggregate 2 to bind with SecondTable Record i.e. Today Check out List

Aggregate 1:

Source: Booking and Room

Join: With or Without

Filter Condition:

CurrDate() = Booking.CheckInDate and Booking.StatusId = Entities.Status.Booked

Aggregate 2:

Source: Booking, Room and Status

Join: With or Without

Filter Condition:

CurrDate() = Booking.CheckOutDate and Booking.StatusId = Entities.Status.CheckedIn

Hope it helps.

Kind Regards,

Benjith Sam

Solution

Benjith Sam wrote:

Hi Edward Winter,

For this implementation you don't need to add any equation/logical statement in the expression (I mean the expression is right).

1) Create two aggregate in preparation

- Aggregate 1 to bind with First Table Record i.e. Today Check In List

- Aggregate 2 to bind with SecondTable Record i.e. Today Check out List

Aggregate 1:

Source: Booking and Room

Join: With or Without

Filter Condition:

CurrDate() = Booking.CheckInDate and Booking.StatusId = Entities.Status.Booked

Aggregate 2:

Source: Booking, Room and Status

Join: With or Without

Filter Condition:

CurrDate() = Booking.CheckOutDate and Booking.StatusId = Entities.Status.CheckedIn

Hope it helps.

Kind Regards,

Benjith Sam

That worked great!! Thank you for your help!

Ed

Edward Winter wrote:

Benjith Sam wrote:

Hi Edward Winter,

For this implementation you don't need to add any equation/logical statement in the expression (I mean the expression is right).

1) Create two aggregate in preparation

- Aggregate 1 to bind with First Table Record i.e. Today Check In List

- Aggregate 2 to bind with SecondTable Record i.e. Today Check out List

Aggregate 1:

Source: Booking and Room

Join: With or Without

Filter Condition:

CurrDate() = Booking.CheckInDate and Booking.StatusId = Entities.Status.Booked

Aggregate 2:

Source: Booking, Room and Status

Join: With or Without

Filter Condition:

CurrDate() = Booking.CheckOutDate and Booking.StatusId = Entities.Status.CheckedIn

Hope it helps.

Kind Regards,

Benjith Sam

That worked great!! Thank you for your help!

Ed

Welcome :)

Happy to hear that.

Kind Regards,

Benjith Sam