Method Community

 

Age Field

Last post 02-15-2013 2:17 PM by Method_Adam. 7 replies.
Page 1 of 1 (8 items)
Sort Posts: Previous Next
  • 02-14-2013 12:43 PM

    Age Field

    I am trying to create a field that automatically calculates the client's age.  I have already created a field where we enter the birth date, and I created another field where the default date is the current date (which is hidden from view on the screen).  I tried doing a 'date difference' calculation between the 2 fields but I can't get it to work.  How should I do this?

  • 02-14-2013 1:20 PM In reply to

    Re: Age Field

    Answer

    Hi Ben,

    They way you did it should work.  The difference should be saved as an action result.  How is it not working? 

    - Adam

    Adam Lyons
    Manager of Support
    Method Integration
    a.lyons@method.me
  • 02-14-2013 1:42 PM In reply to

    Re: Age Field

    What are you adding the event as?  Button click?  Or does it matter?

  • 02-14-2013 1:51 PM In reply to

    Re: Age Field

    No matter what I try, nothing happens.  

  • 02-14-2013 2:29 PM In reply to

    Re: Age Field

    Answer

    Ben,

    You can use the DateChanged event on the DatePicker object (the field where they select their birthdate), and add the action there.  Remember that the value is saved as an action result, so you would need to use Enter Value into Field on Screen action to show the value in a text field.

    - Adam

    Adam Lyons
    Manager of Support
    Method Integration
    a.lyons@method.me
  • 02-15-2013 2:08 PM In reply to

    Re: Age Field

    I have everything set up this way, and it only sends the date entered into the DOB field to the Age field.  It appears that there isn't a calculation made, but I'm pretty sure it's entered correctly.  Does the field that it's send to need to be an integer field instead of text?

  • 02-15-2013 2:12 PM In reply to

    Re: Age Field

    Nevermind, I finally got it...thanks!

  • 02-15-2013 2:17 PM In reply to

    Re: Age Field

    Great to hear you got it working!  Smile

    - Adam

    Adam Lyons
    Manager of Support
    Method Integration
    a.lyons@method.me
Page 1 of 1 (8 items)