I have this Variable (AmountFilter) on a form that needs to used for filtering on a decimal field. The variable is a text string.
The Variable can for example contain following data:
> 100
100..200
100|200
etc.
How do I use this Variable to filter on a decimal field
I have tried with
setfilter("Amount (LCY)",'%1',AmountFilter)
but obviously I an error!
Ann
0
Comments
1 first scenario
SETFILTER("code",CodeFilter);
CodeFilter Is a Filter with sign like | &
find rec with
code:=A
code:=B
2. second scenario
SETFILTER("Code",'%1',CodeFilter);
CodeFilter is value of field without sign
Nav try to set filter "Code" = exactly CodeFilter Value
find rec with
1 code:=A|B
This syntax will cause error if codefilter Lenght > fieldlenght.
Besides.. what record have 'A|B' in code field
In your case:
amountfilter:='100|200'
setfilter("Amount (LCY)",'%1',AmountFilter)
cause error because decimal can't have value '100|200'
this is text or code value
Regards