(2) Named Canvas Variables
You can write any formulas into the canvas and then give those a Name - that named formula can then be referenced anywhere within your docs at any time and can utilize its ouput. I normally keep a dedicated hidden page in all my docs just for this purpose.
I can explain one use case around that very thing in this video where I create a named variable titled giveAccess which then allows the doc creator to filter tables conditionally and easily based on who is logged into the doc.