2010-05-20 60 views
0

我已经安装了FM Pro 9客户端从FM服务器9打开解决方案。Filemaker Pro 9(Mac):我如何才能处理绝对路径?

此解决方案需要访问来自客户端的网络共享上的文件。到目前为止,网络共享已与AFP挂载,但基础架构更改要求将其切换到静态NF​​S挂载。

它们的引导卷可能具有不同的名称,但它们都在“真实”装载树(从UNIX根目录,/开始)的相同装入点装载NFS共享。

根据http://www.filemaker.com/help/html/create_db.8.32.html#1030283它看起来像没有一个没有卷名称的完整路径,就好像这是Mac OS经典 - 有没有办法解决这个问题?

升级到较新的FileMaker不是一个寻求解决方案。

回答

4

如果你聪明,你可以找到默认的卷名称。以下代码(您可以在脚本或自定义函数中使用)将允许您为需要的文件设置变量。

Let([ 
    desktop_path = Get(DesktopPath); 
    second_slash = Position (desktop_path ; "/" ; 1 ; 2); 
    volume = Middle(desktop_path; 2; second_slash - 2) 
]; 
"filemac:/" & volume & "/path_to_share/file.xls" 
) 

在我的机器上,我的启动音量是“Macbook Pro HD”。调用这一位代码的结果返回:

filemac:/Macbook Pro HD/path_to_share/file.xls 

它允许我访问该文件。

如果由于某种原因,DesktopPath不是启动卷上,下面的GET功能可以派上用场:

Get(DocumentsPath) -- returns the path to the users Documents folder 
Get(FileMakerPath) -- returns the path to the folder of the currently 
         running version of FileMaker 
1

所有FileMaker文件引用默默从/Volumes开始,这就是它们包含卷名称的原因。访问不同卷上的文件X使参考看起来像filemac:/X/directoryName/fileName