Discussions

Expand all | Collapse all

Creating a duration upon save

  • 1.  Creating a duration upon save

    Posted 04-03-2017 14:51
    I need to capture the duration when a form is initially saved. What I want to do is date the form created and populate via function into a TimeofDay field which is working. However, the duration which is a function field does not get executed. Is there a way to accomplish this? It appears that dynamic form rules don't support functions


  • 2.  RE: Creating a duration upon save

    Posted 04-03-2017 15:26
    The duration from "Date Created" will not work, until the record has been saved.  (Assuming your formula is correct)

    YOu can however use an IF statement and combine it with the function "Now()" to visually display the duration, until the record is saved and [Date Created] has a value.

    If would be something like;

    If(IsNull([Record ID#]), [Start Date / Time Field] - Now(), [Start Date / Time Field] - [Date Created])

    If you have more details I can give a more accurate formula, as I'm assuming you are going to have some field type conversions mixed in there somewhere.


  • 3.  RE: Creating a duration upon save

    Posted 04-03-2017 15:48
    Ok - this makes sense. However, when I try to use Record ID in a formula it says it is an unknown field. Probably as it is a system field. How can I either make it visible or is there a different field that I could use?


  • 4.  RE: Creating a duration upon save

     
    Posted 04-03-2017 15:52
    It is possible that somone may have rename the Record ID field . Just look at the fields in the table and see what the key field is. It will have a yellow key made next to it.


  • 5.  RE: Creating a duration upon save

    Posted 04-03-2017 15:51
    You need the # sign too

    [Record ID#]

    Unless you have renamed that field. The field list will tell you your available fields.


  • 6.  RE: Creating a duration upon save

    Posted 04-03-2017 15:59
    Thanks -that was it -