Share via

date array loop start to end

arkiboys 9,711 Reputation points
2022-06-10T23:46:24.157+00:00

Hi,
In ADF pipeline foreach1, in append variable, I am populating an array with dates --> v_DaysRange
so far so good...

Inside foreach2, I would like to assign a variable (v_CurrentDate) with each date in the array per loop.
I tried @item().v_DaysRange but it gives this error:
The expression 'item().v_DaysRange.value' cannot be evaluated because property 'v_DaysRange' cannot be selected. Property selection is not supported on values of type 'String'.

see screen-shots please
Thank you

210423-image.png

210385-image.png

210433-image.png

210340-image.png

210357-image.png

Azure Data Factory
Azure Data Factory

An Azure service for ingesting, preparing, and transforming data at scale.

0 comments No comments

Answer accepted by question author

Subashri Vasudevan 11,306 Reputation points Volunteer Moderator
2022-06-12T06:16:35.277+00:00

Hi @arkiboys ,

Just use @item() inside the expression in set variable activity. It will bring current value in the array.

Since the array is of type string we dont have to use any property next to @item().

Please see screenshot below for reference

Note: I have created a static array of dates for quick test. Please check and let us know for any question.

Thank you.

210552-screenshot-2022-06-12-at-114432-am.png
210553-screenshot-2022-06-12-at-114448-am.png
210469-screenshot-2022-06-12-at-114509-am.png

Was this answer helpful?

0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.