2 Replies Latest reply on Jul 19, 2016 3:00 AM by ykoutroulis

    Comparing number vs. comma separated values

    ykoutroulis

      Hi,

       

      I am trying to do some conditional formatting and I want to compare a field on each row (numeric field) and Identify it within a comma separated text.

       

      I am using the following command:

       

      not IsEmpty (FilterValues (ExecuteSQL("Select DAILY_MEAL_ID from Diet_Meals_Assoc2 where DIET_ID = ? ";"";","; $$CURRENT_DIET_ID); Self ))

       

      Basically I want to be able to identify a specific number if it exists in the comma separated text. For example I want to identify 853 in "853,3435,2345,45465". I am looking for an exact match though (meaning identifying 853 in "8534,3948,1312" is not good also.

       

      The comma separated text comes from ExecuteSQL command so the delimiter can be changed.

       

      I am looking for the equivalent of: if varX in (val1,val2,val3 etc) functionality

       

      thank you