Hello! This has been suggested at least once before (link below) but I wasn’t able to add anything to the post. My app must have a thousand rules (record/display/email/page), and while some rules are self-explanatory, I can’t remember the purpose of others. Recently I made the mistake of deleting one of these “mystery rules,” only to discover days later that my app was broken and needed a few hours of fixing. Fields have descriptions…rules need something like this too.
If not a text/notes field for each rule (which would admittedly make things crowded), then rules at least need a unique identifier. Rule titles would allow me to have my own Word doc with notes on each rule. The rule numbers (i.e. Record Rule #7) are not enough because #7 will eventually get reordered (and become “Record Rule #4” or whatever).
And if titles are too much to ask, then something as basic as an auto-increment value for each rule would suffice. Although I’m not sure how something like auto-increment would work for existing rules…
Anyway y’all get the idea. If not a notes field, we just need a static identifier for rules so that we can take our own notes. FWIW the link below has a few other great ideas.
We manage several complex applications built on Knack Classic, some of which have been running for years and contain hundreds of Record Rules, Display Rules, Email Rules, and Page Rules.
As applications grow, understanding the purpose of each rule and its dependencies becomes increasingly difficult, especially when multiple developers are involved.
Adding titles and notes to individual rules would make maintenance much easier and reduce the risk of accidentally breaking existing functionality.
I would also suggest two additional improvements:
Permanent rule IDs, independent of their position or execution order.
Exporting rules to CSV or JSON, including their IDs, titles, descriptions, conditions, and actions.
This would allow developers to document, review, and audit business logic outside Knack, identify dependencies, and assess the impact of changes before modifying or deleting rules.
For those of us maintaining large Classic applications, these improvements would be extremely valuable.
Since I use the KTL, I type all the notes I need about the view in the Description field, using the _notes keyword. It can be related to the general intention of the view, some complex record rules, or the whole page.
Here are a few examples:
_notes=[See wip.js code: COMPOUND_TERMINAL_VIEW for email automation]
_notes=[The intention here is to keep a history of all schedule logs that have been completed, by stage. That’s when the Done field_2603 is being quick toggled by an operator in a dashboard. The code takes care of doing this by copying records from the top view to the bottom view in this page. Search for the two view IDs to see how it works.]
_notes=[Source to be copied from to Schedule History grid]
_notes=[This comes from a request from Jane Doe: she needs to receive an email when a VAC or C-FORM lot has been scheduled so they can prepare the Release Notes for that lot.]
_notes=[Trk field removed as requested by L.H. - see email on Oct 9 2024.]
As you can see, it would be next to impossible to reverse engineer what I did, even if it’s just a few months later !!!
I’ve gone ahead and added the ability for Knavigator to separate out record rules as their own entity. You can search and add notes to record rules. Each record rule has a unique ID which does not change.