Redirect from edit to display based on group and form value

rss

Posted by Jimmy Daresta - Oct 14 ’16 at 07:51

So I have workflow that can be invoked manually to copy an item to new one. In the business process when a user submits a form for approval they cannot edit the form. However, for them to invoke the copy process they need edit ability for an item. I know I can go through and do a bunch of javascript programming to make the edit form read only and hide stuff, but this is a lot of work especially for the ribbon. Is there a way simply that if I left the user with edit ability that in the javascript when a approved field has a value and they are in a certain group I redirect them to the display only form?

  • Dmitry Kozlov
    Dmitry Kozlov
    Admin
    Member for: 5 years 10 months 28 days
    #1 by Dmitry Kozlov Oct 17 ’16 at 04:51

    Hi Jimmy,

    You can create a separate group of forms, switch all fields into display mode, and configure the group's rule this way:

    [Status] = 'Waiting for approval'

    Where Status is a field containing the appropriate status of an item.

  • Jimmy Daresta
    Jimmy Daresta
    Member
    Member for: 3 years 16 days
    #2 by Jimmy Daresta Oct 17 ’16 at 07:05

    I have separate forms for the groups for all three modes. The issue I have is that after its hit a certain status I want when one group comes to edit that it goes in complete display mode. I know with javascript I can do and do this, but I would rather just send them to the display page instead. If I can create another "edit page" and get the group to that when the status becomes what it needs to be to invoke that that would be great.

  • Dmitry Kozlov
    Dmitry Kozlov
    Admin
    Member for: 5 years 10 months 28 days
    #3 by Dmitry Kozlov Oct 18 ’16 at 04:07

    [#2]: The ony option I see here is redirecting users from a certain group to a display form with JavaScript (fd.openForm):

    http://spform.com/documentation/js/manager

  • Jimmy Daresta
    Jimmy Daresta
    Member
    Member for: 3 years 16 days
    #4 by Jimmy Daresta Oct 19 ’16 at 01:26

    Well let me ask you this. Is there a way in the actual forms via SPD to do something there? Like test for a value and then redirect? Something like this? Would changes get wiped out if one edited the form again via the SPForms Designer? Is there the idea we could do some csharp or such type coding in the designer someday for things like this?

     

    https://www.youtube.com/watch?v=_s5ZENwxYJs

     

  • Dmitry Kozlov
    Dmitry Kozlov
    Admin
    Member for: 5 years 10 months 28 days
    #5 by Dmitry Kozlov Oct 20 ’16 at 04:24

    [#4]: You can check a field value with JavaScript and redirect a user to another form conditionally:

    http://formsdesigner.blogspot.com/2014/07/how-to-conditionally-hide-disable-make.html

    Also, you can insert XSLT-code into your form with the help of HTML-control of Forms Designer. Just switch CDATA property in False.

Displaying 1 to 5 of 5 messages