Hello all,
I have a custom connector that I created using a postman collection. I am calling one of the API calls using the following code on the OnSelect property of a button:
Set(untypedvariable, FreshServices.GetTicketList("application/json","IgAoSF9iL06dGN7JYdQv"))
This is successful. However when I try to make the Untyped Object into text or when I try to use the ParseJSON function on the untyped object I receive the error "The untyped object argument to the function has an incorrect type".
I have read the following documentation on ParseJSON and Untyped objects:
Nothing form the documentation seems to work!
Here are a few options I have tried:
Text(untypedvariable)
ClearCollect(ConnectorData,Table(untypedvariable))
ClearCollect(Tasklist,ForAll(ConnectorData,{id: Text(ThisRecord.Value.id)}))
Set(JSON, Text(ParseJSON(untypedvariable).tickets.subject))
Here is how the JSON load is structured:
{ "tickets": [ { "cc_emails": [], "fwd_emails": [], "reply_cc_emails": [], "fr_escalated": false, "spam": false, "email_config_id": null, "group_id": null, "priority": 3, "requester_id": 1000000678, "requested_for_id": 1000000670, "responder_id": null, "source": 2, "status": 2, "subject": "Ticket Title", "to_emails": null, "department_id": null, "id": 266, "type": "Incident", "due_by": "2017-09-08T23:03:44Z", "fr_due_by": "2017-09-08T15:03:44Z", "is_escalated": false, "description": "<div>this is a sample ticket</div>", "description_text": "this is a sample ticket", "category": null, "sub_category": null, "item_category": null, "custom_fields": { "custom_text": null, "auto_checkbox": false }, "workspace_id": 2, "created_at": "2017-09-08T11:03:44Z", "updated_at": "2017-09-08T11:37:01Z", "deleted": false }, { "cc_emails": [ "ram@freshservice.com", "diana@freshservice.com" ], "fwd_emails": [], "reply_cc_emails": [ "ram@freshservice.com", "diana@freshservice.com" ], "fr_escalated": false, "spam": false, "email_config_id": null, "group_id": null, "priority": 1, "requester_id": 1000000675, "requested_for_id": 1000000670, "responder_id": null, "source": 2, "status": 2, "subject": "Support Needed...", "to_emails": null, "department_id": null, "id": 265, "type": "Incident", "due_by": "2017-09-11T10:34:28Z", "fr_due_by": "2017-09-09T10:34:28Z", "is_escalated": false, "description": "<div>Details about the issue...</div>", "description_text": "Details about the issue...", "category": null, "sub_category": null, "item_category": null, "custom_fields": { "custom_text": "This is a custom text box", "auto_checkbox": null }, "workspace_id": 2, "created_at": "2017-09-08T10:34:28Z", "updated_at": "2017-09-08T10:34:28Z", "deleted": false } ] }