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

Community site session details

Session Id :
Power Automate - Building Flows
Answered

Variable of type array cannot be initialized or updated with value of type string. Variable supports only types of array Power Automate

(0) ShareShare
ReportReport
Posted on by 431

Hello Power users,

 

I'm stuck at an issue assigning value to an array variable. Here're the steps that has my flow.

 Step1: Initialized a variable of type string with name "VarVariable"

Step2: Initialized a variable of type array with name "ArrayVariable"

Step 3: Added string value to VarVariable, let's say the string is ' Need help with something, can someone help me '

Step 4: Composed the variable with Split action to convert to array format with expression "Split(variables('VarVariable'),',')".

Step 5: Assigned it to Array Variable with the output from above composed action. This is where I see error while testing.

 

Not sure what I'm missing. Can someone please help me?

 

Thank you so much in advance!

I have the same question (0)
  • efialttes Profile Picture
    14,756 on at
    Re: Variable of type array cannot be initialized or updated with value of type string. Variable supports only types of array Power Automate

    Hi @KrishR !
    So your challenge is how to add an item to an Array of type string, right?
    If my understanding is correct, you can do it by means of 'append to array' action block

    efialttes_0-1692883566090.png

     


    Hope this helps!

  • KrishR Profile Picture
    431 on at
    Re: Variable of type array cannot be initialized or updated with value of type string. Variable supports only types of array Power Automate

    Hi @efialttes ,

     

    Thanks for the help. Actually, I'm trying to initialize two variables, one with type String and another with Array. I have string value coming from a Sharepoint column and converting it to array so that I can assign it to variable of type array.

     

    Additional steps I followed are mentioned above. Hope I answered your question.

     

    Thanks again!

  • efialttes Profile Picture
    14,756 on at
    Re: Variable of type array cannot be initialized or updated with value of type string. Variable supports only types of array Power Automate

    Hi again!
    You mention an error while testing. Is your flow terminated with an execution error? Or is the flow executed successfully, but the new array variable is not storing what you expect?

    Next
    What dynamic content/EDL expression are you assigning to your VarVariable of tipe string? What's the value of your SP column field when you test and experience an error? 

    If your SP column field has at least one character, the WDL expression you shared should work fine. Please note single quotes '' are needed around the comma, if you use ´´ instead, Flow editor will report that the expression is invalid.

    efialttes_1-1692957317598.png

    If your SP column field is empty, when executing your flow it will probably fail; please have a look to this thread for an expression identifying empty SP column value
    https://powerusers.microsoft.com/t5/Building-Flows/Condition-when-there-is-nothing-in-a-SharePoint-item-in-a-cell/m-p/2319004
    Hope this helps

  • Verified answer
    efialttes Profile Picture
    14,756 on at
    Re: Variable of type array cannot be initialized or updated with value of type string. Variable supports only types of array Power Automate

    Hi @KrishR !
    Did you manage to overcome your challenge?

    If so, my humble suggestion is to please mark this topic as "Solved" by clicking "Accept as a solution". THis way others with the same problem can find a solution faster. Please also note you can even select several responses as solution, even from different community members!

     

    Flow_AcceptSolution.png

     

    Thanx for your help making this community great!

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 659 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 386 Moderator

#3
chiaraalina Profile Picture

chiaraalina 290

Last 30 days Overall leaderboard