Hi,

I've made New Booking Screen

In Service Studio:

but, the Room and Price didn't show correctly. Could anyone fix it? and If I click Book Room, in the list of bookings didn't show Room and Price as same as in New Booking Screen.

Browser:

I've attached the oml,

Thanks.

link Bookings Lesson Materials: https://www.outsystems.com/learn/lesson/849/bookings-assignment/?LearningPathId=0

Hi Ayu,


Are you refreshing the expression with ajax and are you sure that those variables have the correct value?

Hello Ayu,

I installed your application here.
Despite a mysterious booking already there (bootstrap?), everything seems fine.I am able to create a new booking and enter existing bookings and everything is showing correctly.

Cheers.

P.S: Status should be set automatically in the "book" action  (to "Booked").

Nuno Rolo wrote:

Hi Ayu,


Are you refreshing the expression with ajax and are you sure that those variables have the correct value?

Hi Nuno,

Thanks for the reply,

I forget to drop Ajax, and now I already dropped after Assign but seems like nothing change here.


Oh, and by the way, you swapped the Room Number with the Room price in the expression.

Make sure that you are assigning the proper values to the proper variables.

You don't need an ajax, as the Get Available Room button is set to "Submit".

This was done WITHOUT changing your code.

If I enter this booking from list, everything seems fine:

Solution

This is where you have a problem:

In the SELECT, the RoomNumber comes first, so it is putting the RoomNumber into the PRICE attribute of the structure. 

Change the order in the structure or in the SELECT.

Solution

Even better.

I didn't install it to check just following the common fails.

Eduardo Jauch wrote:

Hello Ayu,

I installed your application here.
Despite a mysterious booking already there (bootstrap?), everything seems fine.I am able to create a new booking and enter existing bookings and everything is showing correctly.

Cheers.

P.S: Status should be set automatically in the "book" action  (to "Booked").


Hi Eduardo,

Thanks for the reply

I added bootstrap data for booking contains about list booking, Is that the problem?
btw, how to set Status automatically to "Booked"

Eduardo Jauch wrote:

This is where you have a problem:

In the SELECT, the RoomNumber comes first, so it is putting the RoomNumber into the PRICE attribute of the structure. 

Change the order in the structure or in the SELECT.

Thanks a lot, Eduardo,
This is my problem :)


Just for reference:

When you "book" the reservation, the status will always be the same: Booked.
So, instead of letting the user chose the status in the form, just add an Assign before the Create / CreateOrUpdateBooking, and set the status of the Form Record Booking directly there.

Cheers.

Eduardo Jauch wrote:

Just for reference:

When you "book" the reservation, the status will always be the same: Booked.
So, instead of letting the user chose the status in the form, just add an Assign before the Create / CreateOrUpdateBooking, and set the status of the Form Record Booking directly there.

Cheers.

Yes, Thanks a lot Eduardo

I just made it.