Forum Discussion

JenniferPeterso's avatar
JenniferPeterso
Qrew Member
6 months ago
Solved

Duration Fields with Pipelines

I am trying to make a Pipeline that will create a set of Tasks (child records) to specific Reports (the parent record). Everything is working until it gets to the Duration field that I use to record default time for a simple task in the list (instead of requiring a logged time entry). If I use the Smart Time entry that I can use inside the duration field, it bombs and tells me it needs to be an integer. I put it in numerically, and it simply does not fill in the duration when the Task record is created after the Pipeline finishes its run. 

Any suggestions for fixing this?



------------------------------
Jennifer Peterson
------------------------------
  • Are you defining the template from within the pipeline and hardcoding it - or are you pulling from a 'Template' Table? 

    I ran a few tests of moving duration from one field to another with no issue. I hardcoded it as it sounded like you were doing and ran into what I imagine is your error. Long and the short is that duration in QB is actually a metric of milliseconds. So if you're trying to populate a duration field via Pipeline and you're hardcoding the template in the pipeline - then you'll need to provide the integer value of the number of milliseconds. So lets say if you are populating a duration of 1 day - then you instead need to pass in the number 8640000. The smart days is just a setting for how to display the underlying numeric value of the duration, so it won't have any effect on the translation within the Pipeline.



    ------------------------------
    Chayce Duncan
    ------------------------------

2 Replies

  • Are you defining the template from within the pipeline and hardcoding it - or are you pulling from a 'Template' Table? 

    I ran a few tests of moving duration from one field to another with no issue. I hardcoded it as it sounded like you were doing and ran into what I imagine is your error. Long and the short is that duration in QB is actually a metric of milliseconds. So if you're trying to populate a duration field via Pipeline and you're hardcoding the template in the pipeline - then you'll need to provide the integer value of the number of milliseconds. So lets say if you are populating a duration of 1 day - then you instead need to pass in the number 8640000. The smart days is just a setting for how to display the underlying numeric value of the duration, so it won't have any effect on the translation within the Pipeline.



    ------------------------------
    Chayce Duncan
    ------------------------------
    • JenniferPeterso's avatar
      JenniferPeterso
      Qrew Member

      That was exactly the issue. Thank you



      ------------------------------
      Jennifer Peterson
      ------------------------------