Skip to main content
February 5, 2009
Question

Calculating values with variables

  • February 5, 2009
  • 1 reply
  • 331 views
Hi all,

I have just bought version 4 and am trying to get my head round using variables. I work for a bookmakers so everyone who comes into the shops MUST be 18, what I want to do is tell shop staff in the CBT something along the lines of:
Ask for photo ID with a Date of Birth on it, remember the customer must be over 18 so this month their date of birth would have to be ($$cpCurrentMonth$$ - 1) ($$cpCurrentYear$$ - 18) and it would say something to the effect of January 1991.

I am not sure how to do this any ideas please
Thanks
Erika
This topic has been closed for replies.

1 reply

cp_user
Participating Frequently
February 6, 2009
Hi Erika,

Please follow below steps -

1. Create a user variable "Age"
2. Develop advanced actions as below and save them
Age = cpInfoCurrentYear - 1
3. Call the saved advanced action from any event (On Slide Enter etc)

thanks
cp_user