"IF contains" on file path

Options
yesitsmeoffical
yesitsmeoffical Registered Posts: 15
  • File_Path: \USER\FOLDER_A\ABC\FILE_A
  • Formula: if(contains(toUppercase(File_Path),"\ABC\"), "yes", "no")
  • This returns "Invalid Formula" message: Unexpected 'yes' (Paring error at offset )

I tested the formula using "ABC" instead "\ABC\" and it works as intended, however for my project retaining the slash symbols around "ABC" is a must, what will be a workaround? TIA!


Operating system used: win 11

Best Answer

  • Turribeach
    Turribeach Dataiku DSS Core Designer, Neuron, Dataiku DSS Adv Designer, Registered, Neuron 2023 Posts: 1,728 Neuron
    Answer ✓
    Options

    In Java the \ is a special character so you have to escape it.

    Screenshot 2024-05-22 at 20.25.36.png

Setup Info
    Tags
      Help me…