Form Views

DimaageeJ
Tera Contributor

Hi, 

 

So I am creating a change request application and I have 3 types of users (requester/Aprrover and fullfiller). I want each user to have a different type of form. I have created different form views in the studio, i want to know how can i assign the form view to that specific user. 

 

Thanks

 

4 REPLIES 4

Abhishek_Thakur
Mega Sage

Hello @DimaageeJ .

 

You can refer the below screenshot in order to achieve your requirement.Solution.png

 

Please accept my solution and give thumbs up, if it helps you.

PA001
Mega Sage

Hello,

 

Can you utilize the view rule and assign views based on the roles as per requirement?

 

Mark the comment as a correct answer if this answers your question.

Thanks,

 

Abhishek_Thakur
Mega Sage

Hello @DimaageeJ ,

 

If you want to assign it based on role then you can refer the below screenshot.

Solution 1.png

 

Please accept my solution and give thumbs up, if it helps you.

Nishant_Kumar
Tera Guru

Hi @DimaageeJ ,

 

You would need to create a view rule to enforce views based on logged-in users. Assuming you already have the views created. Goto System UI --> View Rules----> Create New 

 

Copy the code below after checking advanced option and replace view and roles based on your requirement.

(function overrideView(view, is_list) {

answer = null; // set the new view to answer

var isRequester = gs.hasRole('Requester_role');
var isApprover = gs.hasRole('approver_role');
var isFullfiller = gs.hasRole('fulfiller_role');

if (isRequester == true)
{
answer = "requester_view"; // replace with the view name you have for requestor
}else if (isApprover == true)
{
answer = "approver_view"; // replace with the view name you have approver
} else if (isFullfiller == true)
{
answer = "fulfiller_view"; // replace with the view name you have fulfiller
}

})(view, is_list);

 

Please see screenshot below:-

Nishant_Kumar_0-1716972298563.png

 

If the solution helps, please mark it correct and like it.

Thankyou.