Hi
I have created a job sequence in this flow
ExcecuteCommand --->StartLoop--->UserVariableActivity--->Jobactivity--EndLoop
I am doing a cat in ExcecuteCommand to get the content of a txt file which looks like this
ABN,Acct_BfwdData,Acct_CGTList,Acct_DiffList
I am looping around this file with a comma delimeter in start loop
In Uers Variable I am doing this to get a word for each iteration
Tabel_Name=Field(Execute_Command_0.$CommandOutput ,",", StartLoop_Activity_1.$Counter)
In the job activity I am passing this table name to a job in JOb activity like this Tabel_Name=UserVariables_Activity_25.Table_Name1
Problem I have is that for all 4 Iterations, table name is coming out same as ABN. What am I missing?
counter Increment in a loop
Moderators: chulett, rschirm, roy
I don't recall the exact syntax off the top of my head but a search here should turn it up if you look for 'counter' I would think. From what I recall you need to index into the list of parameters using the counter and you usually create a delmited list all at once for the StartLoop stage to iterate the through. Then something like...
Let me see if I can turn up an example.
Code: Select all
Table_Name=UserVariables_Activity_25.Table_Name<$Counter>
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
This should help with the $Counter question, there are plenty of others out there if you search:
viewtopic.php?t=111013
This one might help as well:
viewtopic.php?t=127425
viewtopic.php?t=111013
This one might help as well:
viewtopic.php?t=127425
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
Is this what you are suggesting Craigchulett wrote:I don't recall the exact syntax off the top of my head but a search here should turn it up if you look for 'counter' I would think. From what I recall you need to index into the list of parameters using the counter and you usually create a delmited list all at once for the StartLoop stage to iterate the through. Then something like...
Let me see if I can turn up an example.Code: Select all
Table_Name=UserVariables_Activity_25.Table_Name<$Counter>
This I did in my UserVariable Activity Stage
Trim(EReplace(Field(Execute_Command_0.$CommandOutput ,",", StartLoop_Activity_1.$Counter),@FM, ' '))
dj
I'm not really suggesting anything, just trying to point you to posts which talk about loops and how to handle the counter properly so you could figure out your next steps on your own. Did you check them out? In the meantime...
I'm a little lost on what you are trying to accomplish with the UserVariables stage. Is there a single record in the file your Execute Command stage cats? And that is your "Comma-delimited List of Things" to iterate through? Assuming yes, you would loop four times and each time pass a single entry to the Job Activity with the following values?
1. ABN
2. Acct_BfwdData
3. Acct_CGTList
4. Acct_DiffList
Yes? If so then you don't need the UserVariables stage. The StartLoop already has this list so just skip the UV stage and use the following syntax in your Job Activity's parameter:
StartLoop_Activity_1.$Counter
If your loop list is in fact something else or I'm not understanding what you need to do, please enlighten us with many details and we'll continue on with this.
I'm a little lost on what you are trying to accomplish with the UserVariables stage. Is there a single record in the file your Execute Command stage cats? And that is your "Comma-delimited List of Things" to iterate through? Assuming yes, you would loop four times and each time pass a single entry to the Job Activity with the following values?
1. ABN
2. Acct_BfwdData
3. Acct_CGTList
4. Acct_DiffList
Yes? If so then you don't need the UserVariables stage. The StartLoop already has this list so just skip the UV stage and use the following syntax in your Job Activity's parameter:
StartLoop_Activity_1.$Counter
If your loop list is in fact something else or I'm not understanding what you need to do, please enlighten us with many details and we'll continue on with this.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers