Hello,
Is there a way to retrieve the tab index for a particular tab on the records view page? Say if I have a related records tab called "Contacts" and originally the tab index was 3 but later on I move the tab to another position, lets say 5. I have to keep maintaining the rbf_showOrHidePageTab(3, false); code to match the new index. Is there a way to retrieve the tab index something like rbf_getPageTabIndex("Tab Name"); that would retrieve the tab index and wouldn't need further changes if the order is changed?
Iram
Hi Iram,
As Satya said we don't have client side API yet to get index of a tab by name. However i find some workaround for you to get rid of this issue for time being, let me know if this helps you
function getTabIndexByName(name){
var tabStripInstance = rbf_getPageKendoTabStripInstance();
if(tabStripInstance){
var currentItems = tabStripInstance.dataSource.view();
if(currentItems){
for(var i=0;i<currentItems.length;i++){
if(name.toLowerCase()===currentItems[i].name.toLowerCase())
return i;
}
}
}
return -1;
}
Thanks,
Vimal.
Hi Iram,
Currently rollbase does not have any client side function to get tab index based on Tab name. Please log enhancement.
Thanks
Satya
Done thanks.
Hi Iram,
As Satya said we don't have client side API yet to get index of a tab by name. However i find some workaround for you to get rid of this issue for time being, let me know if this helps you
function getTabIndexByName(name){
var tabStripInstance = rbf_getPageKendoTabStripInstance();
if(tabStripInstance){
var currentItems = tabStripInstance.dataSource.view();
if(currentItems){
for(var i=0;i<currentItems.length;i++){
if(name.toLowerCase()===currentItems[i].name.toLowerCase())
return i;
}
}
}
return -1;
}
Thanks,
Vimal.
Thanks for the answer Vimal. That function works well. How about getting this function in the list of ClientSide API functions in the next release? :)
Cheers.
Iram
Hi Iram,
I am glad it worked for you. I added a Enhancement to track , Id is : 44110.. Now its not planned for any release. Will update you when we add this API.
Thanks,
Vimal.