Page 1 of 1
Handling Views
Posted: 05 Oct 2017
by vishwasbhat1
Hi,
I have created separate views for each of the approval groups based on my requirement. Now the problem is that one approver is present in both the groups and he must approve the task using one form first and then the other, but currently it opens the same form for him every time. What can be done to avoid this? I don’t have specific conditions to check at which level the form Is at present as well.
Regards
Vishwas
Re: Handling Views
Posted: 05 Oct 2017
by Nikita Kurguzov
Hello, Vishwas!
The issue appears to be quite complex, but let's think about it. I'll need more information from you first, though.
For example, I need to know if you are using SharePoint Online or SharePoint On-Premises. Which one?
What can be done to avoid this? I don’t have specific conditions to check at which level the form Is at present as well.
What do you mean by this? Certainly, there needs to be some condition for when you want the second form to open, it's not just a random 50% chance, is it? Maybe, you can check if the user already approved the task from the first form and then open the second one? If so, that can be added to conditions.
Since you don't want other users to share same functionality, what you can do, is give higher priority(lower number) for the second form, and then add condition to check if user is in the other group as well, then the task will need to be approved first. So, for SharePoint OnPremises, it could be something like:
Code: Select all
IsCurrentUserMemberOfGroup(‘Members’) and [Approved]
That's just an example, though, you'll need to adjust the code for your situation.
Re: Handling Views
Posted: 07 Mar 2019
by wdeffner
Hi,
I tried this approach too:
IsCurrentUserMemberOfGroup(‘BU-Admins’) and [_x0032_ok]
but it failed to validate: "invalid parameter 'BU'
The group "BU-Admins" exists and the field "_x0032_ok" too.
If I validate just "_x0032_ok" it's valid, only "IsCurrentUserMemberOfGroup(‘BU-Admins’)" shows the same error as above.
We use Sharepoint OnPremises.
Thanks a lot,
Wolfgang
Re: Handling Views
Posted: 11 Mar 2019
by AlexZver
Dear Wolfgang,
You have the incorrect single quotes in the expression, please try copy and paste this code:
Code: Select all
IsCurrentUserMemberOfGroup('BU-Admins')
Re: Handling Views
Posted: 11 Mar 2019
by wdeffner
Dear Alex,
thanks a lot. This works now, however we have a problem with the second condition.
We tried:
IsCurrentUserMemberOfGroup('BU-Admins') and not [_x0032_ok]
This works fine in Edit mode. When a new item is created (we would prefer not to use a different New Form)
"not [_x0032_ok]" returns false or at least not true. The default value of the boolean field is "false".
Is there any way to detect if the Form is in "New" mode or to detect if "_x0032_ok" is not yet defined when the New Form is called?
Thanks a lot
Wolfgang
Re: Handling Views
Posted: 13 Mar 2019
by AlexZver
Dear Wolfgang,
You can just reset the New form from a Form Set (don't forget to export it for a backup). In the absence of the New form from the Form Set the New form from a Default Set will be opened.