├── .gitignore ├── Standards.fmp12 ├── Standards.fp7 ├── Standards13.fmp12 ├── Functions ├── WebviewerURL.fmfn ├── #Name-Value │ ├── FM-Parameters.fmp12 │ ├── DDR │ │ └── Summary.xml │ ├── #ArrayGet.fmfn │ ├── #Array.fmfn │ ├── #ListGet.fmfn │ ├── #ArrayFromList.fmfn │ ├── #AssignGlobal.fmfn │ ├── #GetScriptResult.fmfn │ ├── #GetScriptParameter.fmfn │ ├── VerifyVariablesNotEmpty.fmfn │ ├── #Assign.fmfn │ ├── #Get.fmfn │ ├── #AssignScriptResults.fmfn │ ├── #AssignScriptParameters.fmfn │ ├── #List.fmfn │ ├── #GetNameList.fmfn │ ├── ScriptOptionalParameterList.fmfn │ ├── ScriptRequiredParameterList.fmfn │ ├── #Filter.fmfn │ ├── #Remove.fmfn │ └── #.fmfn ├── FMPExtension.fmfn ├── ParseLines.fmfn ├── WebviewerTimezone.fmfn ├── UUID │ ├── UUID.fmfn │ ├── UUIDGetTimestamp.fmfn │ ├── UUIDRandom.fmfn │ ├── UUIDGetNICAddress.fmfn │ ├── UUIDGetAsRFC4122.fmfn │ ├── UUIDGetAsUUID.fmfn │ ├── UUIDTimestamp.fmfn │ └── UUIDTimeDevice.fmfn ├── DateFormatISO8601.fmfn ├── GetDevice.fmfn ├── ValueExists.fmfn ├── FormatPlural.fmfn ├── FileExtension.fmfn ├── TimeSpan.fmfn ├── HTMLCSS.fmfn ├── LayoutObjects.fmfn ├── GetAsOrdinal.fmfn ├── VariableToggle.fmfn ├── DeveloperModifierKeys.fmfn ├── DatabaseFieldNames.fmfn ├── ListWrap.fmfn ├── Objects │ ├── ObjectLayoutNumber.fmfn │ ├── ObjectTableName.fmfn │ ├── ObjectLayoutName.fmfn │ ├── ObjectTableID.fmfn │ ├── ObjectLayoutID.fmfn │ ├── ObjectValueListID.fmfn │ ├── ObjectValueListName.fmfn │ ├── ObjectScriptID.fmfn │ ├── ObjectScriptName.fmfn │ ├── ObjectFieldName.fmfn │ └── ObjectFieldID.fmfn ├── ValueShuffle.fmfn ├── GetFieldNameAsGet.fmfn ├── SQLFieldName.fmfn ├── SQLTableName.fmfn ├── LayoutPosition.fmfn ├── WebviewerHTMLData.fmfn ├── HTMLWrapTag.fmfn ├── ActiveFQFN.fmfn ├── VariableCheckbox.fmfn ├── GetFieldNameVariable.fmfn ├── TrimMore.fmfn ├── ValueFilter.fmfn ├── Errors │ ├── ErrorFound.fmfn │ ├── ErrorFmpGetLast.fmfn │ ├── ErrorApp.fmfn │ ├── Error.fmfn │ └── LogData.fmfn ├── BOM.fmfn ├── TimeUnits.fmfn ├── PortalRowToggleValue.fmfn ├── ValuePosition.fmfn ├── Triggers │ ├── TriggersAreActive.fmfn │ ├── TriggersReset.fmfn │ ├── TriggersDisable.fmfn │ └── TriggersEnable.fmfn ├── ASOpenFolder.fmfn ├── ISO639-1.fmfn ├── UISortListDirection.fmfn ├── UISortPortalDirection.fmfn ├── HTMLDocument.fmfn ├── FileOSPath.fmfn ├── WindowActiveTabs.fmfn ├── Developer.fmfn ├── LayoutVariables.fmfn ├── WindowProperties.fmfn ├── IsNumber.fmfn ├── SetError.fmfn ├── Dirname.fmfn ├── PluginExists.fmfn ├── MergeVariables.fmfn ├── UISortPortalToggle.fmfn ├── UISortListToggle.fmfn ├── DeveloperProperties.fmfn ├── DeveloperPropertiesDisplay.fmfn ├── FilterASCII.fmfn ├── VariableList.fmfn ├── UISortPortalIndicator.fmfn ├── Define.fmfn ├── FMPURL.fmfn ├── BusinessDays.fmfn ├── LayoutObjectHierarchy.fmfn ├── UISortListIndicator.fmfn ├── ChecksumAdler32.fmfn ├── KeyboardModifiers.fmfn ├── ForEach.fmfn ├── WindowCenter.fmfn ├── S3Url.fmfn ├── ValueToggle.fmfn ├── GetBaseNAsNumber.fmfn ├── GetNumberAsBaseN.fmfn ├── BusinessHolidays.fmfn ├── Debug.fmfn ├── DeveloperWebview.fmfn └── ObjectID.fmfn ├── README.markdown ├── ScriptMaster └── RegEx.java └── Standards Diffs └── standard.css /.gitignore: -------------------------------------------------------------------------------- 1 | *.fp7 2 | Import.log 3 | .DS_Store 4 | -------------------------------------------------------------------------------- /Standards.fmp12: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/petrowsky/fmpstandards/HEAD/Standards.fmp12 -------------------------------------------------------------------------------- /Standards.fp7: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/petrowsky/fmpstandards/HEAD/Standards.fp7 -------------------------------------------------------------------------------- /Standards13.fmp12: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/petrowsky/fmpstandards/HEAD/Standards13.fmp12 -------------------------------------------------------------------------------- /Functions/WebviewerURL.fmfn: -------------------------------------------------------------------------------- 1 | // need to turn it into a function 2 | "fmp://localhost/" & get ( filename ) & "?script=scriptname" -------------------------------------------------------------------------------- /Functions/#Name-Value/FM-Parameters.fmp12: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/petrowsky/fmpstandards/HEAD/Functions/#Name-Value/FM-Parameters.fmp12 -------------------------------------------------------------------------------- /README.markdown: -------------------------------------------------------------------------------- 1 | # Archived repository 2 | 3 | This is not the authoritative repository for filemakerstandards. 4 | 5 | Please use [filemakerstandards/fmpstandards](https://github.com/filemakerstandards/fmpstandards) if you are going to fork and contribute. 6 | -------------------------------------------------------------------------------- /Functions/FMPExtension.fmfn: -------------------------------------------------------------------------------- 1 | Let ( [ 2 | ~pathParts = Substitute ( Get ( FilePath ) ; "/" ; ¶ ); 3 | ~filename = GetValue ( ~pathParts ; ValueCount ( ~pathParts ) ); 4 | ~dotCount = PatternCount ( ~filename ; "." ) 5 | ]; 6 | Middle ( ~filename ; Position ( ~filename ; "." ; 1 ; ~dotCount ) ; 10 ) 7 | ) -------------------------------------------------------------------------------- /Functions/ParseLines.fmfn: -------------------------------------------------------------------------------- 1 | // Function used to parse out labeled lines like a header 2 | 3 | Let ( [ 4 | ~content = content & ¶; 5 | ~match = label; 6 | ~start = Position ( ~content ; ~match ; 1 ; 1 ) + Length ( ~match ); 7 | ~end = Position ( ~content ; ¶ ; ~start ; 1 ) 8 | ]; 9 | Middle ( ~content ; ~start ; ~end - ~start ) 10 | ) 11 | -------------------------------------------------------------------------------- /Functions/WebviewerTimezone.fmfn: -------------------------------------------------------------------------------- 1 | "data:text/html, 2 |
3 | 11 | 12 | 13 | 14 | " -------------------------------------------------------------------------------- /ScriptMaster/RegEx.java: -------------------------------------------------------------------------------- 1 | // Needs documentation about use 2 | import java.util.regex.*;String regex = pattern; 3 | Pattern pattern = Pattern.compile(regex, Pattern.CASE_INSENSITIVE | Pattern.MULTILINE | Pattern.DOTALL); 4 | Matcher matcher = pattern.matcher(text); 5 | List result = new LinkedList(); 6 | while (matcher.find()) { result.add( matcher.group(1) );} 7 | return result; -------------------------------------------------------------------------------- /Functions/UUID/UUID.fmfn: -------------------------------------------------------------------------------- 1 | /** 2 | * This custom function is a reserved keyword function and can be used as a wrapper (like an alias) 3 | * or reference to any other custom function used to generate a UUID (Universally unique identifier) 4 | * http://en.wikipedia.org/wiki/Uuid 5 | * http://filemakerstandards.org/pages/viewpage.action?pageId=557138 6 | */ 7 | 8 | UUIDTimeNIC // change this to another UUID function if desired -------------------------------------------------------------------------------- /Functions/DateFormatISO8601.fmfn: -------------------------------------------------------------------------------- 1 | Let ( [ 2 | ~today = Get ( CurrentDate ) 3 | ]; 4 | Year ( ~today ) 5 | & "-" 6 | & Right ( "00" & Month ( ~today ) ; 2 ) 7 | & "-" 8 | & Right ( "00" & Day ( ~today ) ; 2 ) 9 | ) 10 | 11 | & " " & 12 | 13 | Let ( [ 14 | ~time = Get ( CurrentTime ) 15 | ]; 16 | Right ( "00" & Hour ( ~time ) ; 2 ) 17 | & ":" 18 | & Right ( "00" & Minute ( ~time ) ; 2 ) 19 | & ":" 20 | & Right ( "00" & Seconds ( ~time ) ; 2 ) 21 | ) -------------------------------------------------------------------------------- /Functions/GetDevice.fmfn: -------------------------------------------------------------------------------- 1 | Let ( [ 2 | ~devices = List ( "Computer" ; "iPad" ; "iPhone"); 3 | ~version = Get ( ApplicationVersion ); 4 | ]; 5 | calculation 6 | ) 7 | 8 | Let ( [ 9 | ~version = Get ( ApplicationVersion ); 10 | ~device = Left ( ~version ; Position ( ~version ; " " ; 1 ; 1 ) -1 ) 11 | ]; 12 | Case ( 13 | ~device = "Go_iPad"; 14 | "iPad"; 15 | 16 | ~device = "Go"; 17 | "iPhone"; 18 | 19 | "Computer" 20 | ) 21 | ) -------------------------------------------------------------------------------- /Functions/ValueExists.fmfn: -------------------------------------------------------------------------------- 1 | /** 2 | * ===================================================== 3 | * ValueExists ( value ; valueList ) 4 | * 5 | * PURPOSE: 6 | * Return if a value exists within a return delimited list 7 | * 8 | * RETURNS: 9 | * (boolean) True if it exists, False if not 10 | * 11 | * DEPENDENCIES: 12 | * none 13 | * 14 | * NOTES: 15 | * none 16 | * 17 | * HISTORY: 18 | * 2011-01-13 - Petrowsky - Added to custom functions 19 | * ===================================================== 20 | * 21 | */ 22 | 23 | PatternCount ( ¶& valueList &¶ ; ¶& value &¶ ) ≥ 1 24 | -------------------------------------------------------------------------------- /Functions/FormatPlural.fmfn: -------------------------------------------------------------------------------- 1 | /** 2 | * ===================================================== 3 | * FormatPlural ( number ; singular ; plural ) 4 | * 5 | * PURPOSE: 6 | * Provide a method to return the singular or plural version 7 | * of a count of something 8 | * 9 | * RETURNS: 10 | * (string) Either the supplied singular or plural string 11 | * 12 | * DEPENDENCIES: 13 | * none 14 | * 15 | * NOTES: 16 | * none 17 | * 18 | * HISTORY: 19 | * 4/14/11 - Petrowsky - Added 20 | * ===================================================== 21 | * 22 | */ 23 | 24 | Case ( 25 | number = 0; 26 | plural; 27 | 28 | number = 1; 29 | singular; 30 | 31 | plural 32 | ) 33 | -------------------------------------------------------------------------------- /Functions/FileExtension.fmfn: -------------------------------------------------------------------------------- 1 | /** 2 | * ===================================== 3 | * FileExtension ( path ) 4 | * 5 | * RETURNS: 6 | * The extension of the provided path. 7 | * 8 | * PARAMETERS: 9 | * path: Any valid file path with the /filename.extension at the end. 10 | * 11 | * EXAMPLES: 12 | * FileExtension ( "fmnet:/dev.server/MyDatabase.fmp12" ) // returns fmp12 13 | * FileExtension ( "/Volumes/some/path/to/file.svg" ) // returns svg 14 | * 15 | * DEPENDENCIES: none 16 | * 17 | * HISTORY: 18 | * CREATED on 2016-08-04. 19 | * 20 | * REFERENCES: 21 | * none 22 | * ===================================== 23 | */ 24 | 25 | RightWords ( Substitute ( path ; "." ; ¶ ) ; 1 ) 26 | -------------------------------------------------------------------------------- /Functions/TimeSpan.fmfn: -------------------------------------------------------------------------------- 1 | // © 2006 Winfried Huslik, www.fmdiff.com 2 | 3 | Let ( [ 4 | neg = Case ( date1 > date2 ; -1 ; 1 ) ; 5 | d1 = Case ( neg < 0 ; date2 ; date1 ) ; 6 | d2 = Case ( neg < 0 ; date1 ; date2 ) ; 7 | 8 | d = Mod ( Day ( d2 ) - Day ( d1 ) ; Day ( 9 | Date ( Month ( d1 ) + 1 ; 0; Year ( d1 ) ) ) ) ; 10 | 11 | m = Mod ( Month ( d2 ) - Month ( d1 ) - 12 | ( Day ( d2 ) < Day ( d1 ) ) ; 12 ) ; 13 | 14 | y = Year ( d2 ) - Year ( d1 ) - ( ( Month ( d2 ) - 15 | ( Day ( d2 ) < Day ( d1 ) ) ) < Month ( d1 ) ) 16 | ]; 17 | y * neg & ¶ & 18 | m * neg & ¶ & 19 | d * neg & ¶ & 20 | y & " years, " & m & " months, and " & d & " days" & ¶ 21 | ) 22 | -------------------------------------------------------------------------------- /Functions/HTMLCSS.fmfn: -------------------------------------------------------------------------------- 1 | /** 2 | * ===================================================== 3 | * HTMLCSS ( css ) 4 | * 5 | * PURPOSE: 6 | * Simply wrap the "; 35 | ) 36 | -------------------------------------------------------------------------------- /Functions/LayoutObjects.fmfn: -------------------------------------------------------------------------------- 1 | /** 2 | * ===================================== 3 | * LayoutObjects ( layout ) 4 | * 5 | * PURPOSE: 6 | * Get a return delimited list of all layout objects from 7 | * a specified layout 8 | * 9 | * RETURNS: 10 | * (string) Return delimited array layout objects 11 | * 12 | * PARAMETERS: 13 | * none 14 | * 15 | * EXAMPLES: 16 | * none 17 | * 18 | * DEPENDENCIES: 19 | * none 20 | * 21 | * NOTES: 22 | * This is a helper function 23 | * 24 | * HISTORY: 25 | * MODIFIED on 2011-07-08 by matt@filemakermagazine.com - added 26 | * 27 | * REFERENCES: 28 | * none 29 | * ===================================== 30 | */ 31 | 32 | Substitute ( LayoutObjectNames ( Get( FileName ) ; layout ) ; ["<¶" ; ""] ; ["¶>" ; ""] ) 33 | -------------------------------------------------------------------------------- /Functions/#Name-Value/DDR/Summary.xml: -------------------------------------------------------------------------------- 1 | 2 |" & Substitute ( 153 | FieldNames ( Get ( FileName ) ; Get ( LayoutName ) ); 154 | [ ¶ ; "
¶" ] 155 | ) & "
"; 156 | "