Hierarchical tree navigation v2

Document created by AndresLP on Sep 16, 2018Last modified by AndresLP on Sep 19, 2018
Version 5Show Document
  • View in full screen mode

(First version here: https://community.filemaker.com/docs/DOC-9419)

 

=====

 

Version 5.4

20 sep / 08

 

The main objective of this version is to make the tree navigation portal work independently of the context (name of the categories TO where the portal is based). This way it can be copied and pasted to any layout related to the categories table without needing to change the category label name calculation and the portal filter calculation.

 

For this to work, the portal object has to be named in the layout, and the name has to be stored in the $$portal_name_tree_navigation global variable defined in the open file script.

 

Also, the sorting of the categories layout by level has been changed to be "dynamic" depending on the object name given to the field in the layout (a global variable stores this name in the open file script). This way the sort script step doesn't need to be changed if the category level field is different, when copying this technique to a different file.

 

Summary of changes:

 

- Open file script: added global variable to store the tree navigation portal object name (screenshot 1)

- Portal tree navigation, label name calculation: adjusted to be based on global variables defined in open file script (screenshot 2)

- Portal tree navigation filter: adjusted to be based on global variables defined in open file script (screenshot 3)

- Open file script: added global variable to store the category level field object name (showing in the categories list layout) (screenshot 4)

- Set JSON Tree Navigation ({JSON}) script: removed "static sort" and added to to object (category level field object name) and sort by field (screenshot 5)

- Portal tree navigation and category button bar label styles (thank you to Javier Durá for this tip): removed hover style from label and added hover style to portal row instead (therefore the hover state stays after clicking the first time in the portal) (screenshot 6)

 

Screenshot 1:

1 -global_var_portal_field_name.png

 

Screenshot 2:

2 - button_label.png

 

Screenshot 3:

3 - portal_filter.png

 

Screenshot 4:

4 - global_var_for_sorting.png

 

Screenshot 5:

5 - Script_step_to_sort.png

 

Screenshot 6:

6 - hover style portal row.png

6 people found this helpful

Outcomes