Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Neka
Helper III
Helper III

Output from Data Flow can't be used in ForEach activity due to 'length' or 'value' doesn't errors

I am using a Data Flow activity in Azure Data Factory to flatten a JSON file contianing Workspace Ids and info and retrieve only the WorkspaceId from the JSON array. The sink caches the output. 

Neka_0-1710442975759.png

The beginning of the JSON output of the dataflow looks like this:

Neka_2-1710443168147.png

And the part I want to iterate over in the ForEach loop is here, the WorkspaceIds:

Neka_3-1710443258107.png

 

 

 

I want to use this output in a ForEach. I have watched a bunch of tutorials and read a ton of blogs of what to write in the Settings>Items section of the ForEach and none of the options work. 

If I use this:

Neka_1-1710443076136.png

I get this error: The function 'length' expects its parameter to be an array or a string. The provided value is of type 'Object'.

Alright, I understand that the JSON file is an 'object' and I need to point to the array within. So I tried these next:

 

Neka_4-1710444385256.png

 

I have tried every combo of the path from the JSON. Including runStatus.output.sink1.value.WorkspaceId and all combos in between, including and removing certain levels and so on. 

I get various renditions of this error, depending on what I write in the expression builder: 

The expression 'length(activity('DataFlowWorkspaceIdArray').output.value)' cannot be evaluated because property 'value' doesn't exist, available properties are 'runStatus, effectiveIntegrationRuntime, billingReference, reportLineageToPurview'.

 

Please, let me know how I can fix this error. Is this a data flow problem? Should I be using a different activity to remove the WorkspaceId from the original JSON file? Am I writing the wrong code in the expression builder? Any help is appreciated. Thank you.

1 ACCEPTED SOLUTION
miguel
Community Admin
Community Admin

Hey Neka!

 

You can post this question to the official Azure Data Factory forum using the link below:

Azure Data Factory - Microsoft Community Hub

 

This forum focuses on Data Factory in Microsoft. Closing the thread.

View solution in original post

1 REPLY 1
miguel
Community Admin
Community Admin

Hey Neka!

 

You can post this question to the official Azure Data Factory forum using the link below:

Azure Data Factory - Microsoft Community Hub

 

This forum focuses on Data Factory in Microsoft. Closing the thread.

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June FBC25 Carousel

Fabric Monthly Update - June 2025

Check out the June 2025 Fabric update to learn about new features.

Top Solution Authors
Top Kudoed Authors