I want to put some condition based on the portal view through the widget

vijayakumar kon
Tera Contributor

I want to put some condition based on the portal view- for ex: if I open the sc_cat_item some validaion should be done.

how to get the table= sc_cat_item in the client controller widget

 

[id=sc_cat_item&table=sc_cat_item&sys_id=7e0c6da09766ca50cffc5d800153af69]

2 REPLIES 2

Anirudh Pathak
Mega Sage

Hi @vijayakumar kon ,

If you want fetch the table name from the URL into your client controller you can follow below steps - 

Server side:

data.tableName = $sp.getParameter('table');

Client Controller:

c.tableName = c.data.tableName;
alert(c.tableName);

in the alert getting the value as null