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

Notifications

Announcements

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
    15,402 Super User 2025 Season 2 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
    15,402 Super User 2025 Season 2 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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard