Solved

Use a parameter within a parameter

  • 24 March 2022
  • 4 replies
  • 168 views

Hi everyone,

Is there a way to use a parameter within another parameter?

Here’s an example of what I’m trying to do:
 

 

I’ve also tried this with no luck:

 ${str:concat("sdc/",${p_sourceEnv})}

 

The idea is that I can include the environment as a parameter within other parameters and then when I want to change the environment only make the change once.

 

Thanks in advance for any help. Much appreciated 🙂

icon

Best answer by Giuseppe Mura 24 March 2022, 08:00

View original

4 replies

Userlevel 3
Badge

I don’t think using expressions in the definition of parameters is supported, but to be honest I don’t really see the sense in that. Wherever you’re planning to use the p_sourceSftpUser, that’s where you could use the expression that combines the parameters.

Sorry if I missed the point of what you’re trying to do!

Userlevel 2
Badge

Hi @manuel . Your syntax is perfectly valid. Actually, our implementation is based in Java standard EL specification and implementation. Besides obvious restrictions due to not evaluating inside a web container, you can use any feature available in the specification. That being said, if you can point to the exact place where this error happens (where this configuration comes from), I can investigate why this is not working. If you prefer, you can attach the pipeline instead. Please note that we might not be able to fix this, as at some places we might be needing additional restrictions to ensure consistency.

@Giuseppe Mura thanks a lot.

I was pretty much wrong in the way we wanted to implement parameters. I think your answer was actually the best one. You can’t do it, but you also shouldn’t need to.

Thanks!

Userlevel 5
Badge +1

@Giuseppe Mura ,

@Dimas Cabré i Chacón 

@manuel 

Hi ,

I believe we can use parameter inside parameter and we have different way to do it. Please find attached the screenshot for the same and do let me know if it helps.

 

I also attached the test pipeline.

 

It was giving error because of wrong parameter setup in the above syntax.

 

 

Thanks & Regards,

Bikram_

Reply