Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X
Iam continously getting error: "Unable To Parse JSON Request" in Application logs while executing the below code from mashup but the code providing results successfully while executing directly from Service. Kindly tell me what is the problem in below code.
The code is:
More about this error:
I tried all of the above. Still it is not working.
I copied the code and added the input params "editedTable" (BOOLEAN) and "AssignedToGroup" (BOOLEAN). I also created a datashape with the same columns as you (but different entity name).
The service is running just fine.
I can only suspect that the "griddata" variable (which seems to be also an input parameter) is invalid somehow. Comment out the "if" cases one by one and see were it throws the error.
Yes when iam including griddata infotable, then iam getting this error.
griddata is a infotable datatype created as one of the field definitions in datatable.
Iam passing this field value from grid to service in mashup.
Then I think that the "gridData" does not have the correct format or is not a valid infotable in some sense. Can you log the "gridData" variable in the ScriptLog and post it here?
logger.warn(JSON.stringify(gridData));
The output is below for the code logger.warn(griddata.ToJSON());
JSON:
{"rows":[{"GroupName":"uu"}],"dataShape":{"fieldDefinitions":{"GroupName":{"name":"GroupName","aspects":{"isPrimaryKey":false},"description":"","baseType":"STRING","ordinal":2},"Order":{"name":"Order","aspects":{"isPrimaryKey":false},"description":"","baseType":"NUMBER","ordinal":3},"ClosingTime":{"name":"ClosingTime","aspects":{"isPrimaryKey":false},"description":"","baseType":"DATETIME","ordinal":5},"Select":{"name":"Select","aspects":{"isPrimaryKey":false},"description":"","baseType":"BOOLEAN","ordinal":1},"ClosedBy":{"name":"ClosedBy","aspects":{"isPrimaryKey":false},"description":"","baseType":"STRING","ordinal":4},"LastScheduledGroup":{"name":"LastScheduledGroup","aspects":{"isPrimaryKey":false},"description":"","baseType":"BOOLEAN","ordinal":6},"Location":{"name":"Location","aspects":{"isPrimaryKey":false},"description":"","baseType":"STRING","ordinal":7}}}}
"result" variable type is Infotable, but griddata type is JSON.
I don't see a conversion in the code?
Hello @AP_10343008,
It looks like you have some responses from some community members. If any of these replies helped you solve your question please mark the appropriate reply as the Accepted Solution.
Of course, if you have more to share on your issue, please let the Community know so other community members can continue to help you.
Thanks,
Community Moderation Team.
I added default empty row in the datashape of infotable type column present in datatable. It made the service execute when there is no value present in the particular column.
Thanks