Expand my Community achievements bar.

Radically easy to access on brand approved content for distribution and omnichannel performant delivery. AEM Assets Content Hub and Dynamic Media with OpenAPI capabilities is now GA.

Livecycle - Calculation Script Error

Avatar

Former Community Member

Here is my dilemma: we sell tickets for a charity event and each ticket cost $15.00.

How do I get the grand total, numerical box to calculate the dollar value based on the number of tickets they entered?

Example:

Ticket: 2

Grand Total: $30.00

I labeled the ticket numercial box, ticket and the grand total numerical box, grand_total.

Not sure how to write the script for the grand total numerical box and tried what I think is logical and it does not work.

Please help.

1 Reply

Avatar

Level 3

In the GrandTotal cell add a script (in the script editor) to the Calculate event (make sure the language is Javascript)

ticket.rawValue*15

this is assuming the tickets are always $15.00....otherwise you would replace 15 with ticketPrice.rawValue....where ticketPrice was the name of the cell receiving the price

Hoep this helps