Hi everyone,
I’m trying to send dates to a server that expects ISO-formatted date strings. I’ve got a bunch of dynamic fields which are fetched from an RPC, some of which are dates and some of which aren’t. These fields are not known in advance.
If I knew in advance which fields were dates, I could just do this in the Communication part of the module:
"body": {
"myfield": "{{formatDate(parameters.myfield, 'X')}}",
},
However, there is not an obvious way to achieve that only when working with fields which I’ve got from an RPC. At the moment, this is what the body for this request looks like:
"body": {
"{{...}}": "{{omit(omit(omit(parameters, 'accountSid'), 'stackSid'), 'objectSid'}}"
},
The end result seems to be that, with this approach, dates are getting sent to the server in the local format, rather than as ISO strings.
I would like to know if there is any way to format the date parameters as ISO strings while not breaking any other parameters. Custom IML functions look like a possible alternative, but I don’t have access to these yet, so I would like to know if there’s a workaround as I would expect this to be a relatively common problem when working with dynamic fields from an RPC.
Thank you in advance!