Forum Discussion

DavidBerndt's avatar
DavidBerndt
Qrew Cadet
8 years ago

Creating a duration upon save

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
  • MCFNeil's avatar
    MCFNeil
    Qrew Captain
    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.
  • 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?
    • AviSikenporePro's avatar
      AviSikenporePro
      Qrew Trainee
      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.
  • You need the # sign too

    [Record ID#]

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