I am trying to create a quote page on one page that retrieves data from a Dataset, and uses data within the page fields, to create a Cost.
ie. 4 fields on the Page: Start Date [Date], No. of Nights [Text Dropdown], Number of Adults [Number], Number of Children [Number].
In the Database there are the following fields: Title (KeyField), Start Date [Date], End Date [Date], Nights [Text], Adult Price [Number], Child Price [Number], BerthMax6 [Number], BerthMax8 [Number]
From the Setup Fields, I have added a button that calls the right record from the database to show the Child Price and Adult Price based on the Date in the form falling between the Start Date and End Date in the Database, as well as matching the Nights in the form to the Database.
I want to be able to calculate a price rather than display the 2 prices. So the calculation should be…
(Adult Price (from Dataset) x Number of Adults (from Form) ) + (Child Price (from Dataset) x Number of Children (From Form))
This should start me off, but I also want to be able to do a further calculation at some point.
If there are 6 or Less Total People Booking (No of Adults + No of Children) then the Max6Berth Price should be used if the total price is more than this value, if there are 7 or 8 Total People Booking, then the Max8Berth should be used if the Total Price is more than this value.
Any help with this would be great! I can find out details about using Hooks, but I don’t think they work for this because there is data in the Dataset as well as the Input Forms.
Sorry, I am new to most of this, if this is already covered somewhere, please could you add a link, I have searched and just can’t find something that covers this.
Many Thanks
Dave