Proposed Filter Form Library View using promoted columns from InfoPath

  • Monday, February 08, 2010 11:38 AM
     
     
    Hi
    I have a form that requires two levels of approval. This is published to a form library on SharePoint 2007. I only want users to see their own forms as there are monetary values involved. I can achieve this using the view filter “Created by” & “Modified by” = [Me], however the line approvers can only see the forms after they have interacted with them. Once the next person in the workflow edits, they cannot see the form.

    I have tried using columns I promoted where I have stored the username of the approvers and using the [Me] filter, I get a “Filter value is not a valid text string”. I created two more calculated columns in SharePoint making them equal to my InfoPath fields, and I still get the same error.

    Can anyone tell me how I can set a filter so that these line managers can at all times see any forms that have required their approval?

    Many thanks in advance.

    Cheers

    Bill

All Replies

  • Monday, February 08, 2010 2:31 PM
     
     Proposed
    1) Filtering views does not hide the forms nor the data from users, so I don't think this is a valid method.

    2) To truly restrict forms to certain people, then you should use a workflow to change permissions dynamically.  SharePoint Designer can do this easily if you utilize the SPD Custom Activities on Codeplex.  You start with a group of people who are allowed to submit.  Then, upon initial submit, you Delete Item Permission for that group and re-add the "user who created current item."  If all the approvers are allowed to see every form, then you give them access to the form library via another group or groups that do not get stripped.  If only certain approvers are allowed to see, then when you Grant permissions to the user, also grant permissions to the proper approver or group of approvers who is allowed to see it.

    3) If you choose to stick with view filtering, then you have to turn your InfoPath approver values into "people" by creating two more People Picker fields in SharePoint and setting their values with the values of the approvers from the form.  Since these data types cannot be matched, you will have to first promote the fields to SharePoint, then be sure those fields are hidden, then use a SharePoint Designer workflow to take these hidden values and put them into the People Picker fields so that they resolve to "people" and can be filtered by the view.  The value you need to pass to the People Picker fields for the approvers is their email address, which you can retrieve from the UserProfileService per my article: InfoPath - Get user information without writing code (extended)
    SharePoint Architect || My Blog
    • Proposed As Answer by SubramanyamB Tuesday, March 06, 2012 10:09 AM
    •  
  • Monday, February 08, 2010 5:16 PM
     
     
    Hi
    I have a form that requires two levels of approval. This is published to a form library on SharePoint 2007. I only want users to see their own forms as there are monetary values involved. I can achieve this using the view filter “Created by” & “Modified by” = [Me], however the line approvers can only see the forms after they have interacted with them. Once the next person in the workflow edits, they cannot see the form.

    I have tried using columns I promoted where I have stored the username of the approvers and using the [Me] filter, I get a “Filter value is not a valid text string”. I created two more calculated columns in SharePoint making them equal to my InfoPath fields, and I still get the same error.

    Can anyone tell me how I can set a filter so that these line managers can at all times see any forms that have required their approval?

    Many thanks in advance.

    Cheers

    Bill


    hi,
    1)You can get current  login Sharepoint user account.
    http://blogs.microsoft.co.il/blogs/itaysk/archive/2007/04/05/InfoPath-_2D00_-Get-the-current-user-without-writing-code.aspx

    2)For each table set different condition
  • Monday, February 08, 2010 5:54 PM
     
     
    hi,
    1)You can get current  login Sharepoint user account.
    http://blogs.microsoft.co.il/blogs/itaysk/archive/2007/04/05/InfoPath-_2D00_-Get-the-current-user-without-writing-code.aspx

    2)For each table set different condition

    1) I don't think that answers the question.  He already is getting the current user's username with the userName(), which does not require the UserProfileService.  I also already mentioned that he could use that method to get the email address of the user for populating people picker fields, but what you said doesn't mention that.

    2) Each table?  That doesn't affect views or permissions.  He can use User Roles to conditionally format content inside the forms, but that won't change what users see in the columns of the SharePoint library.
    SharePoint Architect || My Blog
  • Tuesday, February 09, 2010 3:29 AM
     
     
    hi,
    1)You can get current  login Sharepoint user account.
    http://blogs.microsoft.co.il/blogs/itaysk/archive/2007/04/05/InfoPath-_2D00_-Get-the-current-user-without-writing-code.aspx

    2)For each table set different condition

    1) I don't think that answers the question.  He already is getting the current user's username with the userName(), which does not require the UserProfileService.  I also already mentioned that he could use that method to get the email address of the user for populating people picker fields, but what you said doesn't mention that.

    2) Each table?  That doesn't affect views or permissions.  He can use User Roles to conditionally format content inside the forms, but that won't change what users see in the columns of the SharePoint library.
    SharePoint Architect || My Blog

    Dear Clayton Cobb:
    Thank your
    directions.
    MY mean is Repeat table can to set fillter condition.
    http://www.dotblogs.com.tw/yc421206/archive/2010/02/07/13507.aspx
  • Tuesday, February 09, 2010 6:53 AM
     
     
    Hi guys

    Thanks a million for the feedback, I will try out your suggestions.

    Cheers
  • Friday, October 22, 2010 1:48 PM
     
     

    Clayton

    Thanks for this as it pointed me in the right direction but I still have an issue in that people can see other forms in the forms library.

    Scenarion is this:-

    - using SharePoint 2010 Enterprise with latest rollups

    - have a forms library that contains infopath forms that are highly sensitive.

    - Want a managers group to have full access - this is OK

    - Want an Employees group to have read access (but only to a specific form(s) in the form library) Not OK

    - Have added workflow as you suggest and used replace permissions on current item then added read access to the employee

    - This appears to work and I check the permissions on the list item which are correct BUT when I log in as the employee I can see all forms in the form library

    - This is because I have granted read access to the library for the emplyees group - which I have to do to let them see the library. I expected that when I set the current item permissions to replace permissions (thus removing the employee group) and then add the individual read access then the user would only see forms that I had given specific access to

    I would appreciate any suggestions you may have to meet these requirements which would appear to be fundamental. I do not want to use views because I agree that this is insecure and could be easily circumvented with a modicum of SharePoint knowledge.

    I am puzzled because I expected that although read access to the library level is given I also expected that when a list item does not give that particular user access then they would not see it because list item properties should overide library permission. What am I missing?

    Appreciate your help on this.

    Peter.

  • Tuesday, March 06, 2012 10:10 AM
     
     
    Thank You...Nice one Clayton