web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Untyped Object can't b...
Power Apps
Unanswered

Untyped Object can't be converted to Text or String

(0) ShareShare
ReportReport
Posted on by 200

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 } ] }

 

Categories:
  • BCBuizer Profile Picture
    22,854 Super User 2026 Season 2 on at

    Hi @apaulso9 ,

     

    To make this work you have to type each nested table/object/key value pair. For instance, to get the subject of the first ticket, first you need to type "tickets" to a table, select the first ticket, and then type the subject to a text:

    BCBuizer_1-1712870094858.png

     

    With(
     {FirstTicket:First(Table(ParseJSON(TextInput1.Text).tickets)).Value},
     Text(FirstTicket.subject)
    )

     

     

    More background and options can be found in this topic: https://powerusers.microsoft.com/t5/Building-Power-Apps/Bind-complex-json-to-label-and-dropdown-of-gallery-in-canvas-app/m-p/2571154

  • apaulso9 Profile Picture
    200 on at

    @BCBuizer Thank you for that hint! I am still facing my issue that the ParseJSON function for 

    ParseJSON(TextInput1.Text).tickets

    will not accept my API call response as it is an "untyped object". 

    Is there a way to fix this?

  • BCBuizer Profile Picture
    22,854 Super User 2026 Season 2 on at

    Hi @apaulso9 ,

     

    That's what I was trying to say: for complex JSONs, you need to type everything. So to get the array of tickets, you need:

    Table(ParseJSON(TextInput1.Text).tickets)

    This will return you JSON strings as well, which in turn need to be parsed, hence the example above for subject.

  • apaulso9 Profile Picture
    200 on at

    @BCBuizer I understand what you are saying but to get the "TextInput.Text" I need to read the call I am making as text. I can't do this because none of the calls to make the output of the custom connector into text does not work. I receive the error "Untyped Object"

  • BCBuizer Profile Picture
    22,854 Super User 2026 Season 2 on at

    Hi  @apaulso9 , 

     

    From your opening post I understood you already had that part covered, although you may have to convert that into a text:

     Set(untypedvariable, Text(FreshServices.GetTicketList("application/json","IgAoSF9iL06dGN7JYdQv"))) 

     

    Then instead of referencing "TextInput1.Text", just refer this variable. For the example I gave, this means:

     With( {FirstTicket:First(Table(ParseJSON(untypedvariable).tickets)).Value}, Text(FirstTicket.subject) ) 
     

    BCBuizer_0-1713297751918.png

     

  • apaulso9 Profile Picture
    200 on at

    I have correctly made the call and stored it in a variable called "UntypedObject".

     

    This call returns an untyped object. I then try to change that untyped object into text or a string. I can't, I always recieve the error that the TEXT function can't take in an untyped object. 

     

    I need to figure out how to change my untyped object into a string so I can then parse the JSON.

  • Frix_Zed123 Profile Picture
    2 on at

    Were you able to convert the untyped object into a string?

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 405 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 368

#3
WarrenBelz Profile Picture

WarrenBelz 244 Most Valuable Professional

Last 30 days Overall leaderboard