Created
October 11, 2017 17:28
-
-
Save petrowsky/17e3ee951683deaa01d04c09dd86a1cd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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