Announcement

Collapse
No announcement yet.

SUF6004: Error in expression evaluation

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • SUF6004: Error in expression evaluation

    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

  • #2
    Re: SUF6004: Error in expression evaluation

    I just tested that in an Assign Value action, and it evaluated to 1 (true) here just fine.

    --[[ Indigo Rose Software Developer ]]

    Comment


    • #3
      Re: SUF6004: Error in expression evaluation

      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

      Comment


      • #4
        Re: SUF6004: Error in expression evaluation

        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
        --[[ Indigo Rose Software Developer ]]

        Comment


        • #5
          Re: SUF6004: Error in expression evaluation

          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

          Comment

          Working...
          X