cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Is there way to create global variable?

pratiksha_patil
New Contributor II

Hi,

I want to create a global variable so that the same value is accessible anywhere in the pipeline.
In my case I get token from api and I need to pass same token to child pipeline which are executed sequentially.Below is screenshot of pipeline which shows child pipeline execution
image

Thanks,
Pratiksha

8 REPLIES 8

koryknick
Employee
Employee

@chmurray88 - have you looked at Expression Libraries yet?

You canโ€™t update the values stored, but they can be referenced anywhere an expression is available.

@koryknick -

Thanks for the reply. It looks like these are only good for an individual pipeline? Thatโ€™s fine to start.

Question isโ€ฆsay I want to have an email address(to) in the email sender snap be one value in one org(dev org), but when I migrate the pipeline to the next org(prod org), I need that email address to be different. If Iโ€™m understanding how the expression library works, it will get migrated with the pipeline, but the value wonโ€™t be changed while going between orgs. Right?

If there is another way to solve for this, Iโ€™m all ears.

Thanks!

Chris

koryknick
Employee
Employee

@chmurray88 - if you place the expression library in a specific project, then any pipeline in that project can use it. If you place it in the project space / shared folder, then any pipeline within the project space (across all projects) can use it. If you place the file in the root shared (above all project spaces), then any pipeline within the org could use it.

When the expression file is migrated to other orgs, you could update the values specific to that org. For example, if you use the expression file to define SMTP properties for your Email snaps, those are probably fairly static; as opposed to AWS S3 buckets / directories that should be different between you dev/qa/prod orgs.

@koryknick - very cool. thanks for the tips. So this is essentially global variable support. We will give this a shot.

Thanks!

Chris