'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ' Script Name: Query.Inclusive ' Script Description: Activates an inclusive query (OR), prompting ' user to select from three fields specified ' below. Updates bitmap. ' Run as View | Popup ( Inclusive Query (OR) ) ' Programmer: Tom Kralidis ' Date Created: 01 Nov. 1999 ' Returned Object: myFTab.UpdateSelection ' ' Changes: ' ' Author Date Details ' ' T. Kralidis 01-Nov-1999 Initial Implementation ' ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ' get view, cities.shp (via 0th theme), and display params myView = av.FindDoc("US Cities") myTheme= myView.GetThemes.Get(0) myFTab = myTheme.GetFTab myBitMap = myFTab.GetSelection myBitMap.ClearAll ' call script to make lists ' make sure script exists myScript0 = "Task.MakeList" mkListScript = av.FindScript(myScript0) if (mkListScript = nil) then MsgBox.Error("Can't find script: " + myScript0,"Find Script") exit end ' call script, return params bigList = "" bigList = av.Run("Task.MakeList",bigList) ' run query myHdr = "Inclusive Query (OR)" mySelectList = MsgBox.MultiListAsString(bigList,"Choose items in inclusive search.", myHdr) if (mySelectList = nil) then MsgBox.Error("Operation Cancelled.", myHdr) exit end for each thingy in mySelectList if (thingy.Contains("----------")) then MsgBox.Info("Separator chosen, not included in query.",myHdr) continue end if (thingy.Contains("State of")) then myQueryString = "[State_Name] = " + thingy.Right(thingy.Count - 9).Quote MsgBox.Info(myQueryString, myHdr) myFTab.Query (myQueryString, myBitMap, #VTAB_SELTYPE_OR) myFTab.UpdateSelection end if (thingy.Contains("Settlement Class of")) then myQueryString = "[Type] = " + thingy.Right(thingy.Count - 20).Quote MsgBox.Info(myQueryString, myHdr) myFTab.Query (myQueryString, myBitMap, #VTAB_SELTYPE_OR) myFTab.UpdateSelection end if (thingy.Contains("Capital of")) then myQueryString = "[Capital] = " + thingy.Right(thingy.Count - 11).Quote MsgBox.Info(myQueryString, myHdr) myFTab.Query (myQueryString, myBitMap, #VTAB_SELTYPE_OR) myFTab.UpdateSelection end end return myFTab.UpdateSelection