Skip to main content
Announcements
July 15, NEW Customer Portal: Initial launch will improve how you submit Support Cases. IMPORTANT DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
joris_lansdaal
Creator
Creator

Text part behavior of a dual dimension in a table

Hi all,

I've used a Dual function to indicate the strategic importance of e.g a channel. Works like a charm, however.....

When a label is too long I would like to see it 'shortened' like the standard way tex is handled in table.

Text.PNG

However, when I use the 'Dual' dimension the label that's too long is not readible anymore...at all.

Dual.PNG

Any suggestions on how to tackle this challenge?

regards Joris

1 Solution

Accepted Solutions
marcus_sommer

The simplest way to sort a certain field is to load the fieldvalues in your wished order with a dummy-table. Something like this:

SortOrderFormyField:

load * inline [

myField

x

a

e

];

Now you could load your real data of myField which will be sorted like the already loaded order of values and after that you could drop the dummy-table:

drop tables SortOrderFormyField;

and then you could choose the sort-option for load order. Especially if you have large amounts of data is this way more performant then dual-fields or any sort-expressions within the gui.

- Marcus

View solution in original post

5 Replies
nilapril2010
Contributor III
Contributor III

Hi,

Dual function should not be used here as one output of Dual function is string and another is numeric value.

You need to use If condition. Check length of sting. If it crosses the limit then use the shortened form of it.

Like If(Len(Your Dimension string)>Limit,Shortened Form of Dimension, Normal Form of Dimension)

Regards

Nilanjan

marcus_sommer

I think this is a "feature" - whereby where do you create these dual() - within the script or within the gui? A workaround could be to query the lenght of the dimension value with something like:

if(len([Channel ABND])>15, left([Channel ABND]), 15), [Channel ABND]))

or maybe simpler:

mid([Channel ABND]), 1, 15)

- Marcus

joris_lansdaal
Creator
Creator
Author

I found out that:

"Note! If a dual value is too large to fit in a field object, it will be represented by ## and not truncated with ... like a string."

Any ideas on how to sort Text dimensions in a specific order?

I could use the load order but that will be tricky in maintaince.

joris_lansdaal
Creator
Creator
Author

In the Script

marcus_sommer

The simplest way to sort a certain field is to load the fieldvalues in your wished order with a dummy-table. Something like this:

SortOrderFormyField:

load * inline [

myField

x

a

e

];

Now you could load your real data of myField which will be sorted like the already loaded order of values and after that you could drop the dummy-table:

drop tables SortOrderFormyField;

and then you could choose the sort-option for load order. Especially if you have large amounts of data is this way more performant then dual-fields or any sort-expressions within the gui.

- Marcus