#1
|
|||
|
|||
Conditional build rule question
How would you do this if you need to match values for multiple MACROS
e.g %MACO1% = "t" && %MACRO2% = "b" though above doesnt work! Any ideas? |
#2
|
|||
|
|||
Not sure if you're using MatchesRegex or a string comparison, but put each condition in the expression as needed (i.e., [%MACRO1% = "t" And %MACRO2% = "b"]).
|
#3
|
|||
|
|||
I am using a string comparison, what should be the value selected from drop down below "Build only if .........."?
I tried ([%MACRO1% = "t" And %MACRO2% = "b"]) but Visual build is executing the command even though MACRO1 and MACRO2 do not exists? |
#4
|
|||
|
|||
what did "i.e," meant in your example in
(i.e., [%MACRO1% = "t" And %MACRO2% = "b"]). ? |
#5
|
|||
|
|||
I meant that, for example, you could use a rule like
Build only if ["%MACRO1%" = "t" And "%MACRO2%" = "b"] is true to compare the values of two different macros with strings. If this doesn't help: http://www.kinook.com/Forum/showthread.php?t=927 Please send the details requested at http://www.kinook.com/Forum/showthread.php?t=3044 |
#6
|
|||
|
|||
Hi There,
I am using following condition [%DEP_SITE%= "A" AND %DEPLOY-HELP% = "B"] is true But once VBP starts executing above statement I get following error Error expanding macros or script in property condexpr: <Error in ? (PerlScript) script code at Line 1, Column 0 (Compilation error)> any help is appreciated. BTW: My perl works fine with other macros I have as well as a perl script embeded within VBP. My VBP version is 7.7 |
#7
|
|||
|
|||
I did try quotes around as well.
|
#8
|
|||
|
|||
Quote:
When I run single condition e.g. %DEP_SITE%= "A" everythings works fine |
#9
|
|||
|
|||
For PerlScript syntax, you need something like
["%DEP_SITE%" eq "A" && "%DEPLOY-HELP%" eq "B"] http://www.pageresource.com/cgirec/ptut7.htm |
|
|