logic in the Update Process Data shape

Comments

5 comments

  • Avatar
    Lucas Drege

    hi Matt,

    We don't support if-else statements in the update process data shape.  To assign something conditionally, you can use the condition operator. 

    ex) string.IsNullOrEmpty((${/pd:AP/pd:formFields/pd:Requestor} as string)) ? ${ProcessInitiator} : ${/pd:AP/pd:formFields/pd:Requestor}

    Hope this helps.

    Lucas

    0
    Comment actions Permalink
  • Avatar
    Matt Manos

    Okay. Can you provide examples of comparing a form field with a string literal and an int which are not form variables themselves?

    0
    Comment actions Permalink
  • Avatar
    Lucas Drege

    Matt,

    Can you please let me know if this works for you?

    (${/pd:AP/pd:formFields/pd:Requestor} as string) == “John” && Convert.ToInt32(${/pd:AP/pd:formFields/pd:DelayCount}) == 3 ? true : false     

    Lucas

    0
    Comment actions Permalink
  • Avatar
    Matt Manos

    It works! Thank you very much. This provides a great alternative to strings of PowerShell shapes, a stored procedure, or creating a WCF method.

    1
    Comment actions Permalink
  • Avatar
    Lucas Drege

    Glad we could help!

    Lucas & Solution Consulting Team

    0
    Comment actions Permalink

Please sign in to leave a comment.