Page 1 of 2
sharepoint groups
Posted: 18 Jan 2021
by Roo
can you have more than two groups within a edit form?
As in the second option in here:
https://spform.com/groups-and-form-sets ... int-online
ie I have 4 groups that access different versions of the same form (these are sharepoint groups)
Would I have to create 4 content editors, each pointing to a diferent redirect.htm?
Re: sharepoint groups
Posted: 18 Jan 2021
by Nikita Kurguzov
Dear Roo,
Yes, exactly! 4 web parts and 4 redirect.htm - with one note though: it's very important that you don't upload final version of redirect.htm straight away, upload them with some test code, like this:
Code: Select all
<script type="text/javascript">
alert('This is redirect1');
</script>
Then, add all 4 content editors, and test that correct alert is showing for correct group. Finally, replace the files with redirect code to the form, like in the example article.
Otherwise, if you upload them with the redirect code straight away, you won't be able to add more than 1 web part, you'll always be redirected when editing the page.
Re: sharepoint groups
Posted: 18 Jan 2021
by Roo
Ahhh Oh Noooo Too Late I think
is there anyway to reset this?
Sorry!
I managed to fix it though via SPD then re-uploading the default form.
Thanks for your help all working now
Re: sharepoint groups
Posted: 18 Jan 2021
by Nikita Kurguzov
Well, yes, you can replace files at any moment! For example, if you later want to add another group - replace uploaded redirect.htm pages with blank ones, and add a new one, then replace them again with the final code.
Simply put, when you edit the page (as an admin), you automatically see all the web parts, and if they contain redirection code, they will not allow you to edit the page.
Re: sharepoint groups
Posted: 19 Jan 2021
by Roo
Can I ask how do you prioritise a form if a person belongs to more than one group?
ie
Group 1 = abc = Form x
Group 2 = efg = Form y
Group 3 = hia = Form Z
If I wanted Group 3 to be the priority group over the others how would I go about this? So user A would open form Z
Re: sharepoint groups
Posted: 19 Jan 2021
by Nikita Kurguzov
Dear Roo,
Unfortunately, I don't think there is any built in way to add priority... Maybe you can try and add a slight time delay (like a second or two) to groups with less priority? Something like this:
Code: Select all
<script type="text/javascript">
ExecuteOrDelayUntilScriptLoaded(function () {
setTimeout(function(){ fd.openForm('fd_Item_ee433778-833d-4154-a72f-f68dc876fdc5_EditForm.aspx'); }, 2000);
}, 'plumsail.fd.core.js');
</script>
Theoretically, it should work and users will be redirected to forms where there is no delay first.
Re: sharepoint groups
Posted: 28 Jan 2021
by Roo
Thanks Nikita.
That does work on edits from a list. What happens is it opens one straight away then flicks to the correct one. - great
However, (there's always a person that finds a different way of doing things!!) if a user views an Item, then edits it it does not go to the correct form.
Re: sharepoint groups
Posted: 28 Jan 2021
by Nikita Kurguzov
Interesting! Does it still open the same page though?
Re: sharepoint groups
Posted: 28 Jan 2021
by Roo
Yes, but it seems to default to wrong one, in the case of the person concerned
Re: sharepoint groups
Posted: 02 Feb 2021
by Nikita Kurguzov
Dear Roo,
Wasn't able to reproduce it. Does it work fine with just one form set? It does redirect me to a correct set, even if go from Display form.
- DPDvs5Pf3r.gif (150.64 KiB) Viewed 8349 times