Hi Vishal,
Thanks for the clarification. In that case, if possible, you should add a Key Figure, say RoleCode to represent the role in your BEx Query.
You can then modify your script as follows:
var user = DS_1.getInfo().user; //retrieves user name
DS_1.setFilter("Username", user); //filter DS
var myRole = Math.round(DS_1.getData("Username", {"RoleCode" : user }).value);
if(myRole == 1)
{
panel set invisible and rearrange the required panels.
}
else if(myRole == 3)
{
}.....etc for other roles.
I prefer to use getData() instead of getDataAsString() because you then don't have to worry about regional format settings.
Regards,
Mustafa.