linking formulas along with categories

8.09K viewsFormulas and Functions
0

It occurred to me that the ability to create categories in one matrix and then link them into another matrix can act a little like ‘Classes’ in object oriented programming. You have your structure (Categories and Items/Groups) and methods (Formulas). The ability to have default data that the linked categories can reference if they choose (via inter-matrix formulas) is also handy, but it is good that it is kept separate unless explicitly linked.

Once you’ve defined your categories and their rules, you could combine them in separate matrices to create a compound ‘object’, which inherits the structure you link in. The structure of a given linked category will reflect updates to any of the copies in the various matrices that use it. One that you are arbitrarily treating as a master copy will update all other instances. However, the same is not true of formulas.

When a category is linked, the formulas do not come with it, and must be copied on the clipboard. If changes are made in either the ‘original’ or the ‘copy’ (*) they are not reflected in the other instances.

While I believe there will be situations where the model will benefit from the ability to change the formulas that operate on a linked category (sort of like overloading an object method), there will also be times when a linked formula will allow you to reduce the number of places that you have to replicate changes.

What if the formulas that are defined in a category could be either linked or copied and the default action were based on an application default. Formulas that are linked would show the same Link icon as categories next to their checkbox or summation icon. The user would also need a way to break a link (copy) or re-establish a link (replace).

Attached (hopefully) is a model with helps illustrate the behavior of formulas. (Just delete the Quarters category from Sheet1 and Sheet2, and then link Quarters to them again from clsQuarters matrix.)

Steve

* – the quotes are to acknowledge that all linked instances of categories are treated as co-equal by QM

Attachments

classes.model
0

SteveB

I had seen that popup on the Category link, but hadn’t thought about it. Yes, a popup on the formula (each) would do nicely for quick access. The only gotcha is that the tooltip disappears after about 5 seconds. This could make it frustrating to read through.

Regarding the ability to pull out the formulas, Yes, there would be the problem of separating the behavior from the structure, forcing the latter to be reconstituted.
However….

You have touched on something that needs to be thrown into the ring for discussion, even though it will probably drive the Quantrix folks nuts. 😉
If we truly believe that our categories and formulas encapsulate logical building blocks, from which we will construct applications, then we will be forced to confront the possibility of storing them outside of our models and a) importing or b) linking the physical files.
Since you also mentioned industry-specific web-sites, you may already have in mind XML files that a model file could reference using a URL. Then you could take advantage of live updates to industry-standard calculations. (It is fortunate Quantrix has already worked out an XML-based format for Saves.)
Of course, in keeping with Quantrix’s stated desire to allow the user to keep everything on their desktop, the user would also need the option to import the file from the URL, rather than just linking to it.

Steve S

You are viewing 1 out of 14 answers, click here to view all answers.

Latest Questions