Use calculated columns as separators for trees?

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
JonP
Posts: 287
Joined: Thu Feb 16, 2017 9:49 pm
Location: United States

Use calculated columns as separators for trees?

Post by JonP »

Ever since I started playing with the tree widget, I've been frustrated by the fact that there is no way to include a separator between attributes, making multiple attributes per level an unrealistic option. But then I noticed with the new dynamically calculated columns feature that there is an option to output the result as plain text. What if you could add a separator that way? I tried it 2 ways...

1) Attribute1 provided normally with second attribute as a calculated column: '| ' + BO.Attribute2.
2) Both attributes provided normally with calculated column as '|' in between attributes.

No luck. Any ideas?
v8.1 on Windows 10 / MySQL 5.6 (local), v8.1 on Windows Server 2016 / MySQL 5.6 (server)
JonP
Posts: 287
Joined: Thu Feb 16, 2017 9:49 pm
Location: United States

Re: Use calculated columns as separators for trees?

Post by JonP »

WARNING: UGLY HACK AHEAD!

Have your air sickness bags at the ready...

I decided to create a fake plain text attribute in the SystemSettings BO called FauxSeparator with a character count of 1 and an initial value of |. It didn't work because you can't reference SystemSettings in either a calculated column or a shortcut.

So I created a fake plain text attribute in Account (uppermost parent BO) called WTF_Separator with the same settings as above and created a shortcut to it. That worked. You would need to create a different shortcut for each separator at each level of the tree.
v8.1 on Windows 10 / MySQL 5.6 (local), v8.1 on Windows Server 2016 / MySQL 5.6 (server)
tford
Posts: 4238
Joined: Sat Mar 10, 2007 6:44 pm

Re: Use calculated columns as separators for trees?

Post by tford »

WTF_Separator
Love it!
Tom - V8.8 build 3137 - MySql / PostGres
Jaymer
Posts: 2456
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

Re: Use calculated columns as separators for trees?

Post by Jaymer »

WTF_Separator

You can tell John was frustrated by that point!
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.

Jaymer
Aware Programming & Consulting - Tampa FL
Post Reply