cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - You can Bookmark boards, posts or articles that you'd like to access again easily! X

Passing input parameter to Windchill report through info engine

IvanIlicic
7-Bedrock

Passing input parameter to Windchill report through info engine

Hello,

I'm trying to execute a Windchill report from Thingworx using InvokeIETask with following inputs:

    "Task""ExecuteReportTemplate.xml",
    "Params": [{
            "Name""object_ref",
            "Value""OR:wt.query.template.ReportTemplate:1552736"
        },{
            "Name""input",
            "Value""startDate=\"2021-04-12\" AND endDate=\"2021-06-22\""
        }
    ]

but it results in error:

{
    "error": {
        "code"null,
        "message""The timestamp value \"\"2021-04-12\" AND endDate=\"2021-06-22\"\" could not be parsed.  The value must be parsed using one of the following Java formats: \"yyyy:MM:dd:HH:mm:ss z\", \"yyyy-MM-dd HH:mm:ss z\", \"yyyy:MM:dd:HH:mm:ss\", \"yyyy-MM-dd HH:mm:ss\", \"MM/dd/yyyy HH:mm:ss\", \"dd/MM/yyyy HH:mm:ss\", \"yyyy/MM/dd HH:mm:ss\", \"M/d/yy, h:mm a\", \"M/d/yy\", \"yyyy-MM-dd\", \"yyyy-MMM-dd\", \"yyyy/MM/dd\", \"yyyy/MMM/dd\", \"yyyy:MM:dd\", \"yyyy:MMM:dd\", \"yyyy,MM,dd\", \"yyyy,MMM,dd\", \"yyyy MM dd\", \"yyyy MMM dd\", \"MM/dd/yyyy\", \"MM-dd-yyyy\", \"MM:dd:yyyy\", \"MM dd yyyy\", \"MMM/dd/yyyy\", \"MMM-dd-yyyy\", \"MMM:dd:yyyy\", \"MMM dd yyyy\", \"dd-MMM-yyyy\" ."
    }
}
I played with different date formats, with or without escape quotes, single/double quotes, none of that helped.
Trying without input parameters startDate, endDate it works and returns the whole recordset.
 
On Windchill side the report template parameters and criteria are configured as shown on attached images.
If I run the report through Windchill UI it executes correctly respecting the startDate and endDate parameters, so I assume the report configuration is OK.
 
Does anyone know how to pass the parameters correctly, or have an idea what could be wrong here?
Thanks.
ACCEPTED SOLUTION

Accepted Solutions

Thanks @rhart for the suggestion, it didn't solve the issue but you pointed me in the right direction.

Here is the format which works:

    "Task""ExecuteReportTemplate.xml",
    "Params": [{
        "Name""object_ref",
        "Value""OR:wt.query.template.ReportTemplate:1552736"
    }, {
        "Name""input",
        "Value""startDate=2021-06-22 14:26:00, endDate=2021-06-22 14:27:00"
    }]

View solution in original post

4 REPLIES 4

Hi @IvanIlicic

The date format is OK I think, but there’s two parameters in the same input.

Perhaps try to use a separate input for each parameter.

 

 

Thanks @rhart for the suggestion, it didn't solve the issue but you pointed me in the right direction.

Here is the format which works:

    "Task""ExecuteReportTemplate.xml",
    "Params": [{
        "Name""object_ref",
        "Value""OR:wt.query.template.ReportTemplate:1552736"
    }, {
        "Name""input",
        "Value""startDate=2021-06-22 14:26:00, endDate=2021-06-22 14:27:00"
    }]

Glad I could help 👍

Thanks @d_graham , you explained the problem perfectly.

The format that worked for me is with comma separated parameters but as a single Value (STRING):

"Value""startDate=2021-06-22, endDate=2021-06-22"

 

Announcements


Top Tags