Skip to content

Instantly share code, notes, and snippets.

@dickiedyce
Created September 7, 2023 19:10
Show Gist options
  • Save dickiedyce/6b8f1e7d36e0ed248356eb643ae4b7ef to your computer and use it in GitHub Desktop.
Save dickiedyce/6b8f1e7d36e0ed248356eb643ae4b7ef to your computer and use it in GitHub Desktop.
Create a Markdown table of relationships in a FileMaker file.
While (
[
tables = TableNames ( "" ) ;
relationList = "| Source File | Related To | Options |" & ¶ &
"| ---- | ---- | ---- | ---- |"
] ;
ValueCount ( tables ) > 0 ;
[
thistable = GetValue ( tables ; 1 ) ;
relationList =
List (
relationList ;
Substitute (
RelationInfo ( "" ; thistable );
[ "¶" ; ";" ];
[ ";;" ; ";" ];
[ ";Table:" ; " | " ];
[ ";Options:" ; " | Options:" ];
[ "Options:Delete" ; " Delete Options:" ];
[ "Options:Sorted" ; " Sorted Options:" ];
[ "Options:Create" ; " Create Options:" ];
[ "Options: Delete" ; " Delete Options:" ];
[ "Options: Sorted" ; " Sorted Options:" ];
[ "Options: Create" ; " Create Options:" ];
[ "Options:;" ; " | " ];
[ ";Source:" ; "¶Source:" ];
[ "Source:" ; "| " ];
[ "¶" ; " |¶" ]
)
) ;
tables = MiddleValues ( tables ; 2 ; 9999 )
] ;
relationList
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment