FileMaker:是否有任何本地方法可以获取客户端的计算机名称?

发布于 2024-10-31 08:39:09 字数 260 浏览 7 评论 0原文

是否有 FileMaker (11 Advanced) 本机方法可以在脚本中获取客户端的计算机名称?当显示连接到数据库的客户端时,FileMaker 服务器中显示的计算机名称就可以了。

目的:我希望让 filemaker 调用并根据用户和计算机设置窗口位置。 (同一用户的笔记本电脑的窗口位置和大小首选项可能与台式机的窗口位置和大小首选项不同 - 请考虑 byHost 用户首选项。)

替代方案:我知道可以使用外部脚本获取客户端计算机名称,但是如果可用的话,更喜欢本地方式。

Is there a FileMaker (11 Advanced) native way to obtain the client's computer name in a script? The computer name shown in FileMaker server when displaying clients connected to a database would do nicely.

Purpose: I'm looking to have filemaker recall and set window position based on user and computer. (The same user could have a different window position and size preference for their laptop than for their desktop -- think of byHost user preferences.)

Alternate: I'm aware that a the client computer name could be grabbed using an external script, but would prefer a native way, if available.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(6

尹雨沫 2024-11-07 08:39:09

FileMaker Pro 12.0 中引入了此新功能:

Get ( PersistentID )

来自 FileMaker 文档,网址为 http://www.filemaker.com/help/12/fmp/html/func_ref2.32.54.html

返回运行 FileMaker Pro 的计算机或设备的唯一且不变的标识符运行 FileMaker Go 的设备,采用 32 位十六进制字符串的形式。

如果您使用的是 FMP 12+,这将是比依赖 Get(SystemNICAddress) 更好的选择代码>,可以更改。

This new function was introduced in FileMaker Pro 12.0:

Get ( PersistentID )

From the FileMaker documentation at http://www.filemaker.com/help/12/fmp/html/func_ref2.32.54.html:

"Returns a unique, unchanging identifier for the computer on which FileMaker Pro is running or the device on which FileMaker Go is running, in the form of a 32-digit hexadecimal string."

If you're using FMP 12+, this would be a better choice than relying on Get(SystemNICAddress), which can change.

沦落红尘 2024-11-07 08:39:09

我仍然无法回答所提出的问题。然而,出于所述目的,我刚刚发现该命令

Get ( SystemNICAddress )

它将为每台计算机提供一个不经常更改的唯一标识符。这就是我的目的所需的全部内容,并且可能会比我最初要求的值更好。

I am still unable to answer the question as asked. However, for the purpose stated, I just found the command

Get ( SystemNICAddress )

It will provide a unique identifier for each computer that will change infrequently. This is all that is required for my purpose and will likely work better than the value I originally requested.

妄断弥空 2024-11-07 08:39:09

我知道这是一篇旧文章,但我们出于其他原因处理过同样的事情,也许这会对某人有所帮助。

由于 FM 本身似乎没有内置此功能,即使对于版本 17,我只是制作了一个表,其中包含文件打开时创建的 NIC 地址记录(如果尚不存在),然后是 DNS 名称后来手动添加的。然后使用 GET 查找网卡地址后即可引用 DNS 名称。有些计算机确实有多个 NIC,因此它们被分解为单独的记录(它只是作为列表返回),但相同的 DNS 名称应用于所有计算机。 VPN NIC 的情况除外,有时会在 00:00:00:00:00:00 报告;这些都被忽略了。否则,您可能有多台计算机具有相同的空 NIC - 这没有帮助。我们使用 DNS 名称来报告与员工通话量相关的销售额。想要记住一百台计算机的网卡并不像知道那个人当时坐在哪里那么简单。

I know this is an old post, but we've worked with the same thing for other reasons and maybe this will help someone.

Since it doesn't seem that FM natively has this function built-in, even for version 17, I just made a table with the NIC address records created when the file opens (if it doesn't exist already) and then the DNS name was manually added later. Then the DNS name could be referenced after using GET to find the NIC address. Some computers do have multiple NICs so those are broken up into separate records (it's just returned as a list) but the same DNS name is applied to them all. Except in the case of a VPN NIC which sometimes reports at 00:00:00:00:00:00; those are just ignored. Otherwise you may have multiple computers with the same null NIC - and that isn't helpful. We use the DNS name for reporting of our employees sales in relation to their call volume. And trying to remember the NICs of a hundred computers is not as simple as a DNS name to know where the person was sitting at the time.

坠似风落 2024-11-07 08:39:09

有一种本地方法可以做到这一点。

Get ( HostName )

但是您不能将其与托管文件一起使用,文件需要在本地客户端计算机上打开。
使用与托管文件通信的本地 FileMaker 文件还有其他优势
- 图形密集布局的更好性能
- 提供离线缓存

另一种方法是使用系统 shell 脚本。

为了完整起见,采用非本机方法,有一些 Filemaker 插件可以提供此功能。 www.360works.com/scriptmaster/

There is a native way to do it.

Get ( HostName )

But you can't use this with a hosted filed, file needs to be opened on the client machine locally.
There can be other advantages to using local FileMaker files that communicate with hosted files
- Better performance for graphics heavy layouts
- Providing an offline cache

Another approach is to use a system shell script.

For completeness sake, a non-native approach, there are a few Filemaker plugins that can provide this functionality. www.360works.com/scriptmaster/

笛声青案梦长安 2024-11-07 08:39:09

要识别使用 FileMaker 11 的客户端,我只需使用:

 Get(DesktopPath)

也许它可以帮助...

To identify client with FileMaker 11, I simply use:

 Get(DesktopPath)

Maybe it could help...

玉环 2024-11-07 08:39:09

对这个公认的旧线程的一点更正:
连接客户端的 FileMaker Server 管理控制台中显示的名称是该客户端的 FileMaker 首选项中设置的名称。默认情况下,这是客户端计算机当前的 macOS 用户名,但也可以在 FM 首选项中进行手动覆盖设置。该值(默认或覆盖)是使用原生 FileMaker 函数 Get ( UserName ) 返回的值(与获取用户帐户的值 Get ( AccountName ) 相反)。
然而,听起来原始发帖者实际上是在询问客户端自己的“本地主机名”,您可以在客户端计算机的系统设置中的共享下查看该主机名(在 macOS 中)。
要从 FileMaker 获取该信息,您需要使用可以在 FileMaker 外部调用的东西:一个用于调用简单 shell 脚本“主机名”的插件,或者一个获取主机名然后将结果放在 FileMaker 可以读取的地方的 AppleScript在临时文件中)。

A bit of a correction to this admittedly old thread:
The name that appears in the FileMaker Server's Admin Console for a connected client is the name set in the FileMaker Preferences of that client. By default that is the client computer's current macOS user name, but it can also have a manual override set there in FM Preferences. That value (default or override) is what is returned using the native FileMaker function Get ( UserName ) (as opposed to what gets the user's Account, Get ( AccountName ).
However, it sounds like the original poster was actually asking for the client's own "local hostname", which is what you can view (in macOS) in the client computer's System Settings, under Sharing.
To get that from FileMaker, you would need to use something that can call outside of FileMaker: a plugin to call a simple shell script "hostname", or an AppleScript that gets the hostname and then puts the result somewhere FileMaker can read it (maybe in a temp file).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文