Kinook Software Forum

Go Back   Kinook Software Forum > Visual Build Professional > [VBP] General Discussion

 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 12-09-2003, 01:13 PM
jdavidi jdavidi is online now
Registered User
 
Join Date: 10-27-2003
Posts: 38
Question Difficulty w/conditional build rule and script expression

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
Reply With Quote
 

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



All times are GMT -5. The time now is 07:22 AM.


Copyright © 1999-2023 Kinook Software, Inc.