cancel
Showing results for 
Search instead for 
Did you mean: 

workflow definition language needs to be expanded

The WDL is great for adding more capabilities to the Flows, but I still feel constrained by its limitations.

 

I'm not sure if the Flow team has influence over the language or can talk to the team that maintains it, but more functionality needs to be added for simple actions that are common in other languages and necessary for conditions, filters and data manipulation. A couple starters:

  • Join an array: join(array, optional connector string) outputs a single string
  • DateTimeDiff to find the timespan between two dates: datediff(datetime1, datetime2) outputs difference in seconds or milliseconds

I'm sure there are more that could be added that might be easy fixes for some of the issues other people have on the forums.

Status: New
Comments
Level: Powered On

I am supporting the idea to be able to find the timespan between two dates using a function, which is currently not available.

Level: Power Up

DateDiff needs to be implemented

Level: Powered On

Definitely need a date diff. Here's my workaround:

 

if(... check date is not empty...,
  int(
    div(
      sub(
        ticks(utcNow()),
        ticks(coalesce(...date...), utcNow()))
      ),
      864000000000
    )
  ),
  null
)

It's incredibly difficult to use due to the inconsistent quote escaping inside content tokens, but it works.

 

The extra `coalesce()` is needed to avoid errors with `ticks()` because `if()` computes both sides of the statement regardless of the condition result (another topic). 

Level: Powered On

I posted an extension to the workaround to count only weekdays over here.

Level: Power Up

I am also supporting the idea to be able to find the timespan between two dates using a function, which is currently not available.