cancel
Showing results for 
Search instead for 
Did you mean: 
Workflow Hero

Hide the form based on permissions in nintex form

Jump to solution

Is it possible to redirect user to different page, when trying to access others forms ?

 

I am trying to achieve a condition 'if employee is not equal to current user and if employee is not part of a SharePoint group(this will be Approvers), should redirect to different page'. Typically no one should have the access, once the form is submitted other than the Approver and current user. Is this possible in nintex forms?

 

Please advice me how to proceed on this? 

0 Kudos
Reply
14 Replies
Workflow Hero

Re: Redirect to different page based on permissions in nintex form

Jump to solution

'if employee is not equal to current user and if employee is not part of a SharePoint group(this will be Approvers), should redirect to different page'

when exactly do you want the redirect to happen?

after form submit? or do you want to forbid access to a item/document once it is submitted?

and where do you want to happen it, list or library?

no one should have the access, once the form is submitted other than the Approver and current user

that's a bit confusing.

everyone authenticated by sharepoint is being treated as 'Current user'.

whom do you mean by current user?

0 Kudos
Reply
Workflow Hero

Re: Redirect to different page based on permissions in nintex form

Jump to solution

Hi Marian,

Thanks for your reply.

For the first set of questions, I have a list with multiple items created by different users. I want to restrict access to users, trying to view/edit other items which are not created by them. So I want the user to redirect to different page or give some error 'you do not have access to this item'. 

For the second set, the current user is the person who logged in when submitting a form. I have a column employee name on the form, So I am checking when the current user is equal to employee or not. 

To be more simple I have added a panel on nintex form and I want to hide the panel when, if the current logged in user is not equal to the employee name on the form or part of a particular SharePoint group.

Hope this clears your questions.

Jagdeesh

0 Kudos
Reply
Workflow Hero

Re: Redirect to different page based on permissions in nintex form

Jump to solution

I want to restrict access to users, trying to view/edit other items which are not created by them. So I want the user to redirect to different page or give some error 'you do not have access to this item'. 

hmm, do you really need a redirect?

exactly that what you ask for can be configured in list settings. wouldn't that be an option for you?

if you configure it this way, users will even not know about existence of other items created by other users.

To be more simple I have added a panel on nintex form and I want to hide the panel when, if the current logged in user is not equal to the employee name on the form or part of a particular SharePoint group.

this can be achieved with formatting rule.

if I got you description right, then formula like following should satisfy it.

or(not(userEquals(Current User,UserNameNamedControl)), not(fn-IsMemberOfGroup("SP.TESTGroup")))

take care of correct configuration of respective references!

0 Kudos
Reply
Workflow Hero

Re: Redirect to different page based on permissions in nintex form

Jump to solution

Hi Marian,

Thank you for taking time and answering my question. Really appreciate it. 

I know there is an option in advanced settings to restrict the users access, but I can not change these settings as it effect the other part of the requirement. This is the reason why I'm looking for work around for the List item security. 

I have changed the references and tested the formatting rule, the conditions in the rule are working separately but not working together in or condition. 

0 Kudos
Reply
Workflow Hero

Re: Redirect to different page based on permissions in nintex form

Jump to solution

ok, I see.

there is no such functionality that would decide (redirect) what form/page to open based on who actually opens it.

if you want to restrict access to certain items to only certain users/group you have to configure item level permissions accordingly. so you will need to break existing/inherited permission and grant permission only to creator and approver.

you can maintain it manually or you can do it from workflow - see Set Item Permission workflow action.

reg. formula to hide panel:

does it throws any error or does it just logically work incorrectly?

I'm not sure whether I correctly understood you description

I want to hide the panel when, if the current logged in user is not equal to the employee name on the form or part of a particular SharePoint group.

I uderstood it as:

panel has to be hidden when (the current logged in user is not equal to the employee in a form control) OR (the current logged in user is not member of a particular SharePoint group)

so the panel should only when current user is  group member AND it is as well select employess in form control.

let me know if my understanding is wrong.

0 Kudos
Reply
Workflow Hero

Re: Redirect to different page based on permissions in nintex form

Jump to solution

Hi Marian,

Yes it is returning an error.

When I tried these conditions separately they are hiding the panel fine with the error in return

Yeah you're right. The panel should be hidden if (the current logged in user is not equal to person who created that form i,e. created by) OR if (the current logged in user is not part of a SharePoint group )

0 Kudos
Reply
Workflow Hero

Re: Redirect to different page based on permissions in nintex form

Jump to solution

it looks like you have some syntactical error on a form and string "fn-IsMemberOfGroup" is not recognized as function name but as math expression.

check whether you do not miss or do not have one more parenthesis, quote, comma, etc. (note the problem need not be in this specific formula)

you might as well look on developer console what errors it reports.

0 Kudos
Reply
Workflow Hero

Re: Redirect to different page based on permissions in nintex form

Jump to solution

Hi Marian,

Can you please tell what I am doing wrong here.

Thanks

0 Kudos
Reply
Workflow Hero

Re: Redirect to different page based on permissions in nintex form

Jump to solution

you have a typo in function name (doubled 'u')

0 Kudos
Reply