I've created a Hash file for needed parameters. I have one value defined as UtilityHashLookup('hshDateTime','1',2) which gives me the current month of the data. I wanted use this value in a nested condition stage saying which path I wanted based on the Month. My expression was UtilityHashLookup('hshDateTime','1',2) = 'P01 ' OR 'P02' OR 'P03 ' run JobA
I have a set for each quarter and a termination if the value doesn't match. I've tried several different ways to try to get the value recognized but no matter what I try all four paths run.
Any suggestions are greatly appreciated.
Thanks
John
Parameter values used in Nested Condition in Sequencer
Moderators: chulett, rschirm, roy
-
- Premium Member
- Posts: 306
- Joined: Wed Jun 21, 2006 11:41 am
First off, that's not a proper expression. It would need to be:
to evaluate correctly, but that would run the utility three times. Or you'd need some kind of matches logic in a single equality test. Also note that two of the three quoted values have a space at the end.
Seems to me you should be considering the User Variables stage to assign the result of the UtilityHashLookup to a variable and then simply check the variable afterwards.
Code: Select all
UtilityHashLookup('hshDateTime','1',2) = 'P01' OR
UtilityHashLookup('hshDateTime','1',2) = 'P02' OR
UtilityHashLookup('hshDateTime','1',2) = 'P03'
Seems to me you should be considering the User Variables stage to assign the result of the UtilityHashLookup to a variable and then simply check the variable afterwards.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Premium Member
- Posts: 306
- Joined: Wed Jun 21, 2006 11:41 am
Thanks Craig,
I should have been a bit more clear ast to how I was processing. I am using the User Variable stage with the UtilitHashLookup function which assigns a variable wich is used downstream in the nested condition. The spaces were added because I have tried the expressions without spaces and then was experimenting to see if I can get it to work.....
My concern is that I have 4 legs coming out of the Nested Condition Stage and all 4 execute. I would expect if the syntax was not valid to not have any executing.
Thanx again for your comments ~ ~ John
I should have been a bit more clear ast to how I was processing. I am using the User Variable stage with the UtilitHashLookup function which assigns a variable wich is used downstream in the nested condition. The spaces were added because I have tried the expressions without spaces and then was experimenting to see if I can get it to work.....
My concern is that I have 4 legs coming out of the Nested Condition Stage and all 4 execute. I would expect if the syntax was not valid to not have any executing.
Thanx again for your comments ~ ~ John
-
- Premium Member
- Posts: 306
- Joined: Wed Jun 21, 2006 11:41 am
SUre...within the nested condition in the triggers tab I have each of the link names under the name column "Custom-(Conditional)" for Expression type and one of these for the expresion column
PERIOD = 'P11 ' Or PERIOD = 'P12 ' Or PERIOD = 'P10 ' For DSLink11
PERIOD = 'P07 ' OR PERIOD = 'P08 ' OR PERIOD = 'P09 ' For DSLink9
PERIOD = 'P04 ' OR PERIOD = 'P05 ' OR PERIOD = 'P06 ' For DSLink7
PERIOD = 'P01 ' OR 'PERIOD = P02 ' OR PERIOD = 'P03 ' For DSLink5
Thanks again ~ ~ John
PERIOD = 'P11 ' Or PERIOD = 'P12 ' Or PERIOD = 'P10 ' For DSLink11
PERIOD = 'P07 ' OR PERIOD = 'P08 ' OR PERIOD = 'P09 ' For DSLink9
PERIOD = 'P04 ' OR PERIOD = 'P05 ' OR PERIOD = 'P06 ' For DSLink7
PERIOD = 'P01 ' OR 'PERIOD = P02 ' OR PERIOD = 'P03 ' For DSLink5
Thanks again ~ ~ John
If PERIOD is a value in your User Variables stage, you can't refer to it just by name. You need to prepend the stage name to it as well. So if the stage was called Fred then:
Would be more appropriate. If you used the External Parameter Helper thingy it would do that for you.
Hope that helps.
Code: Select all
Fred.PERIOD = 'P11 ' Or Fred.PERIOD = 'P12 ' Or Fred.PERIOD = 'P10 '
![Wink :wink:](./images/smilies/icon_wink.gif)
Hope that helps.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Premium Member
- Posts: 306
- Joined: Wed Jun 21, 2006 11:41 am