Brian Dunning's FileMaker Custom Functions

hostCanRPC

Checks if file is hosted on a version of Server that supports Perform Script On Server (PSoS)

  Average rating: 5.0 (1 vote) Log in to vote

Julio Toledo   Julio Toledo - Show more from this author
Automation USA LLC
https://www.automationusa.net

Share on Facebook Share on Twitter

  Sample input:
hostCanRPC
  Sample output:
true or false
returns false when Get ( ConnectionState ) evaluates to 0 (file is local)
returns false when file is hosted but host name is not "Server" or "Cloud"
returns true when Get ( HostApplicationVersion ) evaluates to "Cloud"
returns true when Get ( HostApplicationVersion ) evaluates to "Server 13.0.2" (or greater)

  Function definition: (Copy & paste into FileMaker's Edit Custom Function window)

Checks if file is hosted on a version of Server that supports Perform Script On Server (PSoS), aka Remote Procedure Calls (or RPCs).

PARAMETERS:
None

RETURNS:
Returns boolean as defined by Claris FileMaker ( '1' for true or '0' for false ):
- True signifies file is hosted and host version supports Remote Procedure Calls (i.e. 'Perform Script On Server')
- False signifies file is either local or host version **does not** support Remote Procedure Calls (i.e. 'Perform Script On Server')

DEPENDENCIES:
'GetMajorVersion' custom function
( https://www.briandunning.com/cf/2202 | https://github.com/Automation-USA/custom-functions/blob/master/GetMajorVersion.fmfn )

'GetMinorVersion' custom function
( https://www.briandunning.com/cf/2203 | https://github.com/Automation-USA/custom-functions/blob/master/GetMinorVersion.fmfn )

Examples:

hostCanRPC returns false when Get ( ConnectionState ) evaluates to 0 (file is local)

hostCanRPC returns false when file is hosted but host name is not "Server" or "Cloud"

hostCanRPC returns true when Get ( HostApplicationVersion ) evaluates to "Cloud"

hostCanRPC returns true when Get ( HostApplicationVersion ) evaluates to "Server 13.0.2" (or greater)

hostCanRPC returns false when Get ( HostApplicationVersion ) ≤ "Server 13.0.1" (earliest reliable implementation of 'PerformScriptOnServer' in FileMaker Server begins with version 13.0.2)


KNOWN ISSUES:
None

NOTES:
None

RELEASE:
2019-08-25 - Initial release by Julio Toledo, Automation USA LLC ( www.automationusa.net )

 

Comments

Log in to post comments.

 

Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.

Support this website.

This library has been a free commmunity resource for FileMaker users and developers for 20 years. It receives no funding and has no advertisements. If it has helped you out, I'd really appreciate it if you could contribute whatever you think it's worth: