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 / Converting an Array to...
Power Automate
Unanswered

Converting an Array to Integer

(0) ShareShare
ReportReport
Posted on by 260

Hi All,

 

I have a choice list that comes from an external form (cognito forms) it comes through as an array because when I try to put it through as a integer it adds the value for all selected and therefore doesn't let the information go through to my Datasource "Dataverse table" 

 

Example: 

I select Hat(1), Scarf(2) & Socks(3) and the data the comes through = 7 

 

So because of this is there a way that when the data comes in as a array Hat, Scarf & Socks, I can then convert the array to integer 1, 2 & 3 and then patch that through to my Dataverse table choice column

 

Hopefully that makes sense 🙂 

Categories:
I have the same question (0)
  • v-yueyun-msft Profile Picture
    Microsoft Employee on at

    Hi , @carrie-anne27 

    According to your description, you want to convert an array to an Interactive in flow?
    I don't quite understand what you mean.

    Why I select Hat(1), Scarf(2) & Socks(3) and the data the comes through = 7?    1+2+3 =6....

    And can you give me an detailed example you need to realize it in your side?

    For example, give me what you're currently getting and what you want to get in the end in the Power Automate?

     

    Best Regards,

    Yueyun Zhang

     

     

  • carrie-anne27 Profile Picture
    260 on at

    Sorry, it was supposed to be a 6 and not a 7

    I am currently getting

    Hat, Scarf, Socks

    Yeah I want

    1, 2, 3

  • v-yueyun-msft Profile Picture
    Microsoft Employee on at

    Hi , @carrie-anne27 

    Thanks for your response!

    Do you mean you get the array:

    ["Hat", "Scarf", "Socks"

    And you want to convert it to :
    1,2,3 (This is a String not Integer!)

     

    If this , you can refer to :

    vyueyunmsft_0-1710311515129.png

    replace(replace(replace( join(outputs('Compose') , ',') , 'Hat' , '1') , 'Scarf' ,'2' ) , 'Socks' ,'3')

     

    Best Regards,

    Yueyun Zhang

  • carrie-anne27 Profile Picture
    260 on at

    Sorry, I am still new to this. I need to get these choices to a multi choice column.

    The data from cognito forms comes through as ["Hat", "Scarf", "Socks"] and when I try to add row in the dataverse the error comes back as 

    The optionset values sent ["Hat", "Scarf", "Socks"] are not valid integers.

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!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 112 Super User 2026 Season 1

#2
Haque Profile Picture

Haque 52

#3
Ellis Karim Profile Picture

Ellis Karim 51 Super User 2026 Season 1

Last 30 days Overall leaderboard