5 Replies Latest reply: Dec 8, 2015 7:48 AM by Paolo Ferri RSS

    Scanning a field and identifying if it contains a string

      Hi Guys,

       

      This formula doesn't  work. I have created it within a Master Measure
      What this formula does:

       

      - Find the email addresses that have submitted one and only one answer (aggregate your_answer by email address)
      - if this unique answer is = 28 or #javascript or #javas --> Assign Pass

      - Otherwise assign Fail

       

      ISSUE: it assigns Pass only if the answer is 1 equal to 28.

      if the your_answer grouped by email address is 1 and equal to #javascript or #javas it assignes FAIL

       

       

       

      if(

          (

            (

             aggr(count(your_answer), [Email Address])=1

             )

             

             AND if(

                    [your_answer]=28 OR [your_answer]='#javascript' OR [your_answer]='#java',[your_answer]

                    )

       

           ),'Pass', 'Fail'

          )

       

       

      Guess that it's a syntax problem


      If I take my formula and instead of #java and #javascipt I put 29 and 30
      it works perfectly

       

      but I need to formula to scan the fields and identify if they contain strings (#java and #javascript)

      So I guess that it's a syntax problem related to "Scanning a field and identifying if there is a specific string within it"


      the syntax '#javascript' doesn t work. The syntax '$(#javascript)' doesn t work either.
      again, if I want to "Scan a field and identify if there is a specific number within it", it works.

      Suggestions?

       

       

       

      Any Idea?

       

      Thank you in advance

       

      PS. Please note that I am not in the script but in the Master Items Creation