DW
1
Daniel Wood 4 years ago
This is the configure link.
DW
1
Daniel Wood 4 years ago
This is the primary key name field.
DW
1
Daniel Wood 4 years ago
This is where you can access the prepare tool.
DW
1
Daniel Wood 4 years ago
The populate tool can be found here!
DW
1
Daniel Wood 4 years ago
The Full View tool can be accessed here!
- elemental_log
- Introduction
- An overview of how it works
- We log in JSON first
- JSON to FileMaker Records
- Before we begin..
- You should use one copy of elemental_log per solution
- Make sure your security and accounts are all good
- Integrating into your own solution
- Step One - Specify Field / Script Names
- Step Two - Set up your own file(s)
- 1 - Create an External Data Source
- 2 - Add a Table Occurrence
- 3 - Copy and Paste the @ELEMENTAL_LOG custom function
- 4 - Copy and Paste the fields found in the LogFields table.
- 5 - Copy and paste the script #elemental_log
- Step Three - Set up elemental_log
- The Configure Tool
- Accessing the Configure Tool
- Adding your file
- Choosing what fields to log.
- What can you log?
- Defining the primary key field
- Specify for individual tables
- Specify for entire file
- Specify a combination
- File Logging Preferences
- Enable Logging
- Hidden File
- Conserve Space
- Optimise Performance
- The Log Definition
- The Prepare Tool
- Do you need to prepare?
- Layouts required!
- Accessing the Prepare Tool
- To launch the prepare tool directly
- To run directly from your own files.
- To prepare all files
- To prepare a single file only
- To prepare a specific table in a file
- To specify a specific set of records in a given table
- Preparation versus Reset
- Preparation via Server Script Schedule
- Using the Prepare Tool
- The Populate Tool
- Layouts required!
- Accessing the Populate Tool
- To launch the populate tool directly
- To run directly from your own files.
- To populate from all files
- To populate from a single file only
- To populate from a specific table in a file
- To populate from a specific set of records in a given table
- To populate from a set of records prior to deletion.
- Using the Populate Tool
- The Full View Tool
- Accessing the Full View Tool
- Viewing details about a change
- Session ID
- Layout Name
- Script Name
- Batch Number
- Searching
- A note about previous value for a change
- The Contextual View Tool
- Requirements and considerations for using the contextual view tool
- Accessing the contextual view tool
- Viewing details about a change
- Things to watch out for
- Renaming a table
- Renaming a field
- Renaming a table occurrence
- Incorrect file names
- Multi-file setup configurations
- Further Support
Introduction
An overview of how it works
We log in JSON first
{
"data" :
{
"information" :
{
"base_table" : "Contacts",
"file_name" : "Contacts_Demo",
"primary_key" : "E13A29C6-FA04-472C-AFA6-9E60A87BD6DB"
},
"initial_values" :
{
"email" : "amaclead@outlook.com",
"name_family" : "Maclead",
"name_given" : "Abel",
"phone_home" : "631-335-3413",
"phone_work" : "631-677-3675",
"photograph" : "6h0HeYG_.jpg"
},
"last_values" :
{
"email" : "amaclead@hotmail.com",
"phone_home" : "631-335-3422"
}
},
"log" :
[
{
"account" : "elemental_log",
"change_state" : "onModify",
"field_name" : "email",
"id_session" : "",
"layout_name" : "Contacts",
"modified" : "2020-11-25 9:17:21 PM",
"script_name" : "",
"utc" : 63741889041037,
"uuid" : "3131452287154726348103204583604141493936399793380326844074",
"value" : "amaclead@hotmail.com"
},
{
"account" : "elemental_log",
"change_state" : "onModify",
"field_name" : "phone_home",
"id_session" : "",
"layout_name" : "Contacts",
"modified" : "2020-11-25 9:17:25 PM",
"script_name" : "",
"utc" : 63741889044397,
"uuid" : "4851487553280602608269468881043215978192119124950054386803",
"value" : "631-335-3422"
}
]
}
JSON to FileMaker Records
Before we begin..
You should use one copy of elemental_log per solution
Make sure your security and accounts are all good
Integrating into your own solution
Step One - Specify Field / Script Names
Step Two - Set up your own file(s)
Step Three - Set up elemental_log
The Configure Tool
Accessing the Configure Tool
Perform Script [ Specified: From list ; "CONFIG: Open Configuration" from file: "elemental_log" ; Parameter: ]
Adding your file
Choosing what fields to log.
What can you log?
Defining the primary key field
File Logging Preferences
The Log Definition
{
"meta" :
{
"cache_definition" : 1,
"file_enabled" : 1,
"file_hidden" : 0,
"name_field_log" : "_elemental_log",
"name_field_log_flag" : "_elemental_log_flag",
"name_field_primary_key" : "PrimaryKey",
"name_script" : "#elemental_log",
"remove_formatting" : 0
},
"table_list" :
{
"Contacts" :
{
"field_list" :
{
"Company" : "1",
"First Name" : "1",
"Job Title" : "1",
"Last Name" : "1",
"Photo" : "1",
"Title" : "1",
"Website" : "1"
},
"primary_key" : "PrimaryKey"
}
}
}
The Prepare Tool
Do you need to prepare?
Layouts required!
Accessing the Prepare Tool
Perform Script [ Specified: From list ; "PREPARE: Run Prepare" from file: "elemental_log" ; Parameter: $parameter ]
JSONSetElement (
"" ;
[ "prepare_type" ; "prepare" ; JSONString ]
)
JSONSetElement (
"" ;
[ "file_name" ; get ( filename ) ; JSONString ] ;
[ "prepare_type" ; "prepare" ; JSONString ]
)
JSONSetElement (
"" ;
[ "file_name" ; get ( filename ) ; JSONString ] ;
[ "table_name" ; "<<your base table name here>>" ; JSONString ] ;
[ "prepare_type" ; "prepare" ; JSONString ]
)
JSONSetElement (
"" ;
[ "file_name" ; get ( filename ) ; JSONString ] ;
[ "table_name" ; "<<your base table name here>>" ; JSONString ] ;
[ "record_ids" ; "<<return delimited list of ids>>" ; JSONString ] ;
[ "prepare_type" ; "prepare" ; JSONString ]
)
Preparation versus Reset
Preparation via Server Script Schedule
Using the Prepare Tool
The Populate Tool
Layouts required!
Accessing the Populate Tool
Perform Script [ Specified: From list ; "POPULATE: Run Populate" from file: "elemental_log" ; Parameter: $parameter ]
JSONSetElement (
"" ;
[ "file_name" ; get ( filename ) ; JSONString ]
)
JSONSetElement (
"" ;
[ "file_name" ; get ( filename ) ; JSONString ] ;
[ "table_name" ; "<<your base table name here>>" ; JSONString ]
)
JSONSetElement (
"" ;
[ "file_name" ; get ( filename ) ; JSONString ] ;
[ "table_name" ; "<<your base table name here>>" ; JSONString ] ;
[ "record_ids" ; "<<return delimited list of ids>>" ; JSONString ]
)
JSONSetElement (
"" ;
[ "file_name" ; get ( filename ) ; JSONString ] ;
[ "table_name" ; "<<your base table name here>>" ; JSONString ] ;
[ "record_ids" ; "<<return delimited list of ids>>" ; JSONString ] ;
[ "delete" ; 1 ; JSONNumber ]
)
Using the Populate Tool
The Full View Tool
Accessing the Full View Tool
JSONSetElement (
"" ;
[ "file_name" ; get ( filename ) ; JSONString ]
)
Viewing details about a change
Searching
A note about previous value for a change
The Contextual View Tool
Requirements and considerations for using the contextual view tool
Accessing the contextual view tool
JSONSetElement (
"" ;
[ "file_name" ; get ( filename ) ; JSONString ]
)
Viewing details about a change
Things to watch out for
Renaming a table
Renaming a field
Renaming a table occurrence
Incorrect file names
Multi-file setup configurations
Further Support