0 Replies Latest reply: Nov 20, 2011 11:11 AM by eladtest RSS

    how to compare a varaible that contain a list of strings

      hi

      i have a problem to compare a veriable that contain a list of strings .

      i create a varaible "corp_name" like this : getfieldselections(dim_corp.corp_name,',',10).

      it means that all corp_names that the user choose will save here as a list of strings (separate by comma).

      my code is this:

       

      =if(isnull(Corp_Yehidat_Finance),

                          count (DISTINCT if (num(FACT_WINS_HT_Begin_Date)<=$(SelectionDateNew)

                                                and (num(FACT_WINS_HT_Begin_Date)+num(FACT_WINS_HT_OPN_over14))> $(SelectionDateNew)

                                          and  FACT_WINS_HT_OPN_over14 >14 ,FACT_WINS_HT_Mezahhe_Mismach,null())),

                               count (DISTINCT if (num(FACT_WINS_HT_Begin_Date)<=$(SelectionDateNew)

                                                and (num(FACT_WINS_HT_Begin_Date)+num(FACT_WINS_HT_OPN_over14))> $(SelectionDateNew)

                                          and  FACT_WINS_HT_OPN_over14 >14

                                          and (FACT_WINS_HT_CORP_NAME like Corp_Yehidat_Finance) ,FACT_WINS_HT_Mezahhe_Mismach,null())) )

       

      FACT_WINS_HT_CORP_NAME is the fiels i want to check .

      when the user does not choose a corp_name i bring back all "FACT_WINS_HT_Mezahhe_Mismach" under the conditions.

      else i need to bring back just the chosen one's.

       

      when my varible contains more then 1 value it doesnt work...

      maybe there is a function that know how to compare this?

       

      tnx

      elad