InfoPath and what should be a simple workflow - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

InfoPath and what should be a simple workflow

Last post 05-03-2013 01:13 PM by Den12. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 04-15-2013 08:12 PM

    InfoPath and what should be a simple workflow

    I have a single forms library. I have a single infopath form template. Over 1,800 users have used this forms library to create new items in the forms library.

    The infopath form itself has only 3 fields on it:

    * Manager Name (form initiator, aka created by)

    * Employee Name

    * Performance Evaluation Notes

    Manager name is auto-populated. All fields are required. User types in their performance evaluation, and clicks submit, which saves it back to the sharepoint list into the forms library, as it should. It works great.

    However, sometimes employees get new managers (manager leaves, employee gets promotion, company re-organization). Managers have requested an ability to re-assign an employee to the new manager.

    I want to use the Copy List Item action in SharePoint Designer (or similar) to takle this. If there is a way to do this from within InfoPath, that could work, too. The copied item must:

    1.)  be created in the same Forms Library as the original

    2.) must have the created by field be the new manager that the old manager selected.

    Without testing this approach, I believe the problem is going to be that the created by field will be the OLD manager's name. That's a huge problem, and will not work. The reason that will not work is that the forms library default views and other views use the 'created by' field to filter back ONLY results that they created.

    Looking for suggestions to this problem. If I must use Visual Studio instead, I'd need to know step-by-step how to do that, or possibly pay someone to do this for me QUICKLY.

    Thanks for reading - please help!

    Note: This is an admin-approved template with some very simple code behind which copies the value of what "notes" were entered, and concatenates them to a notes history field so that when a manager re-opens the form, they can add more notes to the same record. Hence, the submit button does a save over the old record.

  • 04-19-2013 03:52 PM In reply to

    Re: InfoPath and what should be a simple workflow

     So - the employee's form is the same XML for the entirety of the employee's time - no matter the manager. Just changing the Manager field isn't going to do it - Created By is special in that it is a person type - so you can filter by things that belong just to the current user. I do not believe there is a way to change the created by field - the new manager would have to have submitted the form. Can you leverage the Manager field at all for your views?

    Hilary Stoupa

  • 05-03-2013 01:13 PM In reply to

    • Den12
    • Top 200 Contributor
    • Joined on 01-15-2013
    • Posts 57

    Re: InfoPath and what should be a simple workflow

    How about using Modified By for the view filtering. It always exists as is CreatedBy, but preserves the last person who edited it and allows being updated depending on who wrote the last review.

    Combine that with permissions to a Manager group, which is the only one allowed Contribute or higher permissions, so you ensure that only valid managers are part of the group and a ModifiedBy is always a person, who at time of modification was a member of the group. Everyone else has lower permissions, if any.

    If you have a SPD workflow with "impersonaltion step", then ModifiedBy would be either the system account or the person who published the workflow. Thus you should avoid using impersonation step or if you have to delegate a permission for some operation, then make the last step, which modifies a field be a regular step.

    --

    You could also use a combination of Create/Copy List Item and Delete Item, with an impersonation step, if the person running/saving the update does not have delete permissions.

    Thus your new CreatedBy is the last reviewer, you copied the actual form data to a new entry and deleted the original. Now you have the new manager as created by. Hope there are no reference links , by ID to the original items it this case.

    As mentioned above, Use a non-impersonation step to create/copy the form/item (get correct createdBy), then use impersonation to delete the original item. depending on other requirements you may need additional non-impersonation step, to finish all intended modifications.

Page 1 of 1 (3 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.