This should be easy so I’m missing something here. The user is going to enter a filter for Global Dimension 1 Code on a report that had 6 sometextvariable := ‘10…30’; custledgerentry.SETFILTER(“Global Dimension 1 Code”, ‘%1’, sometextvariable); MESSAGE(GETFILTER(“Global Dimension 1 Code”)); result is ‘10…30’ custledgerentry.SETFILTER(“Global Dimension 1 Code”, ‘10…30’); MESSAGE(GETFILTER(“Global Dimension 1 Code”)); result is 10…30 How do I lose the ’ characters…? While typing the message I found a more elegant work around but I’m sure I’ll hit this in the future. Django
Hello Djangman, try Lowerendvalue := 10; Upperendvalue := 30; SETFILTER(“Global Dimension 1 Code”, ‘%1…%2’, Lowerendvalue, Upperendvalue); Pelle
… or just “custledgerentry.SETFILTER(“Global Dimension 1 Code”,sometextvariable);”
Hi Anfinnur, That’s the code I had originally but the filter applied to “Global Dimension 1 Code” still gets treated like a text string rather than a filter. Hi Pelle, That would work but the filter is user definiable so I can’t guarantee that will be a range. In the end I used a request form to ask the user for the filter and then copy that filter to the other dataitems in my report. Thanks for the suggestions! Django
Strange! Just tried it in Attain 3.10 and 3.60 - and it does work fine. But did you notice that I do NOT use the ‘%1’-partameter?
Hi Anfinnur, Odd. Oh well. It wouldn’t be the first time something didn’t work here that works for others. I’ll give it a go the next time I need it. Thanks again.