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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

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
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Fabric Update Carousel

Fabric Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors