GetPlatformString
Back to ListDescription: Get Mac or Windows string dependent of plattform it is run on
FileMaker Prototype:
Set Variable [$res; ACFU_GetPlatformString( string_MacString; string_WinString)]
Category: BOOTSTRAP
NOTE: The bootstrap library comes preloaded in the plugin. Read more
Function source:
/* To Simplify the use of alternate strings on Mac and Windows
Example using the above function from a FM Calculation to work on both platforms
(Shown using hard coded strings, but normally one would use fields from preference table):
ACFU_BSBO_SaveDocumentDesktop ( ACFU_GetPlatformString ( "vArchive:myDocArchive"; "\\192.168.1.20\vArchive\myDocArchive"); "Customers/11213/Contract.docx"; "Customer 11213 Contract" )
*/
function GetPlatformString ( string MacString, string WinString )
FunctionID 232;
if ( isWindows ) then
return WinString;
else
return MacString;
end if
end
The GetPlatformString function returns either a Mac string on MacOS clients, or a Windows string on Windows clients. It can be used to retrieve platform dependant configurations without need to check the system plattform.
Example
Set Variable [$$Config; ACFU_GetPlatformString( Preferences::MacConfig; Preferences::WinConfig)]
The function returns either MacConfig or WinConfig from the Preferences table dependant of what plattform it is executed from.
