Hello Team,
Can we have ideas to pass dates as parameters in json in Alteryx designer.
Sample json below :
{
"report": "ABCD",
"reportingEngine": "PLATFORM",
"timeField": null,
"startTime": 1688149800000,
"endTime": 1688668199999,
"timeZone": "Asia/Hyderabad",
"page": 0,
"pageSize": 10,
"filters": [
{
"dimensionName": "SN_MESSAGE_TYPE",
"filterType": "IN",
"values": [
"2"
],
"details": {
"type": "DIMENSION"
}
We can to startTime and endTime as parameters.
Sorry, typo here .
We can to pas startTime and endTime as parameters in json payload
Hey @narula8, in the option above what you have selected in your screenshot, you can see that there is a 'Take Query String/Body from Field' option. If you hit this then we can build the JSON beforehand in a Formula tool - you just need to split the expression into several parts and put a ToString(<Start/End>) field where they belong. You can see how I've gone about this in the workflow attached. I've noticed that you're using an extended epoch time which is ms since January 1st 1970 so if you're starting with raw dates you'll need to do a calc like the following and then plug this into where the ToString() instances are:
DateTimeDiff(<DateField>,'1970-01-01 00:00:00','ms')
User | Count |
---|---|
107 | |
82 | |
70 | |
54 | |
40 |