Thanks for the post. Over the years I have ended up changing my formatting many times and I fear it might never end. I keep running into reasons to not like the old method or finding a fancy new method. Time will tell if I finely settle but I expect not.
My current code is looking for a balance of functionality and readability. Below is a sample of how I would format. The lower case variables is a new method that I have just started to adopt to help distinguish them from fields and functions.
Let([
coCategory = Assets::Category
; compSoft = "Software¶Workstations¶Un-Used Computers¶Servers"
; offEquip = "Camera¶Printers¶Hardware¶Monitors"
; furn = "Furniture"
; cityCategory = Case (
not IsEmpty ( FilterValues ( compSoft ; coCategory ) );
"Computer & Software" ;
not IsEmpty ( FilterValues ( offEquip ; coCategory ) ) ;
"Office Equipment";
not IsEmpty ( FilterValues ( furn ; coCategory ) ) ;
"Furniture, Fixtures & Leaseholds";
"Error: Missing Category"
)
];
cityCategory
)
I like the ; in front of the let variables for easy copy paste like other have said above and for me it is easier to read but I make sure the ; are on the first line. If you put them closer to the code I find that also hard to read. I do not put the ; in front with case statements as this dose not help with copy paste.