Kinook Software Forum

Go Back   Kinook Software Forum > Visual Build Professional > [VBP] General Discussion
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 04-05-2012, 01:43 PM
Shiamak Shiamak is online now
Registered User
 
Join Date: 02-07-2006
Posts: 84
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?
Reply With Quote
  #2  
Old 04-05-2012, 01:48 PM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
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"]).
Reply With Quote
  #3  
Old 04-05-2012, 02:27 PM
Shiamak Shiamak is online now
Registered User
 
Join Date: 02-07-2006
Posts: 84
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?
Reply With Quote
  #4  
Old 04-05-2012, 03:32 PM
Shiamak Shiamak is online now
Registered User
 
Join Date: 02-07-2006
Posts: 84
what did "i.e," meant in your example in

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

?
Reply With Quote
  #5  
Old 04-05-2012, 04:22 PM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
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
Reply With Quote
  #6  
Old 11-15-2012, 07:18 PM
Shiamak Shiamak is online now
Registered User
 
Join Date: 02-07-2006
Posts: 84
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
Reply With Quote
  #7  
Old 11-15-2012, 07:21 PM
Shiamak Shiamak is online now
Registered User
 
Join Date: 02-07-2006
Posts: 84
I did try quotes around as well.
Reply With Quote
  #8  
Old 11-15-2012, 07:22 PM
Shiamak Shiamak is online now
Registered User
 
Join Date: 02-07-2006
Posts: 84
Quote:
Originally Posted by Shiamak View Post
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
Litle moe info

When I run single condition e.g. %DEP_SITE%= "A" everythings works fine
Reply With Quote
  #9  
Old 11-15-2012, 10:40 PM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
For PerlScript syntax, you need something like

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

http://www.pageresource.com/cgirec/ptut7.htm
Reply With Quote
Reply


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 12:11 PM.


Copyright © 1999-2023 Kinook Software, Inc.