JSON No Code Connector - Multiple Date Parameters

I have a situation where I need to pass in 4 date parameters into an API. FromMonth, FromYear, ToMonth and ToYear. However the JSON No Code connector allows for only one date parameter, be it single value or a range. That covers 2 of the 4 parameters I need. It would be useful if the JSON No Code Connector supported multiple date parameters.

As a workaround, I used a magicETL to calculate the date values into a dataset and then I configured the JSON connector to read those values from the dataset. But it just seems rather messy to need to create an ETL and a dataset just to calculate dates that are just adding more clutter to our domo instance.

Tagged:
2
2 votes

Active · Last Updated

Comments

  • Interesting idea. If I need four different date ranges, I pull four different JSON connectors and combine them into a dataset. If we had the ability to do multiple date ranges, it would significantly reduce the size of the datasets being held…and reduce the strain for Domo's storage.

    ** Was this post helpful? Click Agree or Like below. **
    ** Did this solve your problem? Accept it as a solution! **

  • DomoDork
    DomoDork Contributor

    @ArborRose

    With the way this particular API is setup, it requires all 4 to be passed in as parameters to get any data back. I thought about doing multiple JSON connectors, but I'd still run into the same issue.

    What I realized right after I submitted this idea is I could just create 2 standard parameters for fromMonth and toMonth, set them both to a static 1 and 12 respectively, then use the date parameter as a range for FromYear and ToYear formatted as yyyy and then use the relative days back set to 1 on both to get the current year based on yesterdays date. So at least that makes it where I'm basically pulling YTD dynamically with no need for an ETL to do date control.

    That said, multiple date parameters is still something I think would be super useful. I'd also add that for dynamic parameters, you can only have one parameter that reads a single column from a dataset to get it's values. I would also enhance the connector to allow multiple dynamic parameters where each parameter can read from different columns in a dataset.

  • Dynamic parameters already happen. It's up to the API on the other side. I can call my APIs and pass them a list of specific customers with comma separators in a single parameter. Or multiple offices with comma separators. As long as the other side can understand it…it works.

    What I am not sure, is how I would expect to see more than one date range pass. Especially when all the APIs out there are generally setup for only one range like startdate through enddate.

    ** Was this post helpful? Click Agree or Like below. **
    ** Did this solve your problem? Accept it as a solution! **