How do I use calculate field value to automatically populate hidden category field?

  • Project_Awesome
    Asked on June 14, 2024 at 5:14 AM

    Hi, I am using the calculate field for the first time and am not sure how to get it to work.

    I have a field asking my audience for their year of birth in a dropdown menu.

    Based on their age, they will be sorted into 1 of 4 categories:

    2008 - 2009 = UpperSec

    2010 - 2011 = LowerSec

    2012 - 2014 = UpperPri

    2015 - 2017 = LowerPri

    UpperSec, LowerSec, UpperPri, LowerPri are strings that will be calculated automatically and input into a hidden "Category" field.

    However, upon testing, the category field is empty. I have attached a screenshot of my condition formatting, please advise on what I am doing wrong and what I should do instead.

    Thank you :)

    Jotform Thread 15925251 Screenshot
  • Sonnyfer JotForm Support
    Replied on June 14, 2024 at 5:28 AM

    Hi Project_Awesome,

    Thanks for reaching out to JotForm Support. I cloned your form, temporarily shown the category field and see that what you're trying to do is already working. Check out my screencast below to see my results:

    How do I use calculate field value to automatically populate hidden category field? Image 1 Screenshot 20

    Can you try it again and see how it goes? If you run into the same issue again, let us know, and we'll do some more testing to see what's going on. 

    Let us know if you need any more help.

  • Project_Awesome
    Replied on June 18, 2024 at 4:39 AM

    Hi Sonnyfer, thank you for helping to verify that it works. I have checked the submissions in Jotform tables and it works there.

    However, I am using the integration to automatically export the responses to Google Drive, and the Category cell is left empty (just checked and this is still the case). Do you have any advice on how to make this work?How do I use calculate field value to automatically populate hidden category field? Image 1 Screenshot 20

  • Mary JotForm Support
    Replied on June 18, 2024 at 4:51 AM

    Hi Project_Awesome,

    I checked and see that the Category field is not being sent to your Google Sheets:

    How do I use calculate field value to automatically populate hidden category field? Image 1 Screenshot 20

    You need to check Category to send it to Google Sheets in your integration settings.

    Let us know if you have any other questions.

  • Project_Awesome
    Replied on June 18, 2024 at 10:18 AM

    Hi Mary, thank you so much for this - all good now :)

 
Your Answer