Hoppa till huvudinnehållet

Evaluate Expression

Kommentarer

3 kommentarer

  • chris c

    The Evaluate Expression does the true or false as the result from the expression evaluation.

    All you need is: =$varA == $varB

    Then call $evaluate1.result to find if true or false

    1
  • Zack Robison

    I use ternary operators: <conditional> ? <expression if true> : <expression if false>.  

    For example, imagine a form-based data creation WF.  You might use the same WF for editing and creation, with edits prefilling the form with existing data.  You'd probably have a nice boolean variable that determines whether to run that logic, the input expression for a Create Value activity "isEdit" might be

    = $wfInputs.inputs.type == 'edit' ? true : false
    2
  • Christopher Wiebke

    Zack,

    I must not have gotten my syntax right when I tried this before.  I followed your example and got the evaluate expression to work using the code below.  This is just what I needed!

    Thanks,

    Chris

    = $form1.state.dropDownList2.value === undefined ? $whereClause.result : $whereClause.result.concat(` OR field = ${$form1.state.dropDownList2.value}`
    0

Du måste logga in om du vill lämna en kommentar.