-
bkrillsAsked on October 19, 2018 at 8:17 PM
I'm trying to build a form that displays total out-of-service days for gear that's been down for greater than one day.
What are my options to add a field with that goal in mind? Could the form pull info from the last time that a vehicle was marked out of service to create a days out counter on the results?
-
Mike_G JotForm SupportReplied on October 20, 2018 at 1:22 AM
I'm not sure I completely understand your requirements and we may need to ask for more information about it. But if you are looking to display the number of days a gear is out-of-service if it's been out-of-service for more than a day, then you can do the workaround below.
You will need 2 Date fields — The first one is set to have the current date
and the other one will have a custom date which will be the date the gear is first out-of-service.
You will get the difference of the value of the two date fields and display it on the form if it is more than 1 day. This will be done conditionally.
You will need a Form Calculation widget to get the difference between the two date fields.
Here's how it works.
After that, create a condition that will show the Form Calculation widget if its value is more than 1.
Note: The value of the second Date field that is set to have a custom date value will be updated by you on the form builder.
I hope this helps. If, in any case, I have misunderstood your concern, please feel free to letus know.