| Components | All | New | MacOS | Windows | Linux | iOS | ||||
| Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old | |
MBS FileMaker Plugin Example Databases
VBScript Example
All examples are included with download of MBS FileMaker Plugin.
| Overview | |
| Tables | 2 |
| Relationships | 1 |
| Layouts | 7 |
| Scripts | 9 |
| Value Lists | 0 |
| Custom Functions | 17 |
| Custom Menus | 30 |
| File Options | |
| Default custom menu set | [Standard FileMaker Menus] |
| When opening file | |
| Minimum allowed version | 12.0 |
| Login using | Account Name; Account= Admin |
| Allow user to save password | Off |
| Require iOS passcode | Off |
| Switch to layout | Off |
| Hide all toolbars | Off |
| Script triggers | |
| OnFirstWindowOpen | Script: On Open |
| OnLastWindowClose | Off |
| OnWindowOpen | Off |
| OnWindowClose | Off |
| OnFileAVPlayerChange | Off |
| Thumbnail Settings | |
| Generate Thumbnails | On; Temporary |
| Table Name |
Statistics
| Occurrences in Relationship Graph |
| VBScripts |
6 fields defined, 1 record
| VBScripts |
| gi_interface |
15 fields defined, 3 records
| gi_interface |
| Table Name: VBScripts - 6 Fields | ||||||||
| Field Name | Type | Options | Comments | On Layouts | In Relationships | In Scripts | In Value Lists | |
| zzConstant_One__lct | Calculated, Text | Calculation:
|
|
|
|
|||
| VBScript | Normal, Text | Auto-Enter:
|
|
|
||||
| ChooseFolderResult | Normal, Text | Auto-Enter:
|
|
|
||||
| Prompt | Normal, Text | Auto-Enter:
|
|
|
||||
| NewFolderName | Normal, Text | Auto-Enter:
|
|
|
||||
| CreateFolderResult | Normal, Text | Auto-Enter:
|
|
|
||||
| Table Name: gi_interface - 15 Fields | ||||||||
| Field Name | Type | Options | Comments | On Layouts | In Relationships | In Scripts | In Value Lists | |
| gi_grc_ | Calculated, Number | Storage:
|
|
|
|
|
||
| gi_grc_ -- GRAPHICS -- | Calculated, Number | Storage:
|
|
|
|
|
||
| gi_grc_TabGraphics_DimHilite | Normal, Binary | Auto-Enter:
|
|
|
|
|||
| gi_mls_ | Calculated, Number | Storage:
|
|
|
|
|
||
| gi_mls_ -- MLS NAVAGATION FIELDS -- | Calculated, Number | Storage:
|
|
|
|
|
||
| gi_mls_Level1_Labels__lct | Calculated, Text | Calculation:
|
|
|
|
|
||
| gi_mls_Level1_Labels_HilightSelected__lct | Calculated, Text | Calculation:
|
|
|
|
|||
| gi_mls_Level1_TabControlDim__lcr | Calculated, Binary | Calculation:
|
|
|
|
|||
| test | Calculated, Text | Calculation:
|
|
|
|
|
||
| zz___ ======================== | Calculated, Number | Storage:
|
|
|
|
|
||
| zz__ DEVLOPER FIELDS | Calculated, Number | Storage:
|
|
|
|
|
||
| zz_ ======================== | Calculated, Number | Storage:
|
|
|
|
|
||
| zzCons_One__lct | Calculated, Text | Calculation:
|
|
|
|
|||
| zzVar_mlds_LevelTest__lgn | Normal, Number | Auto-Enter:
| used for demo and testing purposes |
|
|
|
|
|
| PluginInfo__lct | Calculated, Text | Calculation:
|
|
|
|
|||
Layout Objects: ScriptTrigger/Intro/
| Field Name: gi_interface::PluginInfo__lct | |||||
| Field Properties | Coordinates | Field Format | Field Behavior | Quick Find | |
|
| Field Format:
| Field Behavior:
| Yes | |
| Field Name: gi_interface::gi_mls_Level1_TabControlDim__lcr | |||||
| Field Properties | Coordinates | Field Format | Field Behavior | Quick Find | |
|
| Field Format:
| No | ||
| Field Name: gi_interface::gi_mls_Level1_Labels_HilightSelected__lct | |||||
| Field Properties | Coordinates | Field Format | Field Behavior | Quick Find | |
|
| Field Format:
| Yes | ||
| Button Properties | Coordinates | Script/Script Step | |||
|
| Perform Script [ “gi_mls_NavBar_Button ( Level; Number )”; Parameter: "Level= 1" & "¶" &
"Number= 1" ] Scripts: |
|||
| Button Properties | Coordinates | Script/Script Step | |||
|
| Perform Script [ “gi_mls_NavBar_Button ( Level; Number )”; Parameter: "Level= 1" & "¶" &
"Number= 2" ] Scripts: |
|||
| Button Properties | Coordinates | Script/Script Step | |||
|
| Perform Script [ “gi_mls_NavBar_Button ( Level; Number )”; Parameter: "Level= 1" & "¶" &
"Number= 3" ] Scripts: |
|||
| Button Properties | Coordinates | Script/Script Step | |||
|
| Perform Script [ “gi_mls_NavBar_Button ( Level; Number )”; Parameter: "Level= 1" & "¶" &
"Number= 4" ] Scripts: |
|||
| Button Properties | Coordinates | Script/Script Step | |||
|
| Perform Script [ “gi_mls_NavBar_Button ( Level; Number )”; Parameter: "Level= 1" & "¶" &
"Number= 5" ] Scripts: |
|||
| Button Properties | Coordinates | Script/Script Step | |||
|
| Perform Script [ “gi_mls_Wizard_Button(ForwardOrBack)”; Parameter: "Forward" ] Scripts: |
|||
| Button Properties | Coordinates | Script/Script Step | |||
|
| Perform Script [ “gi_mls_Wizard_Button(ForwardOrBack)”; Parameter: "Back" ] Scripts: |
|||
Layout Objects: gi_interface
| Field Name: gi_interface::gi_grc_TabGraphics_DimHilite | |||||
| Field Properties | Coordinates | Field Format | Field Behavior | Quick Find | |
|
| Field Format:
| Field Behavior:
| No | |
Layout Objects: misc
| Field Name: <Missing Field> | |||||
| Field Properties | Coordinates | Field Format | Field Behavior | Quick Find | |
|
| Field Format:
| Field Behavior:
| Yes | |
Layout Objects: ScriptTrigger/Script Library/
| Field Name: gi_interface::PluginInfo__lct | |||||
| Field Properties | Coordinates | Field Format | Field Behavior | Quick Find | |
|
| Field Format:
| Field Behavior:
| Yes | |
| Field Name: gi_interface::gi_mls_Level1_TabControlDim__lcr | |||||
| Field Properties | Coordinates | Field Format | Field Behavior | Quick Find | |
|
| Field Format:
| No | ||
| Field Name: gi_interface::gi_mls_Level1_Labels_HilightSelected__lct | |||||
| Field Properties | Coordinates | Field Format | Field Behavior | Quick Find | |
|
| Field Format:
| Yes | ||
| Field Name: VBScripts::VBScript | |||||
| Field Properties | Coordinates | Field Format | Field Behavior | Quick Find | |
|
| Field Format:
| Field Behavior:
| Yes | |
| Button Properties | Coordinates | Script/Script Step | |||
|
| Perform Script [ “gi_mls_NavBar_Button ( Level; Number )”; Parameter: "Level= 1" & "¶" &
"Number= 1" ] Scripts: |
|||
| Button Properties | Coordinates | Script/Script Step | |||
|
| Perform Script [ “gi_mls_NavBar_Button ( Level; Number )”; Parameter: "Level= 1" & "¶" &
"Number= 2" ] Scripts: |
|||
| Button Properties | Coordinates | Script/Script Step | |||
|
| Perform Script [ “gi_mls_NavBar_Button ( Level; Number )”; Parameter: "Level= 1" & "¶" &
"Number= 3" ] Scripts: |
|||
| Button Properties | Coordinates | Script/Script Step | |||
|
| Perform Script [ “gi_mls_NavBar_Button ( Level; Number )”; Parameter: "Level= 1" & "¶" &
"Number= 4" ] Scripts: |
|||
| Button Properties | Coordinates | Script/Script Step | |||
|
| Perform Script [ “gi_mls_NavBar_Button ( Level; Number )”; Parameter: "Level= 1" & "¶" &
"Number= 5" ] Scripts: |
|||
| Button Properties | Coordinates | Script/Script Step | |||
|
| Perform Script [ “gi_mls_Wizard_Button(ForwardOrBack)”; Parameter: "Forward" ] Scripts: |
|||
| Button Properties | Coordinates | Script/Script Step | |||
|
| Perform Script [ “gi_mls_Wizard_Button(ForwardOrBack)”; Parameter: "Back" ] Scripts: |
|||
Layout Objects: ScriptTrigger/Choose Folder/
| Field Name: gi_interface::PluginInfo__lct | |||||
| Field Properties | Coordinates | Field Format | Field Behavior | Quick Find | |
|
| Field Format:
| Field Behavior:
| Yes | |
| Field Name: gi_interface::gi_mls_Level1_TabControlDim__lcr | |||||
| Field Properties | Coordinates | Field Format | Field Behavior | Quick Find | |
|
| Field Format:
| No | ||
| Field Name: gi_interface::gi_mls_Level1_Labels_HilightSelected__lct | |||||
| Field Properties | Coordinates | Field Format | Field Behavior | Quick Find | |
|
| Field Format:
| Yes | ||
| Field Name: VBScripts::Prompt | |||||
| Field Properties | Coordinates | Field Format | Field Behavior | Quick Find | |
|
| Field Format:
| Field Behavior:
| Yes | |
| Field Name: VBScripts::ChooseFolderResult | |||||
| Field Properties | Coordinates | Field Format | Field Behavior | Quick Find | |
|
| Field Format:
| Field Behavior:
| Yes | |
| Button Properties | Coordinates | Script/Script Step | |||
|
| Perform Script [ “gi_mls_NavBar_Button ( Level; Number )”; Parameter: "Level= 1" & "¶" &
"Number= 1" ] Scripts: |
|||
| Button Properties | Coordinates | Script/Script Step | |||
|
| Perform Script [ “gi_mls_NavBar_Button ( Level; Number )”; Parameter: "Level= 1" & "¶" &
"Number= 2" ] Scripts: |
|||
| Button Properties | Coordinates | Script/Script Step | |||
|
| Perform Script [ “gi_mls_NavBar_Button ( Level; Number )”; Parameter: "Level= 1" & "¶" &
"Number= 3" ] Scripts: |
|||
| Button Properties | Coordinates | Script/Script Step | |||
|
| Perform Script [ “gi_mls_NavBar_Button ( Level; Number )”; Parameter: "Level= 1" & "¶" &
"Number= 4" ] Scripts: |
|||
| Button Properties | Coordinates | Script/Script Step | |||
|
| Perform Script [ “gi_mls_NavBar_Button ( Level; Number )”; Parameter: "Level= 1" & "¶" &
"Number= 5" ] Scripts: |
|||
| Button Properties | Coordinates | Script/Script Step | |||
|
| Perform Script [ “gi_mls_Wizard_Button(ForwardOrBack)”; Parameter: "Forward" ] Scripts: |
|||
| Button Properties | Coordinates | Script/Script Step | |||
|
| Perform Script [ “gi_mls_Wizard_Button(ForwardOrBack)”; Parameter: "Back" ] Scripts: |
|||
| Button Properties | Coordinates | Script/Script Step | |||
|
| Perform Script [ “Choose Folder” ] Scripts: |
|||
Layout Objects: ScriptTrigger/Choose Folder/ Copy
| Field Name: gi_interface::PluginInfo__lct | |||||
| Field Properties | Coordinates | Field Format | Field Behavior | Quick Find | |
|
| Field Format:
| Field Behavior:
| Yes | |
| Field Name: gi_interface::gi_mls_Level1_TabControlDim__lcr | |||||
| Field Properties | Coordinates | Field Format | Field Behavior | Quick Find | |
|
| Field Format:
| No | ||
| Field Name: gi_interface::gi_mls_Level1_Labels_HilightSelected__lct | |||||
| Field Properties | Coordinates | Field Format | Field Behavior | Quick Find | |
|
| Field Format:
| Yes | ||
| Field Name: VBScripts::Prompt | |||||
| Field Properties | Coordinates | Field Format | Field Behavior | Quick Find | |
|
| Field Format:
| Field Behavior:
| Yes | |
| Field Name: VBScripts::ChooseFolderResult | |||||
| Field Properties | Coordinates | Field Format | Field Behavior | Quick Find | |
|
| Field Format:
| Field Behavior:
| Yes | |
| Button Properties | Coordinates | Script/Script Step | |||
|
| Perform Script [ “gi_mls_NavBar_Button ( Level; Number )”; Parameter: "Level= 1" & "¶" &
"Number= 1" ] Scripts: |
|||
| Button Properties | Coordinates | Script/Script Step | |||
|
| Perform Script [ “gi_mls_NavBar_Button ( Level; Number )”; Parameter: "Level= 1" & "¶" &
"Number= 2" ] Scripts: |
|||
| Button Properties | Coordinates | Script/Script Step | |||
|
| Perform Script [ “gi_mls_NavBar_Button ( Level; Number )”; Parameter: "Level= 1" & "¶" &
"Number= 3" ] Scripts: |
|||
| Button Properties | Coordinates | Script/Script Step | |||
|
| Perform Script [ “gi_mls_NavBar_Button ( Level; Number )”; Parameter: "Level= 1" & "¶" &
"Number= 4" ] Scripts: |
|||
| Button Properties | Coordinates | Script/Script Step | |||
|
| Perform Script [ “gi_mls_NavBar_Button ( Level; Number )”; Parameter: "Level= 1" & "¶" &
"Number= 5" ] Scripts: |
|||
| Button Properties | Coordinates | Script/Script Step | |||
|
| Perform Script [ “gi_mls_Wizard_Button(ForwardOrBack)”; Parameter: "Forward" ] Scripts: |
|||
| Button Properties | Coordinates | Script/Script Step | |||
|
| Perform Script [ “gi_mls_Wizard_Button(ForwardOrBack)”; Parameter: "Back" ] Scripts: |
|||
| Button Properties | Coordinates | Script/Script Step | |||
|
| Perform Script [ “Choose Folder” ] Scripts: |
|||
Layout Objects: ScriptTrigger/Create Folder/
| Field Name: gi_interface::PluginInfo__lct | |||||
| Field Properties | Coordinates | Field Format | Field Behavior | Quick Find | |
|
| Field Format:
| Field Behavior:
| Yes | |
| Field Name: gi_interface::gi_mls_Level1_TabControlDim__lcr | |||||
| Field Properties | Coordinates | Field Format | Field Behavior | Quick Find | |
|
| Field Format:
| No | ||
| Field Name: gi_interface::gi_mls_Level1_Labels_HilightSelected__lct | |||||
| Field Properties | Coordinates | Field Format | Field Behavior | Quick Find | |
|
| Field Format:
| Yes | ||
| Field Name: VBScripts::NewFolderName | |||||
| Field Properties | Coordinates | Field Format | Field Behavior | Quick Find | |
|
| Field Format:
| Field Behavior:
| Yes | |
| Field Name: VBScripts::CreateFolderResult | |||||
| Field Properties | Coordinates | Field Format | Field Behavior | Quick Find | |
|
| Field Format:
| Field Behavior:
| Yes | |
| Button Properties | Coordinates | Script/Script Step | |||
|
| Perform Script [ “gi_mls_NavBar_Button ( Level; Number )”; Parameter: "Level= 1" & "¶" &
"Number= 1" ] Scripts: |
|||
| Button Properties | Coordinates | Script/Script Step | |||
|
| Perform Script [ “gi_mls_NavBar_Button ( Level; Number )”; Parameter: "Level= 1" & "¶" &
"Number= 2" ] Scripts: |
|||
| Button Properties | Coordinates | Script/Script Step | |||
|
| Perform Script [ “gi_mls_NavBar_Button ( Level; Number )”; Parameter: "Level= 1" & "¶" &
"Number= 3" ] Scripts: |
|||
| Button Properties | Coordinates | Script/Script Step | |||
|
| Perform Script [ “gi_mls_NavBar_Button ( Level; Number )”; Parameter: "Level= 1" & "¶" &
"Number= 4" ] Scripts: |
|||
| Button Properties | Coordinates | Script/Script Step | |||
|
| Perform Script [ “gi_mls_NavBar_Button ( Level; Number )”; Parameter: "Level= 1" & "¶" &
"Number= 5" ] Scripts: |
|||
| Button Properties | Coordinates | Script/Script Step | |||
|
| Perform Script [ “gi_mls_Wizard_Button(ForwardOrBack)”; Parameter: "Forward" ] Scripts: |
|||
| Button Properties | Coordinates | Script/Script Step | |||
|
| Perform Script [ “gi_mls_Wizard_Button(ForwardOrBack)”; Parameter: "Back" ] Scripts: |
|||
| Button Properties | Coordinates | Script/Script Step | |||
|
| Perform Script [ “Create Folder” ] Scripts: |
|||
| Next Script: [Load VBScript Into Memory, ReturnID ( VBScript )] |
| Script Name | On Open |
| Run script with full access privileges | Off |
| Include In Menu | No |
| Layouts that use this script |
|
| Scripts that use this script |
|
| Script Definition | |
| Script Steps |
|
| Fields used in this script | |
| Scripts used in this script |
|
| Layouts used in this script | |
| Tables used in this script | |
| Table occurrences used by this script | |
| Custom Functions used by this script |
|
| Custom menu set used by this script |
|
| Previous Script: [On Open] | Next Script: [Choose Folder] |
| Script Name | Load VBScript Into Memory, ReturnID ( VBScript ) |
| Run script with full access privileges | Off |
| Include In Menu | No |
| Layouts that use this script |
|
| Scripts that use this script | |
| Script Definition | |
| Script Steps |
|
| Fields used in this script |
|
| Scripts used in this script |
|
| Layouts used in this script |
|
| Tables used in this script |
|
| Table occurrences used by this script |
|
| Custom Functions used by this script |
|
| Custom menu set used by this script |
|
| Previous Script: [Load VBScript Into Memory, ReturnID ( VBScript )] | Next Script: [Create Folder] |
| Script Name | Choose Folder |
| Run script with full access privileges | Off |
| Include In Menu | No |
| Layouts that use this script | |
| Scripts that use this script |
|
| Script Definition | |
| Script Steps |
|
| Fields used in this script | |
| Scripts used in this script | |
| Layouts used in this script |
|
| Tables used in this script | |
| Table occurrences used by this script | |
| Custom Functions used by this script |
|
| Custom menu set used by this script |
|
| Previous Script: [Choose Folder] | Next Script: [-] |
| Script Name | Create Folder |
| Run script with full access privileges | Off |
| Include In Menu | No |
| Layouts that use this script | |
| Scripts that use this script |
|
| Script Definition | |
| Script Steps |
|
| Fields used in this script | |
| Scripts used in this script | |
| Layouts used in this script |
|
| Tables used in this script | |
| Table occurrences used by this script | |
| Custom Functions used by this script |
|
| Custom menu set used by this script |
|
| Previous Script: [Create Folder] | Next Script: [-------- gi Framework Scripts --------] |
| Script Name | - |
| Run script with full access privileges | Off |
| Include In Menu | No |
| Layouts that use this script |
|
| Scripts that use this script |
|
| Script Definition | |
| Script Steps |
|
| Fields used in this script |
|
| Scripts used in this script |
|
| Layouts used in this script |
|
| Tables used in this script |
|
| Table occurrences used by this script |
|
| Custom Functions used by this script |
|
| Custom menu set used by this script |
|
| Previous Script: [-] | Next Script: [gi_mls_NavBar_Button ( Level; Number )] |
| Script Name | -------- gi Framework Scripts -------- |
| Run script with full access privileges | Off |
| Include In Menu | No |
| Layouts that use this script |
|
| Scripts that use this script |
|
| Script Definition | |
| Script Steps |
|
| Fields used in this script |
|
| Scripts used in this script |
|
| Layouts used in this script |
|
| Tables used in this script |
|
| Table occurrences used by this script |
|
| Custom Functions used by this script |
|
| Custom menu set used by this script |
|
| Previous Script: [-------- gi Framework Scripts --------] | Next Script: [gi_mls_GoToMember( Level; Number )__r] |
| Script Name | gi_mls_NavBar_Button ( Level; Number ) |
| Run script with full access privileges | Off |
| Include In Menu | No |
| Layouts that use this script | |
| Scripts that use this script |
|
| Script Definition | |
| Script Steps |
|
| Fields used in this script |
|
| Scripts used in this script | |
| Layouts used in this script |
|
| Tables used in this script |
|
| Table occurrences used by this script |
|
| Custom Functions used by this script |
|
| Custom menu set used by this script |
|
| Previous Script: [gi_mls_NavBar_Button ( Level; Number )] | Next Script: [gi_mls_Wizard_Button(ForwardOrBack)] |
| Script Name | gi_mls_GoToMember( Level; Number )__r |
| Run script with full access privileges | Off |
| Include In Menu | No |
| Layouts that use this script |
|
| Scripts that use this script | |
| Script Definition | |
| Script Steps |
|
| Fields used in this script |
|
| Scripts used in this script |
|
| Layouts used in this script |
|
| Tables used in this script |
|
| Table occurrences used by this script |
|
| Custom Functions used by this script | |
| Custom menu set used by this script |
|
| Previous Script: [gi_mls_GoToMember( Level; Number )__r] |
| Script Name | gi_mls_Wizard_Button(ForwardOrBack) |
| Run script with full access privileges | Off |
| Include In Menu | No |
| Layouts that use this script | |
| Scripts that use this script |
|
| Script Definition | |
| Script Steps |
|
| Fields used in this script |
|
| Scripts used in this script | |
| Layouts used in this script |
|
| Tables used in this script |
|
| Table occurrences used by this script |
|
| Custom Functions used by this script | |
| Custom menu set used by this script |
|
| Function Name | Parameters | Availability | Definition | In Field Definitions | In Scripts |
| MBS_TriggerScript | theScriptName;theFileName | All accounts | /*############################################### MBS_TriggerScript created 10/26/06, by Todd Geist, todd@geistinteractive.com Parameters: theScriptName, theFileName Dependancies: MBS FileMaker Plug-in. Notes: Uses VBScript and Applescript to run a script ################################################*/ Let( [ Applescript = "do script " & Quote(theScriptName); VBScriptText = "FUNCTION DoFMSCript(FileName, ScriptName)" & "¶" & "Set fmApp = CreateObject(\"FMPro.Application\")" & "¶" & "fmApp.Visible = True" & "¶" & "Set fmDocs = fmApp.Documents" & "¶" & "For Each fmDoc In fmDocs" & "¶" & "If InStr(LCase(fmDoc.fullname), LCase(FileName)) > 0 Then" & "¶" & " fmDoc.dofmscript (ScriptName)" & "¶" & "End If" & "¶" & "Next" & "¶" & "END FUNCTION"; ScriptID = MBS("WindowsScript.Create"); lang= MBS("WindowsScript.SetLanguage"; ScriptID; "VBScript"); addcode = MBS("WindowsScript.AddCode"; ScriptID; VBScriptText) ]; Case( Get ( SystemPlatform ) = 1; // Mac OSX Case MBS( "Applescript.Run"; Applescript ); // Windows Case MBS("WindowsScript.ExecuteFunction";ScriptID; "DoFMScript";theFileName; theScriptName) & MBS("WindowsScript.Close"; ScriptID) ) ) |
| |
| gi_zpvt | All accounts |
| |||
| gi_zpvt_ P R I V A T E gi F R A M E W O R K F U N C T I O N S | All accounts |
| |||
| gi_zpvt_mls_GetLayoutsInGroupHelper | theList;theFilter;theLayout;level | All accounts | /*############################################################################################ PURPOSE: Parses the layout list that is passed to it to return only the layouts that are in the same layout Level Group HISTORY Modified 1/4/06. Todd Geist Created 12/25/05, Todd Geist PARAMTERS: Level - the group level. A layout can belong to several level of groups. NOTES: Recursive function ############################################################################################*/ Let( [ // return the layout if it is a sibling based on theFilter firstLine = GetValue( theList; 1 ); isMatch = (theFilter = Left(firstLine; Length(theFilter))); result = If(isMatch; firstLine & "¶"; ""); // shorten the list remaining = RightValues(theList; ValueCount(theList) - 1); // destroy any sibling duplicates which would come from sub tabs e = Position(firstLine; "/"; 1; level +1); remaining2 = Case( isMatch; Substitute( "*^~¶" & remaining; [ "¶" & Left(firstLine; e ); "¶@%"]; ["*^~¶"; ""]; ["*^~"; ""] ); remaining ) ]; Case( ValueCount(theList)>=1; result & gi_zpvt_mls_GetLayoutsInGroupHelper(remaining2; theFilter; theLayout; level); "" ) ) |
| |
| gi_zpvt_mls_GetLayoutsInNavSet | All accounts | /*##################################################################################### PURPOSE: Returns the list of lkayouts in the Nav Set HISTORY Created 1/25/06. Todd Geist PARAMTERS: theList NOTES: only returns layouts that has 2 "/" in the name uses a recursive helper function this function is called many time as a layout draws. The first time a new layout is drawn the result is stored in Variable. After that the function simple retrives the variable instead of calling the recursive function. Caching ######################################################################################*/ Let( [ theList = LayoutNames ( Get ( FileName ) ); $$fw.LayoutNames = Case( $$fw.Lastlayout = Get ( LayoutName ); $$fw.LayoutNames; gi_zpvt_mls_GetLayoutsInNavSetHelper ( theList ) ); $$fw.lastLayout = Get ( LayoutName ) ]; $$fw.LayoutNames ) |
| ||
| gi_zpvt_mls_GetLayoutsInNavSetHelper | theList | All accounts | /*##################################################################################### PURPOSE: Recursive helper function HISTORY Modified 1/25/06. Todd Geist Created 12/25/05, Todd Geist PARAMTERS: theList NOTES: Recursive function ######################################################################################*/ Let( [ // find only the layouts that have two "/" firstLine = GetValue( theList; 1 ); isMatch = GetAsBoolean(Position(firstLine; "/"; 1; 2)); result = If(isMatch; firstLine & "¶"; ""); // shorten the list remaining = RightValues(theList; ValueCount(theList) - 1) ]; Case( ValueCount(theList)>=1; result & gi_zpvt_mls_GetLayoutsInNavSetHelper(remaining); "" ) ) |
| |
| gi_mls_GetLayoutGroupLabels | level | All accounts | /*############################################################################################ PURPOSE: Retuns the Labels for all the layouts that are in the current layouts group. HISTORY Created 12/25/05, Todd Geist PARAMTERS: Level - the group level. A layout can belong to several level of groups. NOTES: Often used for the Tab Lables on Tabbed Interfaces, but is more general. ############################################################################################*/ Let( [ n = Get ( CalculationRepetitionNumber ); siblingLayouts = gi_mls_GetLayoutsInGroup ( level ); thisRepeatsLayout = GetValue( siblingLayouts ; n ); s = Position(thisRepeatsLayout; "/";1 ;level) + 1; e = Position(thisRepeatsLayout; "/";1 ;level + 1); size = e - s ]; Middle(thisRepeatsLayout; s; size) ) | ||
| gi_mls_GetLayoutsInGroup | level | All accounts | /*############################################################################### PURPOSE: Retuns a list of the First Layouts at this level. HISTORY Created 12/25/05, Todd Geist PARAMTERS: Level - the group level. A layout can belong to several level of groups. NOTES: Often used for the Tab Lables on Tabbed Interfaces, but is more general. FIRST Layouts refers to the fact that I don't need every layout in group. I just need one. ############################################################################################*/ Let( [ thisLayout = Get ( LayoutName ); e = Position(thisLayout; "/"; 1; level) ]; gi_zpvt_mls_GetLayoutsInGroupHelper ( gi_zpvt_mls_GetLayoutsInNavSet; Left(thisLayout; e) ; thisLayout ; level ) ) |
| |
| gi_mls_GroupNavigationBar | level;graphic;selectedGraphic | All accounts | /*################################################################################ PURPOSE: Displays the graphics for a Navigation Bar HISTORY: Created 1/29/06, Todd Geist Created 1/7/06, Todd Geist PARAMETERS: level - the group level for the graphic graphic - the background for the Navigation Bar selectedGraphic - the background graphic when the item is Hilited NOTES: Part of the MLS navigation system ################################################################################*/ Let( [ r = Get ( CalculationRepetitionNumber ); thisRepeatsLayout = GetValue(gi_mls_GetLayoutsInGroup ( level ); r); groupMatch = gi_mls_ButtonState ( level ) ]; // n will be either 1 or 2. 2 is deselected Case( IsEmpty(thisRepeatsLayout); ""; GroupMatch; selectedGraphic; graphic ) ) | ||
| gi_mls_GetLayoutGroupLabelsBold | level | All accounts | /*############################################################################################ PURPOSE: Retuns the Labels for all the layouts that are in the current layouts group. HISTORY Created 12/25/05, Todd Geist PARAMTERS: Level - the group level. A layout can belong to several level of groups. NOTES: Often used for the Tab Lables on Tabbed Interfaces, but is more general. ############################################################################################*/ Let( [ n = Get ( CalculationRepetitionNumber ); siblingLayouts = gi_mls_GetLayoutsInGroup ( level ); thisRepeatsLayout = GetValue( siblingLayouts ; n ); thisRepeatsGroup = Left(thisRepeatsLayout; Position(thisRepeatsLayout; "/";1; level +1)); thisLayoutsGroup = Left(Get ( LayoutName ); Position(Get ( LayoutName ); "/";1; level +1)); groupMatch = (thisRepeatsGroup = thisLayoutsGroup) ; s = Position(thisRepeatsLayout; "/";1 ;level) + 1; e = Position(thisRepeatsLayout; "/";1 ;level + 1); size = e - s; label = Middle(thisRepeatsLayout; s; size) ]; Case( groupMatch; TextColor(TextStyleAdd(label; Bold);RGB(0;0;0)); label ) ) |
| |
| gi_GetAs_pListAsVariables | pList;type | All accounts | /*############################################################ PUPOSE: converts a pList to either LOCAL or GLOBAL variables VERSION; 1.0.1 HISTORY: Modified 1/2/06, Todd Geistr Created 11/26/05, Todd Geist PARAMETERS: pList - this is the pList to convert type - either $$ for "Global" or $ for "Script". "$" is the defualt NOTES: a pList is name value pair list. Usually in the form of name1 = Value1 name2 = Value2 etc. ##############################################################*/ Let( [ quotedpList = gi_zpvt_ConvertpListToVariablesHelper ( pList ); varPrefix = Case(type = "$$"; "$$"; "$"); pList = varPrefix & Substitute( quotedpList & "x"; ["¶x"; ""]; ["¶"; ";¶" & varPrefix] ); evalText = "Let(¶[¶" & pList & "¶];¶\"\"¶)" ]; //evalText Evaluate(evalText) ) |
| |
| gi_pList_Item | propertyName;propertyValue | All accounts | /*###################################################################################################### PURPOSE: Packages the propertyName, propertyValue as a pList Item. HISTORY: Modified 1/2/06, Todd Geist Creadted 10/2/05, Todd Geist NOTES: example: Passing "Name" and "Value" tot he function results in name= Value ######################################################################################################*/ Let( [ fieldDel = "="; recordDel = "¶"; needsQuote= Position(propertyValue; fieldDel; 1; 1) or Position(propertyValue; recordDel; 1; 1) or IsEmpty(propertyValue); valueQuoted = Case( needsQuote; "~" &Quote(propertyValue); " " & propertyValue ) ]; propertyName & "=" & valueQuoted & "¶" ) |
| |
| gi_zpvt_ConvertpListToVariablesHelper | pList | All accounts | /*############################################################################ PURPOSE: Recusive Helper function. Only used by the "Var_ConvertpListToVariables" HISTORY: Created, Todd Geist, 12/1/05 NOTES: ############################################################################*/ Let( [ vCount = ValueCount(pList); thisItem = GetValue( pList ; 1 ); sepPos = Position(thisItem; "="; 1;1); thisName = Left(thisItem; sepPos - 1); thisValue = Middle(thisItem; sepPos + 2; 10000); alreadyQuoted = Position(thisItem; "~"; 1; 1) > 0 or (thisValue = GetAsNumber(thisValue)); convertedItem = thisName & "= " & Case(not AlreadyQuoted; Quote(thisValue); thisValue); remainingPList = RightValues(pList; vCount-1) ]; convertedItem & "¶" & Case( vCount > 1; gi_zpvt_ConvertpListToVariablesHelper(remainingPList); "" ) ) |
| |
| gi_Strings_VarEncode | string | All accounts | /*######################################################################################## PURPOSE: Encodes a string so it is safe for use as a Variable Name HISTORY: Created 1/2/06, Todd Geist NOTES: Work in progress. Not addressing " and " and other word operators ########################################################################################*/ Let( [ char = "%" ]; Substitute( string; ["+"; char & "01"]; ["-"; char & "02"]; ["*"; char & "03"]; ["/"; char & "04"]; ["^"; char & "05"]; ["&"; char & "06"]; ["≠"; char & "07"]; ["<>"; char & "08"]; ["<"; char & "09"]; [">"; char & 10]; ["≥"; char & 11]; ["≤"; char & 12]; ["("; char & 13]; [")"; char & 14]; [","; char & 15]; [";"; char & 16]; ["]"; char & 17]; ["["; char & 18]; ["\""; char & 19]; ["::"; char & 20]; ["$"; char & 21]; ["}"; char & 22] ) ) |
| |
| gi_DeclareVariable | name;value | All accounts | /*############################################################ PUPOSE: Sets a global and adds it's name to a list stored in another global VERSION; 1.0.1 HISTORY: Created 11/28/05, Todd Geist PARAMETERS: name - the Name of the Variable value = the value of the global NOTES: Use instead of setting globals directly Useful for keeping track of globals that are in use ##############################################################*/ Let ( [ // check the name for $$ var = Case (PatternCount ( name ; "$" ) = 0 ; "$$" & name ; name ) ; // log if it is the first use fistUse = not (Position( "$$" & $$GlobalVariableList & "¶"; var & "¶";1; 1)); $$GlobalVariableList = Case( fistUse; $$GlobalVariableList & var & "¶"; $$GlobalVariableList ); // actually set the value letTxt = "Let ( " & var & " = \"" & value & "\";1 )" ; result = Evaluate ( LetTxt ) ] ; result ) |
| |
| gi_mls_ButtonState | level | All accounts | /*############################################################################################ PURPOSE: Returns the state of the current button of a Navigation Bar HISTORY Created 10/27/06, Todd Geist PARAMTERS: Level - the group level. A layout can belong to several level of groups. NOTES: Often used for the Tab Lables on Tabbed Interfaces, but is more general. ############################################################################################*/ Let( [ n = Get ( CalculationRepetitionNumber ); siblingLayouts = gi_mls_GetLayoutsInGroup ( level ); thisRepeatsLayout = GetValue( siblingLayouts ; n ); thisRepeatsGroup = Left(thisRepeatsLayout; Position(thisRepeatsLayout; "/";1; level +1)); thisLayoutsGroup = Left(Get ( LayoutName ); Position(Get ( LayoutName ); "/";1; level +1)); groupMatch = (thisRepeatsGroup = thisLayoutsGroup) ]; groupMatch ) | ||
| gi_mls_ButtonPosition | level | All accounts | /*############################################################################################ PURPOSE: Returns the state of the current button of a Navigation Bar HISTORY Created 10/27/06, Todd Geist PARAMTERS: Level - the group level. A layout can belong to several level of groups. NOTES: Often used for the Tab Lables on Tabbed Interfaces, but is more general. ############################################################################################*/ Let( [ n = Get ( CalculationRepetitionNumber ); siblingLayouts = gi_mls_GetLayoutsInGroup ( level ); thisRepeatsLayout = GetValue( siblingLayouts ; n ); lastLayout = Substitute(RightValues(siblingLayouts; 1); "¶"; "") ]; Case( n = 1 and thisRepeatsLayout = lastLayout; "Only"; n = 1; "First"; thisRepeatsLayout = lastLayout; "Last"; not IsEmpty(thisRepeatsLayout) ; "Middle"; "" ) ) |
| Menu Sets | Menus | In Scripts | In Layouts | Comments |
| [Standard FileMaker Menus] |
| |||
| Custom Menu Set 1 |
Download example: VBScript Example
Used functions: