Filter SharePoint Form Library by [My Email Address] = field on form - InfoPath Dev
in

InfoPath Dev

Filter SharePoint Form Library by [My Email Address] = field on form

Last post 05-14-2007 01:43 AM by ahardin. 8 replies.
Page 1 of 1 (9 items)
Sort Posts: Previous Next
  • 05-09-2007 06:11 AM

    • ahardin
    • Top 200 Contributor
    • Joined on 02-13-2006
    • United Kingdom
    • Posts 55

    Filter SharePoint Form Library by [My Email Address] = field on form

    Put simply I am designing an expense process where the originator specifies the email address of their authoriser as i do not want to mess about with permissions I would like to all each person only 2 views, one where they originate the form and two where they need to authorise the form.

     I need the filter to say something like

     Where Originator = [Me]

    OR

    Where Authorisers_Email_Address = [My Email Address]

    Has anyone got any ideas?

    Many thanks

    Adam

    I'm from WALES
    [email protected]
  • 05-09-2007 08:56 AM In reply to

    Re: Filter SharePoint Form Library by [My Email Address] = field on form

    Hey Adam,

    We do something kind of similar for our tutorials, we use the expense form sample that comes with InfoPath and improve it with our Active Directory Service.  It has a submit that emails the manager (approver) the form.  We also use a version internally for our expense reports.

    I am not sure you have looked at our Database Accelerator product but included with that is the Getting Started documentation which would get you pretty close.

    Its a free download and it can really speed up your form implementations and handling.  http://www.qdabra.com/proddetail.asp?prod=QDBXL1

    That is where I would start and I bet you could have something ready for use in a couple hours.

    Filed under:
  • 05-10-2007 12:10 AM In reply to

    • ahardin
    • Top 200 Contributor
    • Joined on 02-13-2006
    • United Kingdom
    • Posts 55

    Re: Filter SharePoint Form Library by [My Email Address] = field on form

    Clay

    Am already running an AD Service which is how i can find out the current users name/email etc.  I just need to know how to represent [My Email Address] in a filter.

    Currently I can provide one filtered list for each expense form that is originated by [Me], simple.  My second filter needs to say show forms where [My Email Address] is equal to a field on my Infopath Form called '@Authorisers_Email_Address'.  As this data has already been submitted to Sharepoint I am hoping to use it so that I can have a second filter called 'To Authorise'

    It sounds simple but I am not overly familiar with SharePoint and do not know how to proceed.

    Cheers Adam

    I'm from WALES
    [email protected]
  • 05-10-2007 12:25 AM In reply to

    Re: Filter SharePoint Form Library by [My Email Address] = field on form

    OK, got it.

    So you are promoting this field to SharePoint? When you set up the submit to SharePoint data connection you can pick fields that will be added to your SharePoint list data.  Then if you use Modify Settings and Columns and Create a New View you should be able to see this authorizers field listed.  So then you can make a custom view which only shows the columns you want including this field. 

    You may be to this point already.  I am wondering if you are trying to only show the authorizor their forms that they need to approve.  I am not sure that it is possible, at least easily to match email addresses.  However I know you can use Usernames or aliases.  You may need to add this field to your form, probably display name, and promote this and then I believe you could do the same as show only forms for a particular user such as the created by.

    You would need to play around with it.  If I have time I might be able to test it.

  • 05-10-2007 06:59 AM In reply to

    • ahardin
    • Top 200 Contributor
    • Joined on 02-13-2006
    • United Kingdom
    • Posts 55

    Re: Filter SharePoint Form Library by [My Email Address] = field on form

    Tricky isn't it.

    You are indeed correct in that i only want to show the Authorissers the forms they have to approve in a separate view called "To Authorise".  Can get this to work on [Me] and can successfully pull the email part from my form.  As you say it is getting SharePoint to represnt My EMail Address in the second part of the filter.

    Have posted on a SharePoint forum for some advice, as soon as i find out i will post back

    Thanks for your efforts

    I'm from WALES
    [email protected]
  • 05-10-2007 07:09 AM In reply to

    Re: Filter SharePoint Form Library by [My Email Address] = field on form

    I have one idea. Essentially we want the [Me] view, accept we want to set who the me is.

    From what I know, SharePoint uses Display names in the modified by field to accomplish this.  So what I would propose is that after you submit the form you update the list and change the modified to field from the display name of the user to the display name of the authoriser.  Refer to Mat's Updating a SharePoint List for the instructions and CAML example.  I am pretty confident this would work but you would lose your true modified by information but my guess is this is captured in the form anyway.

    I think you would have to use display name either way but this should not be difficult to get from your AD service.

    Let us know how it turns out.

  • 05-10-2007 08:14 AM In reply to

    • ahardin
    • Top 200 Contributor
    • Joined on 02-13-2006
    • United Kingdom
    • Posts 55

    Re: Filter SharePoint Form Library by [My Email Address] = field on form

    Essentially if i were to be tempted to go down that route i would probably use Infopath to filter it and say if @Authorisers_Email_Address on the form matches 'mail' from AD then allow authorisation.  Otherwise, default to screen with a close button and an explanation. 

    Plus your solution would stop the original user seeing his form, so would not really work.

     

    Still hoping the SharePoint forum comes up trumps.......

    I'm from WALES
    [email protected]
  • 05-10-2007 08:39 AM In reply to

    Re: Filter SharePoint Form Library by [My Email Address] = field on form

    Yah definetly you could secure the form to allow only the originator or the authoriser get to view the information.

    I do not think that SharePoint could lock it to both users unless created by is the requester and modified by is the authoriser. But my guess is modified by trumps created by but it would need to be tested.

    Good Luck.

  • 05-14-2007 01:43 AM In reply to

    • ahardin
    • Top 200 Contributor
    • Joined on 02-13-2006
    • United Kingdom
    • Posts 55

    Re: Filter SharePoint Form Library by [My Email Address] = field on form

    Clay

     Looked in more detail and if i could set the authorisers name onto the form in the form of "firstname surname" then could SharePoint match that to [Me] if that is submitted to SharePoint instead?

    Cheers Adam

    I'm from WALES
    [email protected]
Page 1 of 1 (9 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.