Adding a calculation field for duration of service

Tap Forms – Organizer Database App for Mac, iPhone, and iPad Forums Using Tap Forms Adding a calculation field for duration of service

Viewing 4 reply threads
  • Author
    Posts
  • June 21, 2019 at 8:14 AM #35113

    David Goodwin
    Participant

    I’d be grateful if someone could show me how to add a new field which will calculate the number of days from an existing field which gives a start date of a ser vice commencing.

    I need to be able to calculate the number of days from that date to now.

    many thnaks

    June 22, 2019 at 12:12 AM #35120

    Brendan
    Keymaster

    Hi David,

    This is the formula you want:

    DAYS(Start Date; NOW())

    Make sure Tap Forms returns a Number value for the formula. If on iOS, the Start Date would have square brackets around it when you choose it from the Fields list (e.g. [Start Date]). On Mac, just double-clicking on the field in the Fields list will insert a field token for you into the formula.

    Thanks!

    Brendan

    June 24, 2019 at 1:56 AM #35129

    David Goodwin
    Participant

    Hi there,
    ,amy thanks for your reply.

    I’m still not sure how I construct the script in the box to make this script work.

    I keep getting error repsonses.

    Could you show me where the field I want to use as a start date (on line 2) should sit within this script.

    many thanks

    Attachments:
    You must be logged in to view attached files.
    June 24, 2019 at 7:42 AM #35131

    David Goodwin
    Participant

    No need to reply. I got it to work. many thanks.

    June 24, 2019 at 10:15 AM #35132

    Brendan
    Keymaster

    Hi David,

    I’m glad you got it working now.

    You were mixing a Script field with the Calculation field formula I provided.

    Thanks,

    Brendan

Viewing 4 reply threads

You must be logged in to reply to this topic.