Simplicty and flexibility!


Function::Action

SelectionFilter
SelectionFilter("QueryPart1","QueryPart2")
SelectionFilter("CustomerNr=","0001") .
SelectionFilter("CustomerName=",concat("/'",cutomername,"/'"))
SelectionFilter("CustomerName between 0001 to 0010","")


To set the selection filter for the maintable in a form from a script or button. 

Selectionfilter is "Under-used" but very useful when one figure it out (which almost nobody have). It is deceptive in the fact it takes two arguments but that might be due to a wrong design that has been brought forward because the filter is simply a formatted string like you would use in DQL. 

You can put the entire filter in the first argument and leave the second one blank, but peculiarly not the other way around. 

You can use all operators in the filter like +>< between etc and you can even use functions like

CustomerNr=GetVar("CustomerNr") if you wanted.

As it will need a fully formatted string which would include "" if you compare a text field you will need to use the new StringEscape() functionality i.e. use /' for " in the string whcih will be converted to ".

You don't have to use StringEscape() function as it is built into SelectionFilter() and most other functions in DE8.

Parameters


QueryPart1: Text

The first or whole selection criteria . Is necessary for the function not to give an error message. You can't call this with an empty filter.

QueryPart2: Text

This is optional, and you can simply put it blank i.e. "". There is no logical reason for using this.

Returns/Result


NOthing.

Examples


Reference

See Also


StringEscape()

On the forum about SelectionFilter

SelectionFilter Function

Where can I find help on using SelectionFilter() function in expression builder?Also, I can't find help on other functions available in expression filter....

Product: Dataease [{8}]FIVE. Written by Kensington 06/11/13 at 11:49:44

Re:SelectionFilter Function

Old sins....This is a part of the old DFWACTS functions that was developed as a CDF library in 6.x and implemented as internal functions in 7.0."Inbuilt DFWACTS CDF'sThe largest and most commo...

Product: Dataease [{8}]FIVE. Written by DataEase 06/11/13 at 12:33:46

Re:Re:SelectionFilter Function

Thanks for the detailed reply. It is very helpful.the reason I wanted to use this function was to open another document with pre-set search criteria from which user could choose an item and return to the main document. I have defined a lookup b...

Product: Dataease [{8}]FIVE. Written by Kensington 06/11/13 at 17:07:22

Re:Re:Re:SelectionFilter Function

I have to ask, but it might be to obvious....Why don't you just use OpenRelated and ReturnDataTo?I can't see this needing to fall outside the default functionality?...

Product: Dataease [{8}]FIVE. Written by DataEase 06/11/13 at 18:23:08

Re:Re:Re:Re:SelectionFilter Function

Yes, the popup document can act like OpenRelated but I didn't know anything about ReturnDataTo. Where can I find more information about these two functions. ...

Product: Dataease [{8}]FIVE. Written by Kensington 06/11/13 at 19:50:30

Re:Re:Re:Re:Re:SelectionFilter Function

It is basically the same as CTRL-F10 and CTRL-ENter in the DFD....Return Data ToThe Return To icon works in conjunction with the Open Related Form icon. Its function is to return data from the related form to the original form....

Product: Dataease [{8}]FIVE. Written by DataEase 06/11/13 at 21:47:15

Re:Re:Re:Re:Re:Re:SelectionFilter Function

Thanks, managed to redo the search with ReturnDataTo and it works fine....

Product: Dataease [{8}]FIVE. Written by Kensington 07/11/13 at 23:32:27

On the blog about SelectionFilter

DataEase 8.2 - "New" function(s) SelectionFilter() (add or) (Ver. 8.2.0.1600)

Download Sample When you "rebuild " a 20 year old product like DFW, you come across a lot of history. A lot of good ideas that never was completed, a lot of brute work with...

Product: Dataease [{8}]FIVE. Written by DataEase 18/08/14 at 18:49:50


dg3_HelpView