cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Wave
Advocate II
Advocate II

Create Blob in For Each

Does Create Blob not work in a for each action?
Trying to get SQL binary blobs into Azure Storage Blob
I get data from sql database (SQL query (V2)), get the table into an array (Compose- not necessary just makes it cleaner), and then a for each on the compose array.
Inside the for each I set a filename for already initialized variable using ID_name_data from other columns. then I use Compose the content of the blob

base64ToBinary(items('Apply_to_each')['doc_bin'])

doc_bin being sql column that has the blob data, then Create Blob. Create blob itself works a file is created in the container but that's it. One file no matter how many items in array.
Looking at run history everything works in the for each except when it comes to the Create Blob part. The Create Blob has the same file name for all files, so it only creates one file in the blob folder. The filename variable is correct in the set action, but in the Create Blob action it's not. They are different sizes when I click through each item so it doesn't technically 'create' the same file, but it's giving each file the same name, randomly it appears.
What am I doing wrong here?

Wave_0-1619790303384.png

 

1 REPLY 1
Wave
Advocate II
Advocate II

After HOURS of trying this decided to try setting values inside the action instead of using set variables and it worked. Not sure why, or what the difference is but it is now creating all the files in the for each in Azure Storage Blob. Posting solution here if anyone else runs into issue

DOES NOT WORK

Wave_0-1619802476740.png

 

But this WORKS

Wave_3-1619803004897.png

 

 

 

Helpful resources

Announcements
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Users online (53,748)