Field function issue
Posted: Thu Jun 02, 2016 2:50 pm
Hi,
Basically we are trying to generate and extract when the run flag is "YES" and process type is "A" (or) "YES" and process type is "M" (or) "NO" and process type is "M".
Step 1 - An output text file is created with 2 columns and delimiter is comma (sample data in output file given below)
Sample file (first column is run flag and second is process type, manual or automatic):
NO,M
Step 2 - check the data in the output file from previous step. If the value in first column is "NO" and second has "A" then the execution should stop else continue
Step 3 - used a execute command activity in the job sequence as below , for the workflow to continue to next step
Step 4 - given the below of the condition to stop the workflow (in another link of execute command stage in job sequence)
Is there any issue with the FIELD function as the job does not continue even if the output file has NO,M in step 1?
Please let me know your thoughts, thanks.
Basically we are trying to generate and extract when the run flag is "YES" and process type is "A" (or) "YES" and process type is "M" (or) "NO" and process type is "M".
Step 1 - An output text file is created with 2 columns and delimiter is comma (sample data in output file given below)
Sample file (first column is run flag and second is process type, manual or automatic):
NO,M
Step 2 - check the data in the output file from previous step. If the value in first column is "NO" and second has "A" then the execution should stop else continue
Step 3 - used a execute command activity in the job sequence as below , for the workflow to continue to next step
Code: Select all
((Field(exc_run_or_no.$CommandOutput,",",1) = "YES" And Field(exc_run_or_no.$CommandOutput,",",2) = "A") Or
(Field(exc_run_or_no.$CommandOutput,",",1) = "NO" And Field(exc_run_or_no.$CommandOutput,",",2) = "M") Or
(Field(exc_run_or_no.$CommandOutput,",",1) = "YES" And Field(exc_run_or_no.$CommandOutput,",",2) = "M"))
Code: Select all
(Field(exc_run_or_no.$CommandOutput,",",1) = "NO" And Field(exc_run_or_no.$CommandOutput,",",2) = "A")
Please let me know your thoughts, thanks.