Question
HCL Technologies
PH
Last activity: 7 Nov 2019 13:52 EST
I am unable to compute for the total amount given rent days and cash value
[Using Pega 8.3 Personal Build]
Hi,
I am making a booking application that allows users to book a room.Given a date range, the total amount of booking days is computed. However, I am unable to compute for the total cost of the booking given the booking days and a constant set price for a chosen room.
How can I make it compute for the total cost of stay?
I have already set-up the computation for the total cost (.TotalBookedDays*.RoomInfo.Rate. The only problem is it does not reflect in the UI
[Using Pega 8.3 Personal Build]
Hi,
I am making a booking application that allows users to book a room.Given a date range, the total amount of booking days is computed. However, I am unable to compute for the total cost of the booking given the booking days and a constant set price for a chosen room.
How can I make it compute for the total cost of stay?
I have already set-up the computation for the total cost (.TotalBookedDays*.RoomInfo.Rate. The only problem is it does not reflect in the UI
I have attached screenshots for reference.
Hi @MiguelRichneyD,
It seems the key here is where the set up of the computation (.TotalBookedDays*.RoomInfo.Rate) exist.
Is it in a data transform or a activity.
To achieve your requirement using data transform. I compose the computation as shown below
Create a Data Transform > choose set method and select target property > Then click on grear icon at end of row
The following screen will appear, click on the browse link
Hi @MiguelRichneyD,
It seems the key here is where the set up of the computation (.TotalBookedDays*.RoomInfo.Rate) exist.
Is it in a data transform or a activity.
To achieve your requirement using data transform. I compose the computation as shown below
Create a Data Transform > choose set method and select target property > Then click on grear icon at end of row
The following screen will appear, click on the browse link
Select math > MultiplicationExchange method as shown below, click on plus icon to get the method on work area
Compose the method with properties as shown below and click submit
It will be shown in data transform as shown below
Save the data transform.
Now, call the data transform on the change of the "Rooms" dropdown, Configure the action set as should be like "Refresh-this-section with Data Transform" or "Refresh-other-section with Data transform". Refresh of the section where total cost present in the key. Without refresh we dont see the computed value on the screen.
Hope this helps.
Please feel free to reply with questions if any.
Thank you,
Regards, Cherb.