FileMaker: Is there any native way to get the client's computer name? - filemaker

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.

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.

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.

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.

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/

To identify client with FileMaker 11, I simply use:
Get(DesktopPath)
Maybe it could help...

Related

Giving human readable names to servers in jobrunr

Jobrunr dashboard by default shows UUIDs in place of server names.
Is it possible to make this more human readable and/or customizable? For example, ip address, hostname etc.
Currently this is not possible, but feel free to create an feature request or (even better) a PR to add this functionality.
Update on 17/01/2023: this is now solved in JobRunr v6. Not only the background job servers will show the names but also inside the processing block a job.

Setting up Azerothcore. Where do I find and how do I edit the realmlist table in Heidi to allow computers on my LAN to join the server?

Edit: so we never obtained the answer, instead we tried it with the server and client on the same PC. This morning I tried logging into the client and it would hang on "authenticating". So I shut everything down and went back to my life for a bit. This evenng I tried again, and now it says account or password incorrect. We tried recreating the accunt and password, same thing. We made a new account and password, same thing. Any help would be appreciated. Both on this new issue and the first one below (because eventually I want us both to be able to play on our own computers). TIA
My son and I have been following the guide. We did fine until we got to the part that says: "Open the acore_auth database and find the realmlist table. You need to edit the address field according to your needs". We have searched through everything in acore_auth in Heidi and we have not been able to find where the realmlist table is, let alone how to edit it. We are using one dedicated computer for the server, and we will join the server via our laptops. Any help would be greatly appreciated. The guide has been very detailed thus far, thank you. My son is almost done with his AS in Computer Programming, with an emphasis on game design, not networking.
Upon further inspection... we discovered our acore_auth database is exmpty. All the Acore_? databases are empty. What did we miss? Any ideas?
You have to edit the table realmlist of the acore_auth database and change the address field with the LAN address of the PC where the server is running:
Reading your question it sounds much that you are trying to run AC on Windows, so I recommend reading the installation guide here https://www.azerothcore.org/wiki/installation#azerothcore-classic-setup
Which also includes installation for macOS and Linux if you happen to use them.
In short to populate your database for the first time you need to run your Authserver and Worldserver applications which will automatically import the base and update files into your database. Then you go to acore_auth.realmlist and specify the address field to LAN IP (192.168.x.x) for the host PC to allow other PCs in your network to connect to it.

Proper way to distinguish between multiple services using zeroconf

I'm writing a piece of software that will run on computers as well as phones.
The service uses an HTTP API for communication and will be published over the local network using Zeroconf.
Initially I published my service using _http._tcp. as the service type but I quickly discovered that both my NAS and my music receiver(!) also broadcasts themselves with that exact service type.
So the question now arises how to differentiate between my service and other services that are using HTTP.
Alternatives
Using a different service type
The is certainly the most certainly the easiest way and (almost) guarantees no other services will be picked up.
However, according to Apple1 new services should be registered with IANA. This is obviously not required but seeing as they recommend it it feels like it would be the wrong way to do it
Using the TXT record
Apple2 describes the TXT record like this:
When a service is registered, three related DNS records are created: a service (SRV) record, a pointer (PTR) record, and a text (TXT) record. The TXT record contains additional data needed to resolve or use the service, although it is also often empty.
The certainly feels like it could be the right way to do it, but I'm still not sure and it's hard to find a description of what the field should contain.
My first though would be to put something like <service_name>-<version> which will then be parsed to see which service it actually is.
My NAS seems to use this for identifying model and version numbers.
Try talking to the service
After finding a service one could always perform a HEAD request on a known endpoint and look for a known header set by the service.
This feels like a fairly slow approach and who knows what making a HEAD request to my receiver will do.
And just to be clear, this question has nothing to do with a specific language or framework, it's about the concepts of zeroconf.
I could show some code but I don't see how that would help.
First, does the service you're advertising actually meet the qualifications for _http as defined by RFC 2782. Specifically- is it not just using HTTP for a transport but is also:
can be displayed by "typical" web browser client software, and
is intended primarily to be viewed by a human user.
If no, register your own service type (there are a couple other services that use HTTP as a transport but don't meet those qualifications so they have -http as a suffix to the service name, see pgpkey-http, senteo-http, xul-http).
If yes, there are a couple ways to go depending on how strict one's interpretation of the RFC is. The least strict being just adding a TXT record as you've already noted in your question. iTunes registers itself with a TXT record in the format iTSh Version=196618.
If you're feeling a little more strict, the RFC only explicitly states that the u=, p= and path= TXT records exist for HTTP. Perhaps someone can chime in on this, but I haven't seen much discussion on whether adding TXT records to already existing entries is frowned upon or not. So with that, the other way is to just an algorithmic instance name. For example, adding the suffix "-NicklasAService" to the device name. Hopefully giving it a unique name to the local network but still making it so that the service can be easily picked out by the PTR record by just looking for the suffix.

Unique ids in MongoDB

I'm about to deploy my first production version of a web service that uses MongoDB.
This web service could be prone to attacks (hackers).
I have been using the built-in Object-ID as unique identifier for each value, and this is exposed publicly (or at least to authenticated users).
Could this be a problem considering that it's built up on data such as, object creation timestamp, machine and process IDs etc (http://docs.mongodb.org/manual/core/object-id/)?
Could it be that I'm giving away too much information about when the object was created, how many machines that is used to etc?
What would your recommendations be?
Not really. It can't be used to graph your network or your machines or find hidden objects or to even graph your traffic and load times (as I have found out myself from trying).
For example, unlike an auto incrementing ID you cannot easily judge what time stamp or PID or Machine ID was used to create the next ObjectID. This makes it very hard to crawl for the hidden objects especially if you don't publicly link to them somewhere.
The PID and Machine ID are not very good at identifying anything about your network really and the PID can change almost any time it likes, whether the process was restarted or whether you restarted the server; or if you are using a language like PHP, every time a new connection comes in.
The machine ID is another piece of useless information that doesn't really give any meaningful results for anyone but your computer. I don't believe it uses the network interfaces ID (some drivers did) any more so it cannot be used to identify the machine externally.
So in short, not really.

SSRS 2008 R2 Change Shared Data Source for Production vs Test

I am trying to figure out the best way to mitigate this situation. My project team consists of 3 developers each with their own instances of SSRS installed. We have 2 external SSRS servers that we must push updates to in order for the customer to review and for us to test and there is a 3rd external server coming online that will not be administered by us.
I have been trying to find a way to set the Shared Data Source to the current environment regardless of the system it is on. I had thought that just a common naming convention for the ReportServer address would be fine, but we've already found them to be inconsistent on the production and test servers. My next attempt was to specify an ODBC connection and let each person create a system DSN with connection information, but after an entire day of messing with it and continually getting errors, I'm not convinced it's the way to go. ( The most recent error being "The specified DSN contains an architecture mismatch between the Driver and Application" ). I have tried going through Windows ODBC DSN msc to create the DSN and I have tried using Report Builder 3.0 to create one and neither seem to work.
So I guess at this point I just have to ask, is there a best practice for going about this? I'd like to do local development and testing via the "Run" button inside Report Builder and then I'd just like to upload the file to the Report Manager and have it work regardless of the URL for the Report Server.
If the properties (connectionstring, etc) for shared data sources don't change much on your servers, the following may work for you: in the properties for your project set OverwriteDataSources = False for the appropriate configurations. Set it to true only temporarily to change the data source, if needed.
That way any dev can safely deploy to the servers, without affecting the data source, even if (s)he locally changed something (e.g. the connection string) to match a personal environment.
Not an optimal solution, but relatively easy to set up.