参考 > 函数参考 > 其他函数 > ConvertToFileMakerPath
 

ConvertToFileMakerPath

将标准格式转换为 FileMaker 格式路径。

格式 

ConvertToFileMakerPath (标准路径 ; 格式)

参数 

标准路径 - 包含标准格式路径的任意文本表达式或文本字段

格式 - 一个指定值,指定标准路径所在的标准格式(参阅下文)。

返回的数据类型 

文本

原始版本 

19.0

说明 

此函数执行 ConvertFromFileMakerPath 的相反操作。格式参数可以使用与 ConvertFromFileMakerPath 函数中相同的值。

当 FileMaker 路径无法转换为标准格式时,此函数将返回 "?"。

注释 

如果标准路径不是格式参数指定的格式,则此函数将返回无效的 FileMaker 路径或 "?"。

此函数将使用 fmp 架构的 URL 路径转换为带有 fmnet 前缀的 FileMaker 路径。所有其他返回的 FileMaker 路径使用 file 前缀。请参阅关于路径前缀

示例 1 

ConvertToFileMakerPath ("/Users/John Smith/Documents/test.xlsx" ; PosixPath) 返回:

file:/Macintosh HD/Users/John Smith/Documents/test.xlsx(在 Mac 上),其中根卷是指定的 Macintosh HD。

file:/C:/Users/John Smith/Documents/test.xlsx(在 Windows 计算机上),其中引导驱动器是 C。

示例 2 

ConvertToFileMakerPath ("C:\Users\John Smith\Documents\test.xlsx" ; WinPath) 返回 file:/C:/Users/John Smith/Documents/test.xlsx

示例 3 

在将 $URL 变量中的 URL 转换为 FileMaker 路径后,显示 fmnet:/fmhost.example.com/My Clients.fmp12

设置变量 [ $URL ; 值: "fmp://fmhost.example.com/My%20Clients.fmp12" ]
显示自定义对话框 [ ConvertToFileMakerPath ($URL ; URLPath) ]

相关主题 

函数参考(类别列表)

函数参考(按字母顺序排序的列表)

关于公式

关于函数

创建文件路径