I've been weighing the pros and cons of creating virtual columns with formulas that I then reference in showIf, validIf, and other properties. I've noticed that creating a virtual column as a reusable programming object is very helpful in terms of maintenance and tracking significant changes between saves. By changing the formula in the virtual column, the calculation is modified wherever it's used without having to manually update each instance. However, as the number of virtual columns increases, the calculation for each sync becomes enormous, which can become tedious from a user experience standpoint, especially when there's a lot of data to load (though this might not be as big of an issue for personal apps). To find a middle ground, I came up with the idea of a column type that's neither virtual nor real (an object column). Imagine it like working in Excel, where you create a formula and then reference it instead of typing it out multiple times. Having reusable objects would be great for maintaining our apps without impacting sync performance.
How do I think this could be implemented?
I imagine that, instead of writing a formula in the ShowIf, ValidIf, etc., field, we could reference the formulas contained in other fields within their properties. For example, let's imagine a case where Column 1 has a ShowIf, and Column 2 has another ShowIf that depends on the first one. Instead of duplicating the formula, we could create an AND() with the ShowIf from the first one without needing to rewrite the formula, simply by referencing the first one's ShowIf. That way, we would have a precomputed expression instead of two separate calculations. This would apply to everything. For example the next expression:
AND(
showif.column1,
expression
)
Or like we have a "user settings" we could have an "objects settings" that would allow us to configure system columns that we can access.
... View more