![]() |
#1
|
|||
|
|||
![]()
Greetings!
I'm having difficulty today with regard to properly evaluting my conditional build rule. It's probably some syntax error either in my build condition expression or the VBScript; I'm hoping someone can point out where I went wrong... Essentially, I have a macro, CMD_COMPONENTFILENAME; I wish to test it for 3 particular values. If it hits, I want to perform all the child steps, and ignore them if CMD_COMPONENTFILENAME is not in the "list" I provide. I have set up a Group step, and have checked the 'Build only if Macro or expression' option, and I've set the expression to: [ValidTP="yay"] and chose "is true" from the dropdown. In the Step tab of the Script Editor for this Step, I have the following VBScript: Option Explicit Function ValidTP() Dim jdav jdav=vbld_AllMacros.Item("CMD_COMPONENTNAME").Valu e If jdav = "API - TP - LD Disconnect" Or jdav="LogManager" Or jdav = "TestApp" Then ValidTP = "yay" Else ValidTP = "boo" End If End Function I'd like to know if ValidTP gets set to "yay" or "boo" and go from there; if I use the Immediate window and evaluate ValidTP when I've set CMD_COMPONENTFILENAME to either of the three strings I'm after, it prints "yay" as expected, and "boo" if anything else. Is my expression in the conditional build rule field incorrect? Do I need some sort of return command? I've tried putting just [ValidTP] in the conditional expression (along with "is equal to" "yay") but that always skips the steps. Hope I was able to describe it clear enough. Thanks in advance for any assitance. -JDAVIDI |
|
|