Components All New MacOS Windows Linux iOS
Examples Mac & Win Server Client Guides Statistic FMM Blog Deprecated Old

MBS FileMaker Plugin Example Databases

Write Text File

All examples are included with download of MBS FileMaker Plugin.

Write Text File.fmp12

Overview
Tables1
Relationships0
Layouts1
Scripts2
Value Lists2
Custom Functions0
Custom Menus0
File Options
Default custom menu set[Standard FileMaker Menus]
When opening file
Minimum allowed version12.0
Login usingAccount Name; Account= Admin
Allow user to save passwordOff
Require iOS passcodeOff
Switch to layoutOff
Hide all toolbarsOff
Script triggers
OnFirstWindowOpenScript: Set Path to desktop
OnLastWindowCloseOff
OnWindowOpenOff
OnWindowCloseOff
OnFileAVPlayerChangeOff
Thumbnail Settings
Generate ThumbnailsOn; Temporary

 

Tables

Table Name
Statistics
Occurrences in Relationship Graph
Write Text File
4 fields defined, 1 record
Write Text File

Fields

Table Name: Write Text File - 4 Fields
Field NameTypeOptionsCommentsOn LayoutsIn RelationshipsIn ScriptsIn Value Lists
TextNormal, TextAuto-Enter:
  • Allow editing
Validation:
  • Only during data entry
Storage:
  • Repetitions: 1
  • Indexing: None
  • Automatically create indexes as needed
  • Index Language: German
      File PathNormal, TextAuto-Enter:
      • Allow editing
      Validation:
      • Only during data entry
      Storage:
      • Repetitions: 1
      • Indexing: None
      • Automatically create indexes as needed
      • Index Language: German
          Line EndingsNormal, TextAuto-Enter:
          • Allow editing
          Validation:
          • Only during data entry
          Storage:
          • Repetitions: 1
          • Indexing: None
          • Automatically create indexes as needed
          • Index Language: German
              Text EncodingNormal, TextAuto-Enter:
              • Allow editing
              Validation:
              • Only during data entry
              Storage:
              • Repetitions: 1
              • Indexing: None
              • Automatically create indexes as needed
              • Index Language: German

                  Layout Objects: Write Text File

                  Regular Fields

                  Field Name: Write Text File::Text
                  Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                  • Top: 52 pt
                  • Left: 138 pt
                  • Bottom: 261 pt
                  • Right: 520 pt
                  • Anchoring: Left, Top
                  Field Format:
                  • Edit Box
                  Field Behavior:
                  • Allow field to be entered: In Find mode, In Browse mode
                  • Touch keyboard type: Default for Data Type
                  • Go to next field using: Tab key
                  Yes

                  Field Name: Write Text File::File Path
                  Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                  • Top: 269 pt
                  • Left: 138 pt
                  • Bottom: 290 pt
                  • Right: 520 pt
                  • Anchoring: Left, Top
                  Field Format:
                  • Edit Box
                  Field Behavior:
                  • Allow field to be entered: In Find mode, In Browse mode
                  • Touch keyboard type: Default for Data Type
                  • Go to next field using: Tab key
                  Yes

                  Field Name: Write Text File::Line Endings
                  Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                  • Top: 135 pt
                  • Left: 650 pt
                  • Bottom: 156 pt
                  • Right: 903 pt
                  • Anchoring: Left, Top
                  Field Format: Field Behavior:
                  • Allow field to be entered: In Find mode, In Browse mode
                  • Touch keyboard type: Default for Data Type
                  • Go to next field using: Tab key
                  Yes

                  Field Name: Write Text File::Text Encoding
                  Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                  • Top: 158 pt
                  • Left: 650 pt
                  • Bottom: 179 pt
                  • Right: 903 pt
                  • Anchoring: Left, Top
                  Field Format: Field Behavior:
                  • Allow field to be entered: In Find mode, In Browse mode
                  • Touch keyboard type: Default for Data Type
                  • Go to next field using: Tab key
                  Yes

                  Buttons

                  Button PropertiesCoordinatesScript/Script Step
                    Type:
                  • Text: Export
                  • Top: 69 pt
                  • Left: 536 pt
                  • Bottom: 98 pt
                  • Right: 670 pt
                  • Anchoring: Left, Top
                  Perform Script [ “Export” ]

                  Scripts:


                  Value Lists

                  Value List NameSourceValuesOn Layouts
                  Line EndingsCustom
                  • default, CR - MacOS, LF - Unix, CRLF - Windows
                  Text EncodingsCustom
                  • Native, ANSI, Arabic-Mac, Arabic-Win, Baltic-Win, CentralEurope-Mac, ChineseSimp-Mac, ChineseSimp-Win, ChineseTrad-Mac, ChineseTrad-Win, Cyrillic-Mac, Cyrillic-Win, EasternEurope-Win, Greek-Mac, Greek-Win, Hebrew-Mac, Hebrew-Win, ISO-8859-1, ISO-8859-2, ISO-8859-3, ISO-8859-4, ISO-8859-5, ISO-8859-6, ISO-8859-7, ISO-8859-8, ISO-8859-9, ISO-8859-15, Korean-Johab, Korean-Mac, Korean-Win, Latin1, Mac, Native, ShiftJIS-Mac, ShiftJIS-Win, Turkish-Mac, Turkish-Win, UTF-8, DOS, Windows

                  Script Hierarchy

                  Set Path to desktop
                  Export

                  Next Script: [Export]
                  Script NameSet Path to desktop
                  Run script with full access privilegesOff
                  Include In MenuYes
                  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: [Set Path to desktop]
                              Script NameExport
                              Run script with full access privilegesOff
                              Include In MenuYes
                              Layouts that use this script
                              Scripts that use this script
                                Script Definition
                                Script Steps
                                • Set Variable [ $text; Value:Write Text File::Text ]
                                • #if needed, change line endings
                                • If [ Left ( Write Text File::Line Endings ; 4) = "CRLF" ]
                                • Set Variable [ $text; Value:MBS( "Text.ReplaceNewline"; $text; 3 ) ]
                                • Else If [ Left ( Write Text File::Line Endings ; 2) = "LF" ]
                                • Set Variable [ $text; Value:MBS( "Text.ReplaceNewline"; $text; 2 ) ]
                                • Else If [ Left ( Write Text File::Line Endings ; 2) = "CR" ]
                                • Set Variable [ $text; Value:MBS( "Text.ReplaceNewline"; $text; 1 ) ]
                                • End If
                                • #now write
                                • Set Variable [ $r; Value:MBS( "Text.WriteTextFile"; $Text; Write Text File::File Path; Write Text File::Text Encoding ) ]
                                • #check error
                                • If [ MBS("IsError") ]
                                • Show Custom Dialog [ Title: "Error"; Message: $r; Default Button: “OK”, Commit: “Yes”; Button 2: “Cancel”, Commit: “No” ]
                                • End If
                                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

                                        Download example: Write Text File

                                        Used functions: