Skip to content

Instantly share code, notes, and snippets.

@petrowsky
Created October 11, 2017 17:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save petrowsky/17e3ee951683deaa01d04c09dd86a1cd to your computer and use it in GitHub Desktop.
Save petrowsky/17e3ee951683deaa01d04c09dd86a1cd to your computer and use it in GitHub Desktop.
// FileMakerStandards ( tableOccurrenceName )
Let ( [
~tableOccurrenceName = tableOccurrenceName
];
List (
"---- GLOBAL FIELDS ----¶";
Upper (
Substitute (
ExecuteSQL ( "SELECT FieldName FROM FileMaker_Fields WHERE TableName='" & ~tableOccurrenceName & "' AND FieldType LIKE '%global%' ORDER BY FieldName" ; "" ; "" );
" " ; "_" )
);
"¶---- POSSIBLE UNSTORED ----¶";
Substitute (
Proper (
ExecuteSQL ( "SELECT 'unstored-' || FieldName FROM FileMaker_Fields WHERE TableName='" & ~tableOccurrenceName & "' AND FieldClass='Calculated' ORDER BY FieldName" ; "" ; "" )
);
[ " " ; "" ] ; [ "Unstored-" ; "unstored_" ] ; [ "unstored_Unstored_" ; "unstored_" ] );
"¶---- NORMAL FIELDS ----";
Substitute ( ¶ &
Proper (
ExecuteSQL ( "SELECT FieldName FROM FileMaker_Fields WHERE TableName='" & ~tableOccurrenceName & "' AND FieldClass='Normal' ORDER BY FieldName" ; "" ; "" )
);
[ " " ; "" ] ;
["¶A" ; "¶a" ];
["¶B" ; "¶b" ];
["¶C" ; "¶c" ];
["¶D" ; "¶d" ];
["¶E" ; "¶e" ];
["¶F" ; "¶f" ];
["¶G" ; "¶g" ];
["¶H" ; "¶h" ];
["¶I" ; "¶i" ];
["¶J" ; "¶j" ];
["¶K" ; "¶k" ];
["¶L" ; "¶l" ];
["¶M" ; "¶m" ];
["¶N" ; "¶n" ];
["¶O" ; "¶o" ];
["¶P" ; "¶p" ];
["¶Q" ; "¶q" ];
["¶R" ; "¶r" ];
["¶S" ; "¶s" ];
["¶T" ; "¶t" ];
["¶U" ; "¶u" ];
["¶V" ; "¶v" ];
["¶W" ; "¶w" ];
["¶X" ; "¶x" ];
["¶Y" ; "¶y" ];
["¶Z" ; "¶z" ]
);
//"¶---- ALL FIELD DATA ----¶";
//ExecuteSQL ( "SELECT * FROM FileMaker_Fields WHERE TableName='" & ~tableOccurrenceName & "'" ; "" ; "" )
)
)
// Returns TableName, FieldName, FieldType, FieldID, FieldClass, FieldReps and ModCount for all Table Occurrences
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment