4 Replies Latest reply on Aug 6, 2012 2:46 PM by Amber Kuo

    Streamline Calculated Field Syntax

    Amber Kuo

      How do I simplify the following statement?  I have about 50 agency ids that need to be labeled as OTA.  Do I really need to start with a new ELSEIF row for every Agency ID?

       

      If [AGENCY_ID] = '07508546' then 'OTA'

      ELSEIF [AGENCY_ID] = '07591640'then 'OTA'

      ELSEIF [AGENCY_ID] = '07560685'then 'OTA'

      ELSEIF [AGENCY_ID] = '17209883'then 'OTA'

      ELSEIF [AGENCY_ID] = '39557711' then 'OTA'

      ELSEIF [AGENCY_ID] = '39605263' then 'OTA'

      ELSEIF [AGENCY_ID] = '39621046' then 'OTA'

      ELSEIF [AGENCY_ID] = '45500044' then 'OTA'

      ELSEIF [AGENCY_ID] = '45537284' then 'OTA'

      ELSEIF [AGENCY_ID] = '45545172' then 'OTA'

      ELSEIF [AGENCY_ID] = '45568401' then 'OTA'

      ELSEIF [AGENCY_ID] = '45602981' then 'OTA'

      ELSEIF [AGENCY_ID] = '45615835' then 'OTA'

      ELSEIF [AGENCY_ID] = '45623955' then 'OTA'

      ELSE [CHANNEL] END