Part 4: Building the detail slide panel, and adding a main layout
This is the last article in this series. Part one describes how to add the new buttons to the home page in SeedCode Complete while keeping the nice hover behaviors in place. Part two shows how to create the new slide panels in the sidebar. In part three we create the new table, as well as some scripts to support the search tool in the sidebar. This final post describes the rest of the process, which mainly involves some more scripts, some TOs on the graph, and creating and remapping the new layouts. Step-by-step instructions follow, or check out the video below for a walk-through.
- Duplicate the “ItemGlobals” table in the SeedCodeComplete file and rename the new table “SuppliesGlobals”. Rename and modify fields in the new table, changing the word “Items” to “Supplies” as necessary. IMPORTANT: You must manually create one record in this new table (just go to the new “SuppliesGlobals” layout and hit the New Record button).
- In the “Notes” table in the SeedCodeModel file, duplicate the id_Item field and rename the new one “id_Supply”
- On the relationships graph in the SeedCodeComplete file, duplicate the Items, ItemGlobals, InventoryNotes, ItemGlobalsNotes_Descending and ItemGlobalsNotes_Ascending TOs and move them to the bottom of the graph. Rename and remap the new TOs to the corresponding “Supplies” and “SuppliesGlobals” tables, and connect “Supplies” to “Connector” in the same fashion as the other base-table TOs. See last week’s post for an overview of how the SeedCode Complete graph is set up.
- Duplicate the “SeedCode_Inventory_View” custom menu in the SeedCodeComplete file and rename the new one “SeedCode_Supplies_View”. Remap the “Preview Mode”, “View as Form” and “View as List” menu items therein to the corresponding “Supplies” versions of those scripts. Then duplicate the “Inventory” custom menu set and rename the new one “Supplies”, and replace “SeedCode_Inventory_View” with “SeedCode_Supplies_View”.
- Duplicate the “Inventory” scripts folder and rename the new one “Supplies”. Rename all of the scripts contained therein by changing the word “inventory” or “item” to “supplies”. Also edit these scripts to remap any field references to the corresponding “supplies” version, and rename all variables accordingly as well.
- Duplicate the “Go To Inventory [ ItemID ]” script (in the Navigation folder) and rename the new one “Go To Supplies [ SupplyID ]”
- Duplicate the “Cancel Item Edit Menu” script (in the “Cancel Edit Scripts“ folder) and rename the new one “Cancel Supply Edit Menu”
- Duplicate the “Return Item Note IDs ( ItemID ; Criteria )” script (in the “Filtered Portals” folder in the SeedcodeControl file) and rename the new one “Return Supply Note IDs ( SupplyID ; Criteria )”
- In the “Load Globals At Start Up” script, add “Set Field” steps for the new “Supplies” versions of all of the global fields.
- Add a step to the “Refresh Connector” script to include the “RefreshPortalGlob” field in the Supplies table. You’ll need to run this sub script in a few different places to fix a bug when using FileMaker 14. More details here.
- Duplicate the “Inventory” and “Inventory List” layouts and rename the new ones “Supplies” and “Supplies List”. Select “Supplies” as the menu set for both of these new layouts. Remap all layout-based script triggers to the corresponding “Supplies” versions of those scripts. Remap all buttons, fields, merge fields, field repetitions, conditional formatting and “hide object when” rules appropriately.
- Duplicate and rearrange the buttons in the vertical sidebar as necessary so the new Supplies layout shows a blue “active” button with the paperclip icon on it, and the “Items” button goes to the original Inventory layout. Add a new button on the other module’s main layouts that goes to the new Supplies layout.
That’s it! You now have a functioning new SeedCode Complete module to work with, which can serve virtually any purpose that suits your needs. Please leave a comment if you tackle this process, and let us know if you’d rather have us do it for you.