FileMaker Pro 2026 - get persistent data names


I have mentioned in previous emails that there is a function missing for persistent data. While there is a function ListPersistentDataIDs to list all the instance IDs for a specified name, there is no function to list all the names used in persistent data entries. Hopefully this is an oversight and we will eventually get a function like ListPersistentDataNames.

In the meantime how do we retrieve all the names currently being used for persistent data entries in a file?

XML Catalog File

There is a function in the Tools menu called "Save a Copy as XML…". This allows us to export FileMaker catalog descriptions as XML files. The UI has been improved in FileMaker 26 and now enables saving each catalog to an individual file.

With the new persistent data in FileMaker 26 comes a new catalog – Persistent Data Store. This catalog contains XML descriptions of all persistent data entries in a file. A single persistent data entry looks like this:


‹PersistentStore name="SOLUTION" instanceID="minimumClient" id="7">
 ‹UUID modifications="0" 
  userName="David Head" 
  accountName="David Head" 
  timestamp="2026-06-04T12:22:15">12CE2CA1-E6CE58BB5114‹/UUID>
 ‹Value type="Number">
   ‹StyledText>
     ‹Data>‹/Data>
   ‹/StyledText>
 ‹/Value>
‹/PersistentStore>

You will note that the first line contains the name and instance ID used to identify the entry.

Along with the Tools menu command, there is an equivalent script step – Save a Copy as XML. This script step has options to specify a destination file (path and name) and to set export options as JSON. This JSON allows us, among other things, to specify which catalogs to export.

This is the first step in a scripted solution to produce a list of persistent entry names.

Read the XML file

The next step is to read the content of the XML file. This can be done using the Data File script steps. We simply open the data file, read from the data file, and close the data file. The contents are read into a variable.

Parse and store the list of names

The last step is to parse the entry names out of the XML that has been read. This is reasonably easy using a While function to process the lines of XML. We will look for instances of <PersistentStore name= and extract the name following that string.

This will produce a return-separated list of names. If a particular name has been used for several instance IDs, then there will be repetition in the list. So we can reduce that list to unique names only using the UniqueValues function. The final list can be stored in a field.

Show me the script

The final script looks like this:


# export persistent data catalog
Set Variable [ $path; 
  Value:Get(TemporaryPath) & "PersistentData.xml" ]
Save a Copy as XML [ Window name: ; 
  Destination file: “$path” ; 
  Specify options as JSON: JSONSetElement ( "{}" ;
  [ "catalogs_included" ; 
     JSONMakeArray ("PersistentStoreCatalog"; " " ; 
     JSONString ) ; JSONArray ] ;
  [ "include_details" ; False ; JSONBoolean ] ;
  [ "split_catalogs" ; False ; JSONBoolean ] ;
  [ "standalone_binarydata" ; False ; JSONBoolean ]) ]
# read the XML file
Open Data File [ “$path” ; Target: $fileID ]
Read from Data File [ File ID: $fileID ; 
  Amount (bytes): Target: $xml ; Read as: UTF-8 ]
Close Data File [ File ID: $fileID ]
# parse out the names and store unique in field
Set Variable [ $namesList; 
  Value: --see below for calculation--- ]
Set Field [ system::persistentDataNames; 
  SortValues(UniqueValues($namesList)) ]

Note that this script is required to run with Full Access to be able to generate the XML file.

The script starts by setting a variable to the path of the XML file to be exported. For convenience we are storing it in a temporary path since we don't need to keep the file.

The Persistent Data Store catalog is then saved as XML. This script step uses Specify options as JSON. The standard JSON provided by FileMaker has been modified such that the only catalog being exported is PersistentStoreCatalog.

The exported XML file is then opened, read into a variable ($xml), and closed. Note that when reading from the data file, we are not specifying a number of bytes – leaving Amount (bytes) blank causes FileMaker to read the entire document. Also note that we are reading as UTF-8.

The names list is then parsed from the XML into another variable ($namesList). This uses the following calculation:


While (
[
    xmlcode = $xml ;
    marker = "‹PersistentStore name=\"" ;
    markerCount = PatternCount ( xmlcode; marker ) ;
    counter = 1 ;
    result = ""
] ;
counter ≤ markerCount ;
[
    location = 
      Position ( xmlcode ; marker ; 1 ; counter ) ;
    start = location + Length ( marker ) ;
    finish = 
      Position ( xmlcode ; "\"" ; start ; 1 ) ;
    result = 
      List ( 
        result ; 
        Middle ( xmlcode ; start ; finish - start ) 
        ) ;
    counter = counter + 1
] ;
result
)

* Calculation optimised on advice from Giulio Villani – thanks :)

Finally the names list is reduced to unique values only, sorted into alphabetical order, and stored in a field.

Job done

We now have a list of all the unique names currently used in persistent data entries in the file. It is admittedly more complex than using a simple function to retrieve the list of names but we can only hope for that to come soon.

We can run the script any time we need to ensure that we have a fully up-to-date list.

So what are we going to do with this list of names? There are a lot of uses. For example:

  • compare the current list against a documented list of expected names and identify obsolete or orphaned entries that are no longer required by the solution
  • use the list in a scripted loop to delete selected entries or all entries in Persistent Data
  • query the list to see if a particular name was currently in use

What would you use the persistent data names list for?


Want to know more about FileMaker 2026? See all the latest information about FileMaker 2026 on the newly branded Claris website.

Are you coming to Reconnect.Christchurch, 15-16 October?
Get all the details and purchase tickets at Reconnect.Christchurch.

Are you late to the ScriptLogic party? If you have missed out on some of these emails, catch up here: Email Archive

If you know someone else who you think might like this email, you can send them this link to subscribe: Subscribe to ScriptLogic Daily