Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Rename with Confidence – Building Dynamic FileMaker Systems

1,163 views

Published on

Learn about best practices, common mistakes, and how to build your system with best practices. Why to avoid indirection and how to use tools to identify indirection. Learn techniques that you can easily implement to ensure your system is dynamic and built to last.

Learn the following:
• The benefits of a dynamic system
• Bad scripting, functions to avoid
• Identifying Indirection With BaseElements
• Using FileMaker Internal IDs
• Execute SQL, friend or foe?
• Additional resources

Published in: Technology, Business
  • Be the first to comment

  • Be the first to like this

Rename with Confidence – Building Dynamic FileMaker Systems

  1. 1. Michael Westendorf Senior Application Developer www.dbservices.com RENAME WITH CONFIDENCE - BUILDING DYNAMIC FILEMAKER SYSTEMS
  2. 2. Questions If you have a question, please typist it into the console. If we don’t get to your question, please send it to fba@dbservices.com
  3. 3. Agenda • The benefits of a dynamic system • Bad scripting, functions to avoid • Identifying Indirection With BaseElements • Using FileMaker Internal IDs • Execute SQL, friend or foe? • Additional resources
  4. 4. About DB Services •We are a team of analysts, developers, and designers creating custom applications to make your organization more effective and efficient. Learn more about our FileMaker services on our website. •If you leave this presentation wanting learn more! Check out our FileMaker Blog where we post new content each month. •To learn more about DB Services, check out our website at www.dbservices.com
  5. 5. Background Work • Member of FM Academy • Article included in FM Newsletter • Global presence (Canada, Europe, Africa) • Team focused on adding value • Senior Application Developer at
 DB Services • Certified in 15, 14, 13 , 12 • Working with FileMaker for 10 years • Sponsor at FileMaker Developer Conference
  6. 6. Benefits Of A Dynamic System • Allows renaming of objects • Allows analysis tools such as BaseElements 
 to identify objects in use/unreferenced • Prevent errors
  7. 7. Indirection Any development practice that prevents FileMaker to recognize your usage as a reference to the object. These will not show up as being used in a DDR Good Indirection - Dynamically grabbing an object name and using it in your solution.
  8. 8. Things To Avoid Hardcoding • Table occurrence names • Layout names • Field names • Window Names • Value List Names • Script Names *Layout Object Names • Never rename a layout object
  9. 9. Scripts/Functions • Get( LayoutName ) • Evaluate • ExecuteSQL • ValueListItems • DatabaseNames • FieldBounds • FieldComments • FieldIDs • FieldRepetitions • FieldStyle • FieldType GetField • GetNextSerialValue • LayoutObjectNames • RelationInfo • Get ( LayoutNumber ) • Get ( LayoutTableName ) • Get ( ScriptName )
  10. 10. Scripts/Functions • Set Field By Name • Go To Layout - by name or # • Go to Related Record - Layout by name or # • Select Window - File Renaming • Close Window - File Renaming
  11. 11. Common Examples If [ Get ( LayoutName ) = "Orders" ] Do Some Code End If
 Evaluate( “TableName” & “::” & $fieldName ) ExecuteSQL ( “SELECT companyName FROM customer” ; “” ; “” ) ValueListItems( Get( FileName); "DealerAllProducts")
  12. 12. Examples Set Variable [ $GeoField; 
 Value:
 Case( not IsEmpty( GLOB_Globals.tog::gFedExZone) ; "ord_ZIPzone::FedExRateZone"; not IsEmpty( GLOB_Globals.tog::gState) ; “ORD__Orders.tog::OrdShipState_t”; not IsEmpty( GLOB_Globals.tog::gCountry) ; “ORD__Orders.tog::OrdShipCountry_t”; "") ] Set Field By Name [ Evaluate ("$ProdSpecField"); $ProdSpec ]
  13. 13. Examples Set Variable [ $GeoField; 
 Value:
 Case( not IsEmpty( GLOB_Globals.tog::gFedExZone) ; getfieldname( ord_ZIPzone::FedExRateZone ); not IsEmpty( GLOB_Globals.tog::gState) ; getfieldname( ORD__Orders.tog::OrdShipState_t ); not IsEmpty( GLOB_Globals.tog::gCountry) ; getfieldname( ORD__Orders.tog::OrdShipCountry_t ); "") ] Set Field By Name [ $GeoField; $ProdSpec ]
  14. 14. Examples
  15. 15. Examples Evaluate( “Packing Slips::Roll Qty “ & $s )
  16. 16. Identifying Indirection BaseElements Demo
  17. 17. Demo
  18. 18. FileMaker Internal IDs Using custom functions to identify the internal id in FileMaker. Pros • Allows you to rename objects Cons • Still can not be seen by DDR/BaseElements • Harder to read code
  19. 19. FileMaker Internal IDs Can all be referenced using internal ids • Tables • Layouts • Value Lists • Fields - GetFieldName( ) • Scripts
  20. 20. Demo FileMaker Internal IDs
  21. 21. Execute SQL Pros • Context Independent • Can save time when development Cons • Natively requires indirection • SELECT only • Large sets of data can have performance issues
  22. 22. Demo Execute SQL
  23. 23. Integrations Indirection • ODBC • PHP • Server Schedules (scripts names) • Applescript or Batch scripts to call FileMaker scripts • And many more
  24. 24. Additional Resources DB Services website article • “Using FileMaker Table, Layout IDs in Scripts and Calculations” BaseElements Article • “BaseElements, Unreferenced and Indirection” Custom Functions • briandunning.com
  25. 25. Q&A

×