Options

How to fix strangely behaving Option FlowFilters

Miklos_HollenderMiklos_Hollender Member Posts: 1,598
edited 2008-05-13 in NAV Tips & Tricks
So you have FlowFilters of the Option type and actually put them on a form instead of forcing the user to use the filter buttons on top of the screen. While FlowFilters of the Code type work perfectly, the strange stuff about Options is that if you type in the value, they work, but if you select it from the list, they don't.

Therefore add this into the OnValidate, on the form:

SETFILTER("Whatever Filter",FORMAT("Whatever Filter"));

(Another weirdness I found when I wanted to show a drill-down form that in the case of FlowFilters, FORMAT("Whatever Filter"::"Whatever Value") isn't 'Whatever Value', it's rather 0,1, etc. Ouch! At the end I just ended up with text constants as in this case it was only empty, No, and Yes and filtering for a Boolean field - not very nice but does the job.)
Sign In or Register to comment.