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 / Array' cannot be initi...
Power Automate
Unanswered

Array' cannot be initialized or updated with value of type 'String'.

(2) ShareShare
ReportReport
Posted on by 86

Hello everyone,

 

I' m trying to initialize a variable like shown on the screenshot but getting an error message 

The variable 'vAuthorization' of type 'Array' cannot be initialized or updated with value of type 'String'. The variable 'vAuthorization' only supports values of types 'Array'. I'm a bit confuced by this error cause I have checked everything and array format should be fine. Please advise!

 

nikitamobile85_0-1637756846486.png

 

[
{
"Postion": "Applicant",
"Name": "@{triggerOutputs()?['body/Author/DisplayName']}",
"Status": "Submitted",
"Date": "@{formatDateTime(triggerOutputs()?['body/Created'], 'yyyy-MM-dd')}",
"Signature": ""
},
{
"Postion": "MNG",
"Name": "@{triggerOutputs()?['body/General_x0020_Manager/DisplayName']}",
"Status": "@{outputs('Get_item')?['body/General_x0020_Manager_x0020_appr/Value']}",
"Date": "",
"Signature": ""
},
{
"Postion": "DGM",
"Name": "@{triggerOutputs()?['body/Deputy_x0020_General_x0020_Manag/DisplayName']}",
"Status": "@{outputs('Get_item')?['body/DGM_x0020_approval/Value']}",
"Date": "",
"Signature": ""
},
{
"Postion": "GM",
"Name": "@{triggerOutputs()?['body/Manager/DisplayName']}",
"Status": "@{outputs('Get_item')?['body/Manager_x0020_approval/Value']}",
"Date": "",
"Signature": ""
},
{
"Postion": "Chief Accountant/FD Asst Manager",
"Name": "@{triggerOutputs()?['body/Chief_x0020_Accountant/DisplayName']}",
"Status": "@{triggerOutputs()?['body/Chief_x0020_Accountant_x0020_app/Value']}",
"Date": "",
"Signature": ""
},
{
"Postion": "FD Deputy GM",
"Name": "@{triggerOutputs()?['body/FD_x0020_Deputy_x0020_GM/DisplayName']}",
"Status": "@{outputs('Get_item')?['body/FD_x0020_Deputy_x0020_GM_x0020_a/Value']}",
"Date": "",
"Signature": ""
},
{
"Postion": "GD",
"Name": "@{triggerOutputs()?['body/General_x0020_Director0/DisplayName']}",
"Status": "@{outputs('Get_item')?['body/General_x0020_Director/Value']}",
"Date": "",
"Signature": ""
}
]

Categories:
I have the same question (0)
  • m3ngi3 Profile Picture
    725 on at

    That is strange!

    This works for me:

    [
    {
    "FolderOrder" : 1,
    "FolderPath": "A_Engagement Letter and scoping"
    },
    {
    "FolderOrder": 2,
    "FolderPath": "B_Planning"
    },
    {
    "FolderOrder": 3,
    "FolderPath": "C_Documentation"
    },
    {
    "FolderOrder": 4,
    "FolderPath": "D_Reporting"
    },
    {
    "FolderOrder": 5,
    "FolderPath": "E_Quality Review"
    }
    ]

    Result:

    Django_0-1652428753376.png

     

    Are the empty values an issue or maybe the double quotes are of the wrong type??

  • VictorIvanidze Profile Picture
    13,073 on at

    I'm not sure but it seems you cannot use dynamic values in "Initialize  variable" action.

    Initialize it with [] and add array elements after that.

  • elltav22 Profile Picture
    6 on at

    have the same issue

  • VictorIvanidze Profile Picture
    13,073 on at

    Show your "Initialize variable"

  • elltav22 Profile Picture
    6 on at

      PowerAutomate.PNG
    the problem is converting object to array 

  • VictorIvanidze Profile Picture
    13,073 on at

    Could you show real outputs of Compose action?

  • CW Profile Picture
    1,044 on at

    Me too. Very simple. It looks correct. 

     

    [
    {
    "userid": 1,
    "firstName"; "Sarah",
    "lastName"; "Tabor"
    },
    {
    "userid": 2,
    "firstName"; "Bob",
    "lastName"; "Taylor"
    },
    {
    "userid": 3,
    "firstName"; "Jeff",
    "lastName"; "Green"
    },
    {
    "userid": 4,
    "firstName"; "James",
    "lastName"; "Tabor"
    }
    ]

     

    Then same error. ?????????????????????????????????????

    Every time you try and do something with this blasted platform I always, ALWAYS run into these SANAFUs. EACH AND EVERY TIME!!

    So it only works if its a Tuesday with a full moon???

  • CW Profile Picture
    1,044 on at

    Yes, that worked for me as well, but the other didn't. Same structure, as far as I can tell.

  • aburke Profile Picture
    4 on at

     I know it's been a few weeks, so you probably already figured this out, but those colons look like semicolons. 

    {
    "userid": 4,
    "firstName"; "James",
    "lastName"; "Tabor"
    }

  • CW Profile Picture
    1,044 on at

    Tom Riha's article worked for me

    https://tomriha.com/how-to-convert-array-to-a-string-in-power-automate/

     

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 503 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 321 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard