cancel
Showing results for 
Search instead for 
Did you mean: 

Hiding Controls with Personas 2.0

shane_kelly2
Participant
0 Kudos

I'm trying to hide a label and a field using a script.

I find if the label/field I'm trying to hide look like this :

ses[0]/wnd[0]/tbar[1]/btn[35]

or

Personas/6fcfbfc5-966f-44b6-9420-e51dee6890c5

the script works perfectly and the label/field hides with no problems.

however if the object I'm trying to hide looks like this -

ses[0]/wnd[0]/usrUSRAREA/subcntSCREENSAPLWB2A0251/tabstripSTRIPT_AH_HEAD/tabpageHEADER_SUBSAPLWB2A0145/subcntTRADESAPLWB2B_SCREEN_HANDLING0101/subcntCUSTOMER_DATASAPLWB2B_SCREEN_HANDLING8001/subcntCUSTOMER_DATASAPLZRAC_GTM0100/frameBOX2/lblWBHKPLANGEWINN

then nothing happens.

What am I missing?

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

I can see you are trying to hide a control on a Tab dynamically using script. It looks like that you should first use script to select the right tab, then do the hiding. When handling tabs, the screen actually can be different. Make sure you are dealing with the right tab UI first.

Hope this helps.

Dong Zhu

shane_kelly2
Participant
0 Kudos

Thanks Dong - I'll try that too.  Although other fields on that same tab are hiding ok using the script

chinthan_yajamaan
Active Contributor
0 Kudos

Can you provide more details like what transaction and field you are trying to hide and did you check if control id changes for it?

shane_kelly2
Participant
0 Kudos

still can't get this to work...

tamas_hoznek
Product and Topic Expert
Product and Topic Expert
0 Kudos

I guess you can hide that control via the editor (with the Hide button instead of a script action), right?

As long as that control ID is correct (i.e. not truncated or otherwise not matching the object you want to hide), this should work - unless there is a bug,

shane_kelly2
Participant
0 Kudos

I'm trying to dynamically hide it using a button if a condition is met - not hide it always using the hide button.

The hide button works - no problem

Script - doesn't work.