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 / Expecting string getti...
Power Apps
Unanswered

Expecting string getting Object from API Call sent to Power Apps

(0) ShareShare
ReportReport
Posted on by 4

Good Day:

 

I am sending the following back to Power Apps after using the select function in Power Automate.  

RiskyBrass_0-1704044192080.png

 

I am getting an error message in Power Apps, after using the following formula to create a collection of the appointments to display in a vertical gallery:

 

ClearCollect(
    colAppointments,
    ForAll(
        Table(ParseJSON(GetPatientAppointments.Run(Appointment_Date.SelectedDate, PatientID.Text).result)),
        {
            appointmentid: Value(Value.appointmentid),
            appointmenttype: Value(Value.appointmenttype)
        }
    )
)
 
When I press the button it runs the flow successfully and returns the array of appointmentids and appointmenttypes.  However, Power Apps displays the "Expecting String but got Object".
 
How do I change the flow or power apps expression to visualize each appointment in the gallery/collection variable.  
 
Thanks
 
 
Categories:
I have the same question (0)
  • Pstork1 Profile Picture
    69,649 Most Valuable Professional on at

    Can you show a screenshot of how you have configured the Respond to Power Apps action?  If you want to return an array of results to store in a table you need to use the HTTP response action. Respond to Power Apps can only send an object with specific simple properties, not an array of objects. If you are trying to use the new ParseJSON() function in Power Apps then the response needs to be a single object with a single text property.

     

  • RiskyBrass Profile Picture
    4 on at

    Hi Pstork1,

     

    Thanks for your reply.  This is coming together!

    RiskyBrass_0-1704044725360.png

    Given your suggestion, I will try to use the HTTP response action to send the data back to Power Apps, rather than using the Respond to Power Apps action?

     

    Thanks

  • Pstork1 Profile Picture
    69,649 Most Valuable Professional on at

    Ok, that all looks correct, but I think the casts you are doing in your Table are wrong.  You are returning string values, but trying to cast them to values, not strings.  You also aren't using ThisRecord. to identify the individual fields in the ForAll().  Try this code instead.

    ClearCollect(
     colAppointments,
     ForAll(
     Table(ParseJSON(GetPatientAppointments.Run(Appointment_Date.SelectedDate, PatientID.Text).result)),
     {
     appointmentid: Text(ThisRecord.Value.appointmentid),
     appointmenttype: Text(ThisRecord.Value.appointmenttype)
     }
     )
    )

     

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 429 Most Valuable Professional

#2
11manish Profile Picture

11manish 191 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 122 Super User 2026 Season 2

Last 30 days Overall leaderboard