The community will be in read-only from Monday 11:59pm (PT) to Wednesday 7:30am (PT)
The community will be in read-only from Monday 11:59pm (PT) to Wednesday 7:30am (PT)
Project and Portfolio Management Practitioners Forum
cancel
Showing results for 
Search instead for 
Did you mean: 

Trying to use unix for loop and pass the counter into object type token name

Highlighted
bzdafro
Collector

Trying to use unix for loop and pass the counter into object type token name

I'm trying to use unix for loop and pass the $i into the object type token.

for i in {1..3}; do echo [PKGL.P.FILE$i];  done

 

Its works but I end up with

[PKGL.P.FILE1]
[PKGL.P.FILE2]
[PKGL.P.FILE3]

 

but i want the actual value of each token...

filename1.txt
filename2.txt
filename3.txt

 

I've tried different ways but cant seem to get it to work.  Is there a way to do this?

2 REPLIES
Jason Nichols K
Honored Contributor

Re: Trying to use unix for loop and pass the counter into object type token name

No, you can't do what you are attempting.  PPM parses the tokens before any processing happens, so you can't have variable tokens.  You need to structure your execution steps with static token names to get the values from the tokens.

Mohit_Agrawal
Frequent Visitor

Re: Trying to use unix for loop and pass the counter into object type token name

Not sure if this would work but did you try->

 

select [PKGL.P.FILE] where [PKGL.SEQ]=$i ;

i=i+1;

 

Thanks

Mohit

//Add this to "OnDomLoad" event