Perform Variable Substitution

Can some one help me how to keep perform variable inside a perform variable substitution.
I need to give like this %X/Y[%iteration%]/Z% for my XML but its not working.

Thanks in advance.

Can you elaborate more about your xml structure.(X/Y/Z)


I tried a little test: A variable substitution of this form works fine:
works fine.

Since you mentioned $iteration, your map step must be within a loop. If you data structure is ‘/X/Y/Z’ and you are looping over the Y array, you can directly map this:
The correct Y element for that iteration - Y[$iteration] - is automatically chosen.

You cannot do something like this though:

1 Like

Hi Sonam,
Thanks for your help. Your soultion works just great.


Hi Sonam,
Thanks for your help. Your solution works just great.


You’re welcome Sivaram. Glad to help.

Hi sonam,

             I am unable to do perform variable substitution the way you suggested. As i am getting same output what i have specified. 


Please let me know where I am wrong?

Is the Branch Evaluate Labels set to True for the substitution to work?

If not the syntax problems.


Make sure the branch is set to evaluate labels=true.

I am not using Branch. Doing this process on loop

I assume you have checked the option perform variable substitution :slight_smile:

Can you explain what is the issue you are facing. May be screen shots would be helpful to assist you further.

How can you use step substitution on the loop with out evaluate labels to True if you are not using as regular expressions?


My requirements is to just concatenate first name and lastname string lists into fullname string list .I’ve specified input array as firstname and output array as full name.Here I can do with indices but I want to use perform variable substitution to map lastnames


so can we assume this is checked in the setValue popup?

" checked the option perform variable substitution"


What is your input and required output? May be something like below:
First Name: Mahesh, Ani
Last Name: Kumar, XXX
Full Name: Mahesh Kumar, Ani XXX

Correct me if I am wrong?

Yes that is my requirement. I have checked “perform variable substitution”.


As per my understanding, webMethods doesn’t have the in-built capability to do the substitution at more than one level.

For example, i want to retrieve the data from a particular stringList (stringList_to_check) at particular index (index_to_retrive) without a loop and branch.

So to do this we need to set value for a pipeline variable as %stringList_to_check[%index_to_retrive%]% along with pipelineVariableSubstitution checked. So it’s a dual level substitution which won’t work using this.

So in-order to do this, there a special java service in PSUtilities package called as substituteVariables which will do this job.

– Punith

1 Like