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 Dynamic Content ...
Power Automate
Unanswered

Array Dynamic Content Not Available in Flow

(0) ShareShare
ReportReport
Posted on by 658

Hi,

 

I have a flow which sends a HTTP request to get data, the data returned is an array and I have a 'Create item' action but the array dynamic content is not appearing as an option under the parse JSON. Please see a picture of my flow below. The create item action is in 2 for each loops as I need the data from the 2 separate HTTP requests.

 

BS10_0-1716302949098.png

Thanks in advance!

Categories:
I have the same question (0)
  • abm abm Profile Picture
    32,865 Most Valuable Professional on at

    Hi @BS10 

     

    Check both the data types are same or not (Parson and SharePoint field)? If not try adding a compose action step above map the value from Parse JSON step then map the output of the compose under the create item. Thats the work around for you.

     

    Thanks

  • BS10 Profile Picture
    658 on at

    Hi @abm,

     

    Thank you for the fast response. They aren't the same field. Apologies could you please advise on how to map the output of the compose under the create item? I am unsure where to link this too from the Parse JSON - Classes step.

  • abm abm Profile Picture
    32,865 Most Valuable Professional on at

    Hi @BS10 

     

    Here it is

     

    image.png

  • BS10 Profile Picture
    658 on at

    Hi @abm 

     

    If I choose the dynamic body property in the compose action this then adds the compose into an apply to each loop. I then receive an error when I try to save, or do I need to use an expression in the create item action to point towards the compose action?

  • abm abm Profile Picture
    32,865 Most Valuable Professional on at

    Hi @BS10 

     

    Looks like that's an array of values? What's the data type its returning? Could you post  a run time history and expand the values of that array where its retrieved from? Also what value you are mapping in Create item? Which column and data type? Could you please describe all in detail so that I can give you some guide lines about this. 

     

    Thanks

  • BS10 Profile Picture
    658 on at

    Hi @abm 

     

    Please see the schema below, I am trying to create an item in sharepoint using the "rooms" value.

     

    {
     "type": "object",
     "properties": {
     "statusCode": {
     "type": "integer"
     },
     "headers": {
     "type": "object",
     "properties": {
     "Date": {
     "type": "string"
     },
     "Transfer-Encoding": {
     "type": "string"
     },
     "Connection": {
     "type": "string"
     },
     "Vary": {
     "type": "string"
     },
     "Request-Context": {
     "type": "string"
     },
     "Strict-Transport-Security": {
     "type": "string"
     },
     "X-Real-IP": {
     "type": "string"
     },
     "Referrer-Policy": {
     "type": "string"
     },
     "X-Frame-Options": {
     "type": "string"
     },
     "X-Content-Type-Options": {
     "type": "string"
     },
     "Content-Type": {
     "type": "string"
     },
     "Content-Length": {
     "type": "string"
     }
     }
     },
     "body": {
     "type": "object",
     "properties": {
     "classes": {
     "type": "array",
     "items": {
     "type": "object",
     "properties": {
     "id": {
     "type": "integer"
     },
     "year_group": {
     "type": "string"
     },
     "subject_code": {
     "type": "string"
     },
     "group_code": {
     "type": "string"
     },
     "period_id": {
     "type": "integer"
     },
     "rooms": {
     "type": "string"
     },
     "teacher_ids": {
     "type": "array",
     "items": {
     "type": "integer"
     }
     }
     },
     "required": [
     "id",
     "year_group",
     "subject_code",
     "group_code",
     "period_id",
     "rooms",
     "teacher_ids"
     ]
     }
     },
     "has_more": {
     "type": "boolean"
     },
     "cursor": {
     "type": "integer"
     }
     }
     }
     }
    }

     

    Please see the JSON parse below from this schema. 

    {
     "body": {
     "classes": [
     {
     "id": 00000000,
     "year_group": "7",
     "subject_code": "Class",
     "group_code": "Class",
     "period_id": 444444,
     "rooms": [
     "Class2"
     ],
     "teacher_ids": [
     3333333
     ]
     },
     {
     "id": 1111111,
     "year_group": "7",
     "subject_code": "Class",
     "group_code": "Class",
     "period_id": 1111,
     "rooms": [
     "Room1"
     ],
     "teacher_ids": [
     22222
     ]
     },
     {

     

    Thank you.

     

  • abm abm Profile Picture
    32,865 Most Valuable Professional on at

    Hi @BS10 

     

    Thanks for providing the data and schema. You still haven't answered my question 'Which column and data type? '. In SharePoint rooms are multi-select or single-select option set field?

     

    Thanks

  • BS10 Profile Picture
    658 on at

    Hi @abm 

     

    Apologies. The rooms are coming from an API connection linking to our system, in SharePoint where I would like this to write out too is set as a choice field though, they are single-select.

     

    Thank you.

  • abm abm Profile Picture
    32,865 Most Valuable Professional on at

    Hi @BS10 

     

    Follow my tutorial video. Here I explains how to update the choice column.

     

    Power Automate - How To Update SharePoint Choice Column (youtube.com)

     

    If you need further help in this please let me know.

     

    Thanks

  • BS10 Profile Picture
    658 on at

    Hi @abm 

     

    Thank you for the video, I have tried this but when I have added the steps mentioned in the video, this automatically generates an apply to each step and I then receive an error "The variable action 'Initialize_variable_2' of type 'InitializeVariable' cannot be nested in an action of type 'Apply_to_each'." Please see a picture of this below.

    BS10_0-1716448484101.png

    Thank you!

     

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

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard