grooxy
13th October 2016, 16:23
It seems that multiple line Label descriptions don't work with function tt.Label.desc(). Or is there a hidden Parameter or procedure?

e.g.

domain tcmcs.str50 V1,V2,V3,lab.desc

V1 = tt.label.desc("tftffam.anbr",ttadv.cont.general,lab.desc) | Works fine (Asset Number)
V2 = tt.label.desc("tftffams8477.08",ttadv.cont.general,lab.desc) | Works fine (Prior Year NBV)
V3 = tt.label.desc("tftffams8477.1",ttadv.cont.general,lab.desc) | Doesn't work (Nothing is returned, and also lab.desc isn't filled. It should be 'Asset Cost%Beg. of Year'

rahul ingale
14th October 2016, 09:01
use tt.label.desc.by.lang (string label_code(19), string language(1) [, long label_width] [, long label_height] [, domain ttadv.cont label_context])

TIV level 1501 or higher

grooxy
14th October 2016, 12:12
I already tried this, but this is not much better:

V3 = tt.label.desc.by.lang("tftffams8477.01","2") - Nothing was returned

Helps a little bit, when more parameters are entered. -

V4 = tt.label.desc.by.lang("tftffams8477.01","2",12,2,ttadv.cont.general)

- Only first line was returned 'Asset Cost', the second line 'Beg. of Year' is lost.

I need the whole string 'Asset Cost%Beg. of Year'
(This Label has Height 2, Length 12)

I also tried different Values for Height and Length, but nothing helped

bhushanchanda
17th October 2016, 11:28
Hi,

Are you sure the following is not working ?

string lab(1000)

lab = tt.label.desc.by.lang("tftffams8477.01","2",12,2,ttadv.cont.general)

If not, you might need to check if you have the latest supporting TIV for this function as there have been some enhancements made.

NPRao
17th October 2016, 17:58
If not, you might need to check if you have the latest supporting TIV for this function as there have been some enhancements made.
As Bhushan mentioned -

Return values
Label description of specified label code in specified language.

Context
This function is implemented in the 4GL Tools and can be used in all script types.

Remarks
This function is available from TIV level 1501.

grooxy
17th October 2016, 18:01
Hi

Indeed, this works:

string lab(1000)
lab = tt.label.desc.by.lang("tftffams8477.01","2",12,2,ttadv.cont.general)

The content of lab is: "Asset Cost\nBeg. of Year"

First problem was using old TIV
Second was, that I concatenated it with other strings and wrote it into a Report Form field, and this truncated it obviously on '\n'.

Solution is to replace '\n' before processing.

It's fixed, Thank you very much !