Shadow Columns

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.

 

Status Open
6 2 267
2 Comments
MultiTech
Gold 4
Gold 4

Great minds think alike, is what they say. 

If you look deep enough you'll find that this was suggested by myself many many years ago.

  • This would indeed make so many thing much more streamlined.
    • Instead of copying a formula into the show-if field for all 46 columns
    • I can create this formula-object, and de-ref it's value.
      • Yes I have to put a de-ref value into all 46 columns...
      • but if I want to change something in the formula, it's much easier now.

Great minds my friend. (^_^)

---------------------------------------------------------------------------------------------------------------------------------------------------------

This is also a subtle indictment of the fact that there have been golden suggestions like this available for the picking... for years... and they're all going unnoticed. 😞 

Thank you, thank you for being part of this community, my friend! It truly is like that! I believe it’s not necessary for the AppSheet team to do everything all at once, but just implementing one of these valuable ideas will change the experience for every user here. Without a doubt, Google is battling for supremacy in AI, but I hope that once it wins the battle, it will focus on platforms like this one. I truly believe the world is changing. This phrase sticks with me:

 

"When I learned all the answers, they changed the questions."

 

A big hug, my friend!