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 / Flow ran successfully,...
Power Automate
Suggested Answer

Flow ran successfully, but didn't return any record

(0) ShareShare
ReportReport
Posted on by 40
Hi All,
 
I have implemented flow where it ran successfully, but didn't return any record at the end, but I can see data in initial steps like "compose" or "csv table", after that I have initiated variable (array []) and later "Apply to each" and "Append to variable (that I have initialized before).
 
Any suggestions much appreciated. 
 
Thanks
Categories:
I have the same question (0)
  • Suggested answer
    Pstork1 Profile Picture
    69,037 Most Valuable Professional on at
    I assume you are trying to return an array to the Power App. What action are you using to do the return? If its an HTTP response action make sure you've added the JSON schema under the advanced options. If you don't the reply won't register as data.
  • KC-25101625-0 Profile Picture
    40 on at
    I am using these steps in Power Automate.
     
    Initially the data is coming when button clicked un Power BI and i used compose and create csv file file n later intialize variable with array [] so on.
  • Pstork1 Profile Picture
    69,037 Most Valuable Professional on at
    Can you provide a screenshot and what is the last action in the flow?  That is the action that will return a value.
  • KC-25101625-0 Profile Picture
    40 on at
    Hi,
        1. After initialize variable, the next step is "Apply to each" action where I am using the "initialize variable" as a output from previous steps.
         2. Inside "Apply to each" action, I am using "Compose" where I am creating json with field and numerical columns with if condition and item of the category fields.
         3. After "Compose", I have added "append variable" action inside the same "Apply to each" where I have created json with Name (category holding values) and numerical fields with output. 
        4. Final step is create csv table where I have given the Variable that was created initially and in column properties I have given Custom so this is where I am facing challenge like Header is Name (which should hold all the category fields parent and child) and Value I have variable (initially created) and last step is create file to one drive.

    Now after troubleshooting I am getting filtered data (as expected in csv, but coming as json format).

    Please correct me if I am doing anything wrong here. 
     
     
  • Suggested answer
    Pstork1 Profile Picture
    69,037 Most Valuable Professional on at
    If you are building out the data in Compose actions and appending that to an Array variable to get an array you'll probably need to run the resulting variable through a Parse JSON statement to apply a schema to the array items so you can access individual named columns to create the CSV.
  • KC-25101625-0 Profile Picture
    40 on at
    I didn't understand it clearly, could you please elaborate more on the "Parse Json" steps. It will be great help.

    What I am trying to achieve is Parent and Child hierarchy (so all the category records will be in one column - appending Parent and row record rows) and measures as columns. This step I am using in "Compose" step after this as I mentioned, I am using "Appendtoarray" like calling:
    1. Apply to each
           a. Inside apply to each: Compose
           b. inside apply to each loop:
                json
                 {
               "CustomColumn": outputs('Compose')?['field']
                  }

    Am I doing correctly here.

  • Pstork1 Profile Picture
    69,037 Most Valuable Professional on at
    If you can post a sample of the JSON you are creating I can tell you if its valid or not.
     
    But even if it is valid it won't be recognized as an array of records until a schema is applied to it.  Until then its just an array of text strings.  So you need to add a Parse JSON action after you complete the array variable to convert the array variable into a full JSON Array of records with properties. Just add the variable as the From in the Parse JSON and use a sample of the output from a previous run to generate the Schema. Then use the result of that to create the CSV.
  • KC-25101625-0 Profile Picture
    40 on at
    If I understood correctly:
     
    1. Appendedtoarray (variable)
    2. Parse JSON (Action)
          Content ? here I need to pass the previous compose or initially created variable?
          Schema ? what need to be mentioned here
     
    Could you please guide here.

    Below the details for your ref where I am doing currently:
    a. Inside apply to each: 
                    Compose
                    json
                      {
                      "Name": if(empty(item()?['column']),  
                       "Sales": item()?['Sales']
                       }

           b. Appendtoarray:
              Name: intializedvariable
              Value:
                 json
                 {
                 "Name": outputs('Compose')?['column'],
                 "Sales": outputs('Compose')?['Sales']

                  }

    Hope this information helps
  • Pstork1 Profile Picture
    69,037 Most Valuable Professional on at
    Here's a screenshot of what it should look like. Your schema will be a bit different I think.  Add the ParseJSON action after populating the variable but before the Create CSV. Then use the output of the variable from a sample run to generate the Schema using the Generate from Sample button.  After that you should see the individual columns in the JSON as dynamic content to use in the Create CSV.
  • KC-25101625-0 Profile Picture
    40 on at
    Ok, thanks for the inputs. Appreciated.
     
    Could you please provide the Parse Json example with 8 different columns and 10 numeric fields.
     
    I am new to 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

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
Haque Profile Picture

Haque 286

#2
David_MA Profile Picture

David_MA 256 Super User 2026 Season 1

#3
Expiscornovus Profile Picture

Expiscornovus 225 Most Valuable Professional

Last 30 days Overall leaderboard