0

How to build a hierarchical menu system in Progress ABL

So I am trying to build a menu system using a hierarchical design with folders being created by the user to build their own menus. All I need is to figure out is how to cycle through the data using Progress ABL code level by level without missing any pieces. In the end, I just need to put the data into temp tables so that I can build out a long JSON string to pass to my Javascript to a Kendo UI TreeView. Any ideas as to how the logic would look to build something like this? Here is what I currently have and some of my initial thoughts: /* The database consists of menu_cat (menu folder) and menu_cat_items (menu item such as pdf, image, html page, etc.) (will include menu_cat_employee and menu_cat_item_employee for each employee to build their own menus as well, but for now focusing on just displaying a generic menu). The top level of the menu is when menu_cat.ParentCategoryID = 0. No menu_cat_item can be in that top level. Here are the temp table that represent the database tables DEFINE TEMP-TABLE ttMENUCategoryTask FIELD CategoryID AS INTEGER FIELD CategoryName like menu_cat.CategoryName field char01 as character field char02 as character field char03 as character field Log01 as log field Log02 as log field Int01 as integer field Int02 as integer field Date01 as date FIELD ParentCategoryID AS integer INDEX IdxCategoryIDCategoryID. /* Menu Category Items tasks */ DEFINE TEMP-TABLE ttMENUCategoryItemsTask FIELD CategoryItemID AS INTEGER FIELD CategoryItemName AS CHARACTER FIELD CategoryItemType AS CHARACTER FIELD CategoryID AS INTEGER field char01 as character /* Category Item Description */ field char02 as character /* Category Item Group */ field char03 as character field Log01 as log

15th Jan 2019, 9:19 PM
jake sarosiek
jake sarosiek - avatar
1 Odpowiedź
0
FOR EACH ... Look for Bill Of Material algorithms OS-DIR
4th Jul 2020, 1:26 PM
Grayham Bailey
Grayham Bailey  - avatar