February 18, 20223 yr What’s the name of the table? Can I access it with ExecuteSQL (like "FileMaker_Tables")? I simply would like to read its contents. When plugins can access it, maybe it can be done without? Thanks a lot for any insight! Gary
February 18, 20223 yr Tables in Filemaker are used to store user data, not the file's schema. If you want to read the contents of your file's script catalog*, use either the DDR or save a copy as XML. Not sure what your purpose is, though. After all, you can read the contents of your scripts in a very convenient way using the Script Workspace. -- (*) For lack of a better term, I've adopted the one used by the XML.
February 24, 20223 yr Author I simply need it for reference. Apart from commenting the scripts themselves, I have external documents for future reference. It would be cool to just copy and paste blocks of scripts. I know this can be done with Plugins, but I really don’t like dependencies and additional maintenance work. Thanks, anyway. In case you or any other can come up with an idea how to read the scripts, I'd very much appreciate it. At the moment I'm thinking of using a shell script. But, who knows? Thanks.
February 24, 20223 yr 50 minutes ago, gczychi said: It would be cool to just copy and paste blocks of scripts. That's not really possible, because a script contains a lot more than what you see in the Script Workspace window. So when you copy a block of script that looks like this: Go to Layout [ “Parent” (Parent) ] Set Field [ Child::Value; $myVar ] the clipboard actually contains: <fmxmlsnippet type="FMObjectList"><Step enable="True" id="6" name="Go to Layout"><LayoutDestination value="SelectedLayout"></LayoutDestination><Layout id="1" name="Parent"></Layout></Step><Step enable="True" id="76" name="Set Field"><Calculation><![CDATA[$myVar]]></Calculation><Field table="Child" id="3" name="Value"></Field></Step></fmxmlsnippet> so that when you paste this into another script, Filemaker has all the ID references it needs. If you want to copy the script as text, then print it to PDF and copy from there. In macOS you can do Command-P, then select PDF > Open in Preview. Then copy from the subsequent window. It's not perfect (sometimes line breaks are lost, and the format is slightly different from what you see in Script Workspace) but it's definitely usable. The other option is to transform the XML to your own preferred format. But that would be much more work.
February 24, 20223 yr I would think that maintaining external documents and updating them to match the actual code would be a challenge.
Create an account or sign in to comment