Hi,
I have a flowfilter on a form that is an option. You can manually type in one of the options and it will accept it and filter. However, if you try to select from the option menu it gives you a blank item. Is there a way to make sure which ever option you select is inserted into the filter?
0
Comments
What is this option menu you're referring to?
AP Commerce, Inc. = where I work
Getting Started with Dynamics NAV 2013 Application Development = my book
Implementing Microsoft Dynamics NAV - 3rd Edition = my 2nd book
You've created a Flowfilter or flowfield?
of an option Type from another table?
Do you wan't it to lookup something?
You wan't to be able to change?
Your flowfiltering on these options? Why would the options change if you're filtering on it?
Perhaps you can start again..with the goal you're trying to achieve.
http://www.BiloBeauty.com
http://www.autismspeaks.org
1) Mileage
2) Div or Dep
3) PickUpTruck, Van, LuxCar, EconCar, SUV, Other (Just an as example)
So if the User picks Mileage 1..100 (i'm assuming you want a range)
then Div
then Van
You want all the Vans that fit the other criteria to show on your list with a count?
Not sure if this is similar but I needed to do something kind of the same.
which required filtering on a list to find what I needed.
1) was A Ship-to Zip Code 2) Was an Order Weight & 3) would find the rate.
It was accomplished here:
http://www.mibuso.com/forum/viewtopic.php?t=17866
Take a look at that and see if it gives you any ideas else I will try to get back to you tomorrow.
PS here's another post from the download section called Filter Anything on Forms.
http://www.mibuso.com/dlinfo.asp?FileID=515
http://www.BiloBeauty.com
http://www.autismspeaks.org
If you don't want to use built-in filter menu then first create an option type variable with the same options of your flowfilter.
Then write your code on OnValidate of the form like:
SETRANGE("Option Filter",OptionFilter);
But if the user also uses built-in filter menu then you have to use GetFilter on OnAfterGetCurrentRecord. (if not, your option variable does not always reflects the user's selection)
Pargesoft
Couldn't have explained it better myself (no really, I couldn't) However, the filter works. It's just displaying the options in the flowfilter. I believe Ufuk might be on to something. I don't doubt that his will work, but will it work with a COUNT on the form?
Flowfilter does not effect on the record count. The records remain but the values change. So what do you mean by work with the Count of the form?
Do you count some records effected by the option type flowfilter?
Pargesoft
So if you sure about using a flowfilter then there is no problem with using a variable instead of flowfilter itself.
Pargesoft
You might want to look at the forms in g/l
Chart of Accounts->Balance-> Gl Balance or G/l balance by dimension.
look at the code behind those forms. It set up for multi-filters with options.
http://www.BiloBeauty.com
http://www.autismspeaks.org
[code[Vehicle Count:
Count(Vehicle WHERE (Mileage=FIELD(FILTER(Mileage Filter)),Global Dimension 1 Code=FIELD(FILTER(Div/Dep Filter)),Type=FIELD(FILTER(Type Filter))))[/code]
I was able to make a new field on the form and linked it to a variable option that then did a SETRANGE("Type Filter",variable);
Doing that allowed me to make the option field changeable and also populated the flowfilter.