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
ToddChitt
Super User
Super User

Set Pipeline Return Code using Dynamic Content

I have a pipeline that has one job: use a Web activity to get an Access Token to be used in other Web activities. Those other web activities in other pipelines so to simplify the design, I want to call the first pipeline from within the second (and many other) pipeline(s). So in the first pipeline, I have a task that sets the Pipeline return value, and for the Value, I put in the dynamic content just as I would if I was setting a Pipeline variable: @activity('Request an Access Token').output.access_token

Note that the dynamic content expression yields the proper value if it is used to set a pipeline varialbe, but when used to set a return code, the result is simple the literal expression of "@activity('Request an Access Token').output.access_token".

 

Question, how do I set a pipeline return value using dynamic content?




Did I answer your question? If so, mark my post as a solution. Also consider helping someone else in the forums!

Proud to be a Super User!





1 ACCEPTED SOLUTION
spencer_sa
Super User
Super User

Going to take a wild guess here.
Have you changed the type of the pipeline return value to 'Expression' instead of 'string'?

spencer_sa_0-1744319852354.png


I did a simple 2 pipeline workflow, the first calls the second and sets a variable based on the return value from the second.  (the second pipeline just has a Get Metadata step and outputs that as its return value.

Inner pipeline - you've seen the Set Variable in the picture above.

spencer_sa_1-1744320472797.png

Outer pipeline

spencer_sa_2-1744320534865.png

Outer set variable

spencer_sa_4-1744320645416.png


And the audit result

spencer_sa_5-1744320723733.png


If this helps, please consider Accepting as a Solution to help others find it more easily.

View solution in original post

2 REPLIES 2
spencer_sa
Super User
Super User

Going to take a wild guess here.
Have you changed the type of the pipeline return value to 'Expression' instead of 'string'?

spencer_sa_0-1744319852354.png


I did a simple 2 pipeline workflow, the first calls the second and sets a variable based on the return value from the second.  (the second pipeline just has a Get Metadata step and outputs that as its return value.

Inner pipeline - you've seen the Set Variable in the picture above.

spencer_sa_1-1744320472797.png

Outer pipeline

spencer_sa_2-1744320534865.png

Outer set variable

spencer_sa_4-1744320645416.png


And the audit result

spencer_sa_5-1744320723733.png


If this helps, please consider Accepting as a Solution to help others find it more easily.

Thanks, while I have not tried it yet, I'm 99% sure that is what I missed.

 

ToddChitt_0-1744368329839.jpeg

 

Thanks!

 




Did I answer your question? If so, mark my post as a solution. Also consider helping someone else in the forums!

Proud to be a Super User!





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