Expression help

  • Hi,

    I am using this expression in precedence constrain. If it is true, then go to the next step.

    SUBSTRING(@FileName,"MyNetworkFolder\\xyz*.xls",1) > 0 ? "True" : "False"

    For some reason, the expression didn't like *. What I am trying to do here is. If the variable @FilaName has file name start with Xyz and extension only .xls

    Any thoughts?

  • "for some reason..."

    SUBSTRING() does not work with wildcards.

    Something like this should do the trick:

    upper(left(token( @FileName,"\\",tokencount( @FileName, "\\" )), 3)) == "XYZ" && upper(right(token( @FileName,"\\",tokencount( @FileName, "\\" )),4)) == ".XLS"?"TRUE":"FALSE"

    The absence of evidence is not evidence of absence.
    Martin Rees

    You can lead a horse to water, but a pencil must be lead.
    Stan Laurel

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply