The Documents collection (the “Documents object”) consists of all databases that are currently open within the FileMaker application (thus the word “collection”). By sending commands to the Documents object, you can tell FileMaker to open and close databases. The Documents object supports six properties; three are pointers to objects, and three are read-only properties. The Documents object supports two methods.
The first three properties are pointers and refer to the Application object:
This is a pointer to the Documents’ root Application object.
This is a pointer to the Documents’ Application object.
This is a pointer to the currently active FileMaker Pro database (Document).
The next three properties are read-only properties and they are:
This is the number of databases (Documents) currently being run by the FileMaker Pro Application object. It represents the total number in the Documents collection.
Use this property to implicitly refer to the object in a For Loop. It returns an Enumerator object, allowing you to navigate all the databases in the Documents collection.
This allows you to reference a specific database (Document) that is currently running (in the Documents collection) in FileMaker Pro. You can use this to stipulate a specific database by:
This method opens a FileMaker Pro database (full file name including path) using the password you specified (bothvariables mustbe strings).It opens the database (Document) and returns a pointer to the Document object.
This will immediately close all open FileMaker Pro databases (all Documents in the Documents collection) without any warning to users who may be connected.
This illustration shows the Documents object and its properties and methods:
FileMaker Pro Document Object
Not to be mistaken for the Documents object, the Document object (without the “s”) refers to just one of the currently open FileMaker databases. It allows you to do the most useful thing you can with ActiveX automation in FileMaker Pro, which is the ability to call a script in a database’s ScriptMaker. The Document object supports six properties, two of which are pointers to the Application and Documents objects, and four of which are read-only properties.
The Document object also supports four methods.
The first two properties are pointers and refer to the Application object:
This is a pointer to the root Application object.
This is a pointer to the Documents object, which is the parent to the Document (database). The next four properties are read-only properties:
This returns the full file name (including the path) of the currently active database. If this database is being remotely hosted, then it will not include the path in the file name.
This returns the file path of the currently active database, but it does not include the file name or its extension.
This returns TRUE if the current active database has been saved.
This returns TRUE if the current database’s window is the active one on the desktop or FALSE if it isn’t.
This will make the current database’s window the foremost, active window in FileMaker’s application window.
This forces FileMaker Pro to save the currently active database and flush the cache to disk.
This closes the currently active database and removes it from the Documents collection.
The most useful Document object method that allows you to specify which script (as a string variable, please) in the active database that you would like to run. This script must already exist in the database for it to be run, obviously. FMP Active Document.DoFMScript ("Go to form layout") This illustration shows the Document object and its properties and methods:
Example #2: FileMaker Pro’s Application Objects . . . All Together Now!
Following is a more complex example of the various FileMaker Pro objects in action. This example uses all three objects: the Application, Documents, and Document objects. It is also written in a more conventional format, the type that would be used when building an actual external application using VB. That is to say that specific events are fired as subroutines and code is re-used wherever possible by one subroutine calling another to do something. (You may find it easier to explore the code for this solution in VB instead of here on the printed page.) This example was also written using VB, which must be installed first before the example can be run.
Here is the code for this VB project including helpful commentary sprinkled here and there:
File Maker Related Interview Questions
|Management Information systems Interview Questions||Software Engineering Interview Questions|
|File net Interview Questions||Data analyst Interview Questions|
|Hadoop Distributed File System (HDFS) Interview Questions||Linux File Systems Interview Questions|
|Excel Data Analysis Interview Questions||Asp Dot Net Database Interview Questions|
File Maker Tutorial
Getting Comfortable With Filemaker Pro
Your First Database
Records And Data
Developing Relational Databases
Harnessing The Power Of Complex Calculations
Securing Your Filemaker Pro Databases
Sharing Filemaker Pro Databases
Taking Data On The Road
Filemaker, Odbc, And Sql
Filemaker At The Center: Emulating Or Integrating Filemaker Pro With Other Software
Filemaker Pro Plug-ins
Filemaker Pro Development Conventions
Designing, Est Imat Ing, Planning, Developing, And
managing Filemaker Projects
Filemaker Developer, The Developer Tool, And
Developing Commercial Solutions
Web Publishing With Filemaker Pro
Filemaker Pro Unlimited, The Web Server Connector,
And Advanced Web Technologies
Applescript Automation Of Filemaker Pro
Activex Automation For Filemaker Pro
All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd
Wisdomjobs.com is one of the best job search sites in India.