on 09-21-2021 9:13 PM
I am trying to hide the tab in a tabstrip dynamically using script in personas. But in script I am getting the below error.
"Property 'selectedTab' does not exist on type 'IGuiComponent'."
if (session.findById("wnd[0]/usr/subSUB_ALL:SAPLCOIH:*/ssubSUB_LEVEL:SAPLCOIH:*/tabsTS_1100/tabp+CUK/ssubSUB_AUFTRAG:SAPLCOIH:1180/ssubCUSTSCR1:SAPLXWOC:0900/tabsTC").selectedTab.id === "wnd[0]/usr/subSUB_ALL:SAPLCOIH:*/ssubSUB_LEVEL:SAPLCOIH:*/tabsTS_1100/tabp+CUK/ssubSUB_AUFTRAG:SAPLCOIH:1180/ssubCUSTSCR1:SAPLXWOC:0900/tabsTC/tabpRAM"){
session.findById("wnd[0]/usr/subSUB_ALL:SAPLCOIH:*/ssubSUB_LEVEL:SAPLCOIH:*/tabsTS_1100/tabp+CUK/ssubSUB_AUFTRAG:SAPLCOIH:1180/ssubCUSTSCR1:SAPLXWOC:0900/tabsTC/tabpFSMSCE").select();
}
The same type of code is working on other tabs. The only difference is this is Tab inside Tab.
Could anyone please let me know what is the issue ?
Hello,
First look to see if the tab is on the screen, then second hide the tab (you can also select or show the tab in the if statement. See my example code below.
if(session.idExists("wnd[0]/usr/tabsTAB_GROUP_10/tabp10\\TAB19"))
{
//session.findById("wnd[0]/usr/tabsTAB_GROUP_10/tabp10\\TAB19").select(); //This selects the tab
//session.findById("wnd[0]/usr/tabsTAB_GROUP_10/tabp10\\TAB19").hide(); //This hides the tab
//session.findById("wnd[0]/usr/tabsTAB_GROUP_10/tabp10\\TAB19").show(); //This show the tab
}
Hope this helps.
Thanks,
Brian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
82 | |
10 | |
10 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.