Formula avanzata orario

  • ufficioprogrammazione
    Domanda del 1 dicembre 2023 alle ore 10:46

    Buonasera,

    avevo bisogno di una risoluzione per una colonna con formula avanzata che definisce, in base a due campi data e ora, tre categorie:

    se l'orario e compreso tra le 6:00 e le 13:30 dovrà darmi mattino,
    se l'orario e compreso tra le 13:30 e le 21:00 dovrà darmi mattino,
    se l'orario e compreso tra le 21:00 e le 04:30 dovrà darmi mattino.

    Avrei urgentemente bisogno di una risposta.

    Grazie

    Jotform Thread 9640231 Screenshot
  • Mikhail Jotform Support
    Risposta del 1 dicembre 2023 alle ore 13:39

    Hi ufficioprogrammazione,

    Thanks for reaching out to Jotform Support. Unfortunately, our Italian Support agents are busy helping other Jotform users at the moment. I'll try to help you in English using Google Translate, but you can reply in whichever language you feel comfortable using. Or, if you'd rather have support in Italian, let us know and we can have them do that. But, keep in mind that you'd have to wait until they're available again.

    Now, let me help you with your question. If my understanding is correct, you want a text to show "Morning" when the times entered are in between those you set. However, all conditions are equals to "Morning". You may want to check your question if that's correct. But I still created a sample form. Let me show you how to do it:

    1. In Form Builder, click on the Add Form Element menu on the left side of the page.
    2. Under the Basic tab, drag and drop 2 Time element to your form. Formula avanzata orario Image 1 Screenshot 50
    3. Click the Time Element and click Gear Icon. Then go to Options Tab and choose 24 Hour.
    4. Do this again on the other Time Element. Formula avanzata orario Image 2 Screenshot 61
    5. Click on the Add Form Element menu on the left side of the page. Under the Basic tab, drag and drop a Short Text element to your form.
    6. Open your form in Form Builder, and in the orange navigation bar at the top of the screen, click on Settings.
    7. On the left pane, click Conditions, then click Add Condition.
    8. Choose Update/Calculate Field and copy the calculation below: Formula avanzata orario Image 3 Screenshot 72

    To show you the difference, I only added one condition:

    Formula avanzata orario Image 4 Screenshot 83

    You can check out my cloned form here. Which you can also clone to check its configurations.

    Give it a try and let us know how it goes.