cancel
Showing results for 
Search instead for 
Did you mean: 

Hide label using Javascript or FormCalc on the all pages

umberto_panico
Participant
0 Kudos

Hi to All,

I have the following problem:

In my layout I have:

BUKRS (bind to my table-BUKRS)

Label_01 (fixed)

Now, if BUKRS == 'IT01' then Label_01 should be hidden.

In ready:form event:


data.HEADER.ELEMENTS.BUKRS::ready:form - (Javascript)
if (data.HEADER.ELEMENTS.BUKRS.rawValue == 'IT01') {
data.HEADER.ELEMENTS.Label_01.presence = "hidden";
}

This code work ONLY on first page, from second page the script does't work.

I'm confused.

Please help me!

Best Regards,

Umberto

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

try this in the LAYOUT ready event, Run at CLIENT AND SERVER. You have mentioned 'IT01' and this should be "IT01".

if (data.HEADER.ELEMENTS.BUKRS.rawValue == "IT01") {

data.HEADER.ELEMENTS.Label_01.presence = "hidden";

}

umberto_panico
Participant
0 Kudos

Hi,

the problem was the referr...

"THIS..." should be used and not "DATA..."

Thanks to All.

Regards,

Umberto

Former Member
0 Kudos

Hi,

is the label on the master page.

i guess the script is trigerring only for the one time.

for the other pages the script is not getting trigerred.

as the initial value of bukrs si getting filled once.

umberto_panico
Participant
0 Kudos

Hi,

the label is not present in masterpage but in bodypage.

Regards,

Umberto

Former Member
0 Kudos

The problem seems that you have applied code in the wrong event. Try the same code in other events like layoutReady event or any other from the list.

umberto_panico
Participant
0 Kudos

Hi,

I've just tried... doesn't work..

Other solutions?

Thanks & Regards,

Umberto