&VCDIFF | Data item containing the value which will be passed to the query as a '<>' |
&VCFROM | Data item containing the value which will be passed to the query as a '>=' |
&VCMATCHES | Data item containing the value which will be passed to the query as a 'matches' |
&VCTO | Data item containing the value which will be passed to the query as a '<=' |
/* ******************************************************************** */ /* This include willtreat the tFilter and convert it to some data items */ /* which can be used by queries in CBF */ /* This includes expects the tFilter to be available */ /* Input The BusinessFieldName */ /* Output : there are 4 data-items returned */ /* {&vcMatches} */ /* {&vcDIFF} */ /* {&vcFrom} */ /* {&vcTo} */ /* ******************************************************************** */ /* is null and is not null */ if tFilter.tcParameterValue = '' then do: if tFilter.tcOperator = '=' then assign {&vcMatches} = '-999999'. else if tFilter.tcOperator = '<>' then assign {&vcDIFF} = '-999999'. end. else /* equals */ if tFilter.tcOperator = '=' then assign {&vcMatches} = tFilter.tcParameterValue. else /* contains */ if tFilter.tcOperator = 'matches' then assign {&vcMatches} = tFilter.tcParameterValue. else /* begins */ if tFilter.tcOperator = 'begins' then assign {&vcMatches} = tFilter.tcParameterValue + '*':U. else /* not equals */ if tFilter.tcOperator = '<>' then assign {&vcDIFF} = tFilter.tcParameterValue. else /* range and start at */ if tFilter.tcOperator = '>=' then assign {&vcFrom} = tFilter.tcParameterValue. else /* greater than and less than */ if tFilter.tcOperator = '<=' then assign {&vcTo} = tFilter.tcParameterValue. else /* greater than */ if tFilter.tcOperator = '>' then assign {&vcFrom} = tFilter.tcParameterValue {&vcDIFF} = tFilter.tcParameterValue. else /* less than */ if tFilter.tcOperator = '<' then assign {&vcTo} = tFilter.tcParameterValue {&vcDIFF} = tFilter.tcParameterValue. if {&vcFrom} = {&vcTo} and {&vcFrom} <> '' and {&vcFrom} <> ? then assign {&vcMatches} = {&vcFrom} {&vcFrom} = '' {&vcTo} = ''.