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 Automate / How to convert an "obj...
Power Automate
Unanswered

How to convert an "object" to a 'string' or 'integer from Teams Forms?

(2) ShareShare
ReportReport
Posted on by

I am using Teams Forms to collect responses from employees. I then select "get response" and use switch to divide them into two separate categories (based on the form selection). However, I am getting this error. I'm rather new to using variables in PA. I'm not sure if I'm using the correct dynamic content in "switch" or in my "apply to each". Here is my flow:

 

1)

2.png

 

 2)

3.png

 

3)

4.png

 

And this is the error message:

1.png

 

Which dynamic content contains the form response data? Is it 'body' or 'data' or 'metadata'?

Categories:
I have the same question (0)
  • trice602 Profile Picture
    16,138 Super User 2026 Season 1 on at

    Hi @KATHYTA ,

     

    The dynamic content you want to use in the switch is not body but the question itself from get responses. So if your question was named "Type" then that is the dynamic content you select.

     

     

  • KATHYTA Profile Picture
    on at

    Hi @trice602, the form contains multiple questions. Dependent on the selection of the first question, it will create an item in two separate sharepoint lists. In the sharepoint list is where I enter the "dynamic content" answer for the different questions asked. However, I don't what to fill in "on" of the "Switch" action. The error message pertains to this.

  • trice602 Profile Picture
    16,138 Super User 2026 Season 1 on at

    Hi @KATHYTA ,

     

    The effective use of switch action against a get response form action is to switch on the dynamic content of the question.  I found a form flow and added it here to show you.  Here I have a question in the form choose a time slot, and there are some choices to pick from.

     

    In the switch, instead of body, I use the dynamic content from the question "choose a time slot" and then in my individual cases, case1 Time1, case2 Time2, etc, etc.

     

    trice602_3-1720196924599.png

     

     

     

    trice602_2-1720196890710.png

     

     

     

     

  • KATHYTA Profile Picture
    on at

    Hi @trice602, thank you for your reply! I think the issue also is that I am not using Microsoft Forms but Teams Forms. Their dynamic content outputs are slightly different. See below flow:

     

    5.png

     

    When I run this, it tells me to convert the response from an object to a string or integer. The items do not populate in Sharepoint.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 598

#2
Valantis Profile Picture

Valantis 477

#3
Vish WR Profile Picture

Vish WR 370

Last 30 days Overall leaderboard