SeedCodeHierarchy

Using Example Three

How do creating and deleting items work?

The "new item" and "delete selected" buttons above the hierarchy in Example Three let you add new records to your data tables. Read more about this here: creating new items.

How can I show details of my items beside the hierarchy?

Example Three of SeedCode Hierarchy shows how you can use the hierarchy to reveal details of an item right beside the hierarchy. To get this working in your file you have to set up a couple more relationships in addition to those we set up when doing a basic integration. The instructions below assume you've completed the basic integration.

If you open the Relationship Graph in SeedCodeHierarchy.fp7 (File / Manage / Database... and the click on "Relationships") you'll see a grey horizontal divider which reads "Below here only required for the right side of the screen in Example Number Three." You'll need to add the table occurrences below this to your graph before you can paste the Example Three layout into your file. Here's how:

1. In your file, duplicate the table occurrences HierarchyPortalLevel1, 2, 3, etc.and rename them inserting "SelectedItem" into the name between "Portal and "Level". Make sure these table occurrences (TOs) are named exactly as they are here:

2. Connect these TOs to HierarchyPortal using "SelectedItemIDGlob" on the HierarchyPortal side in each case, and connecting this to the primary key (the unique ID) in each of your "...SelectedItem..." TOs, like this:

3. Now that the relationships are in place, you can copy the whole Example Three layout, and paste it into your file. After pasting it in you'll need to edit the right side of this layout to make sure that you're display the proper fields from your data tables. To begin editing, enter layout mode and you'll see some orange text in the right half of the screen (these are comments that only appear in layout mode).

Find the text that begins "There is an invisible tab here..."...

...select it, and nudge it upward until it is out of the way, revealing the tab controller beneath it:

Once these tabs are revealed, you can click on the tabs for each level and edit them as you see fit. You'll at least have to repoint the fields there so they show the appropriate fields from your table. Double click on each field to change it, making sure to keep the field from the same level TO it is already associated with:

Finally, if you want to be able to create new items in your data tables using the "new item" button in our example, make sure that one of the fields one tab has the object name "Level...FirstField" where "..." is the level of the tab you're on. You can see this in our layout here:

And here are just a few things to keep in mind:

Don't remove "Default" tab or move the orange text on it.
Don't remove the "None Selected" tab
You can remove level tabs if you don't need a particular level.
Take care when resizing tabs to keep all objects within the tab
And put the invisible tab with the orange copy back down to cover the tab controls when you're finished.
(855) SEEDCODE
[email protected]
Follow us: