"[Solved] Exception errors using an || statement"

Kate_Strydom
Kate_Strydom New Altair Community Member
edited November 2024 in Community Q&A
Hi,

Does anyone know how to use a or (||) statement in the starts or ends function in the generate attribute operator?

starts(url, "http:///" || "http://10.4.11")
doesn't work,

neither does

starts(url, "http:///") || starts(url, "http://10.4.2")
I have used the || function successful before using the || between the functions in a if statement. But now it just gives me a generation exception.

Please help!
Kate






Tagged:

Answers

  • Marco_Boeck
    Marco_Boeck New Altair Community Member
    Hi,

    the first one cannot work, however the second one works fine for me ???
    Just make sure you actually have an attribute called "url" as input.

    Regards,
    Marco
  • Kate_Strydom
    Kate_Strydom New Altair Community Member
    Hi Marco,

    Can this topic be deleted?

    I finally after much frustration found what the problem was. I had a row of data that had several missing values. So when I introduced the || it would throw an exception. It was fine with the individual start function but not with them in an or statement. I could not understand how I had managed to get || to work between functions previously and now it was bombing out.

    So really this is the wrong Subject title.  It should rather have been what are some common causes of exception errors. One being that a row of semi-missing data in a || statement.

    Anyway, I appreciate the support and your response. But please delete this as it is almost nonsensical

    Regards,
    Kate
  • Marco_Boeck
    Marco_Boeck New Altair Community Member
    Hi,

    we usually don't delete topics because they might be valuable to others. In this case, others might end up being confused for the same reason ;)

    Regards,
    Marco