Filtering records on layout - constant or modifiable
I have a table called FABRIC INFO following fields:
- Fabric_ID (text, unique no)
- Category (text) ..to select from value list: Knit, TShirts and AllOther
- Cloth_Type (text) to select from value list: Woven, Leather, Yarn, Jersey and Lining
- Season (text) .. AW 2012, SS 2013, AW 2013, SS 2014 ....
and then I added another field on the same table called;
- Current_Season (global field, text)
Let's say if I want to work on any records with Season field = "AW 2012" by typing in "AW 2012" in the Current_Season (global field).
On a FABRCS layout, I want only "AW 2012" and Category = "AllOther" records to be displayed while the global field of Current_Season = "AW 2012".
I want to set up a script trigger buttons to show Cloth_Type (easy enough) but only matches to the Current_Season, so omitting all other seasons but showing only AW 2012's "matches the Cloth_Type = "Leather".
On a Knit layout, I only want records showing Category = "knit" and only displaying whatever the varible is in "Curresnt_Season". and when I enter find mode, I don't want keep typing in, the season, category, cloth type etc..
What's the best way of setting this up?
Can a script trigger applied to layout? Or do I needs to filter / match records using another table?
I mainly work on one of the season, but on a odd time I need to go back to past season, so I don't want keep typing in all the detail manually by entering Find Mode.
Any suggestion appreciated.
Kind regards, Kaorin
I suggest taking a look at the scripted finds found here: Scripted Find Examples
They can be performed from a script trigger on one or more of the global fields and the OnLayoutEnter trigger could also perform such a script.