Kinook Software Forums

Kinook Software Forums (http://www.kinook.com/Forum/index.php)
-   [VBP] General Discussion (http://www.kinook.com/Forum/forumdisplay.php?f=2)
-   -   Conditional build rule question (http://www.kinook.com/Forum/showthread.php?t=4993)

Shiamak 04-05-2012 02:43 PM

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?

kinook 04-05-2012 02:48 PM

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"]).

Shiamak 04-05-2012 03:27 PM

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?

Shiamak 04-05-2012 04:32 PM

what did "i.e," meant in your example in

(i.e., [%MACRO1% = "t" And %MACRO2% = "b"]).

?

kinook 04-05-2012 05:22 PM

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

Shiamak 11-15-2012 07:18 PM

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:

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

Shiamak 11-15-2012 07:21 PM

I did try quotes around as well.

Shiamak 11-15-2012 07:22 PM

Quote:

Originally Posted by Shiamak (Post 20042)
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:

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

Litle moe info

When I run single condition e.g. %DEP_SITE%= "A" everythings works fine

kinook 11-15-2012 10:40 PM

For PerlScript syntax, you need something like

["%DEP_SITE%" eq "A" && "%DEPLOY-HELP%" eq "B"]

http://www.pageresource.com/cgirec/ptut7.htm


All times are GMT -5. The time now is 05:25 PM.


Copyright 1999-2019 Kinook Software, Inc.