PDA

View Full Version : SUF6004: Error in expression evaluation


Hajo
02-21-2002, 10:53 AM
Hi,

assume you have the following variables initialized as:

%Result% = FALSE
%Value1% = TRUE
%Value2% = FALSE

The expression

%Result% = (%Value1% = TRUE) AND (%Value2% <> TRUE)

is expected to evaluate as TRUE.

The above expression works fine when it is used within an "IF" action statement. It does not work correctly in an "Assign Value" action statement - here it always results in FALSE. Btw, I made sure that the checkbox "Evaluate value as expression" has been checked.

- Hans

Lorne
02-21-2002, 11:00 AM
I just tested that in an Assign Value action, and it evaluated to 1 (true) here just fine.

Hajo
02-22-2002, 12:13 AM
Originally posted by Lorne:
I just tested that in an Assign Value action, and it evaluated to 1 (true) here just fine.



Hi Lorne,

in fact the %Result% variable in my example is package variable, eg. %Package1% that controls the checkbox of a package in the Select Package dialog. As far as I found out the Select Package dialog must have TRUE or FALSE in the corresponding variable and not 0 or 1 to work properly.

For debugging purposes I have included a Textbox screen in the SUF project that list all the Design Time and Build-In as well as my declared variables. So I'm pretty sure to see what's going on with the expression evaluation.

- Hans

Lorne
02-22-2002, 12:37 AM
Yes, that is a known issue...I've tried suggesting to the other developers that zero and non-zero should also be valid for package variables, but...

You could try this workaround to translate the value to a string:

if(%Result%)
&nbsp;&nbsp;&nbsp;&nbsp;Assign Value(%Result% = "true") (eval as expression NOT checked)
endif

Hajo
02-22-2002, 09:30 AM
OK, I have a similar work-around.

Unfortunately this results in 3 instead 1 actions which in turn reduces the performance of the setup (and of the developer too) due more than 25 expressions of this style in the Before tab of a screen.

- Hans