cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Back2Basics
Level: Powered On

initialize variable always forming an 'apply to each'

Hi

 

I have a flow that requests the user to input a start and end date. I and trying to populate a SQL server with documents between the requested dates.

 

So I have the button trigger, requesting StartDate and EndDate. Then I have 'get files (properties only)' which directs to a particular library. After this I need to initialize several variables because I need them for lookup values within the SQL database. 

 

Every time I initialize a variable and select a field from the SharePoint properties the variable immediately becomes nested in an an 'apply to each' - but this isn't allowed. So I can't save or do anything afte rthis point. 

 

Is there a way to initialize these variables? I would expect the trigger to find several hundred documents, so it needs to be get files rather than get file, but completely stuck at the moment. 

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: initialize variable always forming an 'apply to each'

Hi @Back2Basics

You will need to use trhe initialize varibale action near the top of your flow. Do not set the value!

then later on use a set variable where you can set the variable to the value that you need.

 

The reasson for the Apply to each is added is beciuase the data that you are using is an array.

1 REPLY 1
Super User
Super User

Re: initialize variable always forming an 'apply to each'

Hi @Back2Basics

You will need to use trhe initialize varibale action near the top of your flow. Do not set the value!

then later on use a set variable where you can set the variable to the value that you need.

 

The reasson for the Apply to each is added is beciuase the data that you are using is an array.

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020

thirdimage

Flow Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

thirdImage

New Flow Community Board!

Check out the new Microsoft Flow Community Blog Topic Suggestion board!

fourthImage

Australia Summit

Travel to Melbourne and network with thousands of peers!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Flow Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 267 members 3,680 guests
Please welcome our newest community members: