Paul's profileAutoSpongePhotosBlogLists Tools Help

Blog


    August 28

    Capture SharePoint User Data in InfoPath

    Requirement:  Submit schedule change requests to SharePoint so supervisors can approve them through workflow.
    Challenge:  I needed to be able to create these list/library items with unique names per person, so no one has more than one schedule request active at a time.
     
    Solution:  This wasn't a case where I could use a survey or custom list to get the user data into SharePoint--it would have to be Infopath.  I created my schedule maker in InfoPath and learned to capture the current user name from SharePoint using web services and store it in the InfoPath form as a variable.
     
    I used this blog article which has some great screen shots but missed one important element--full trust.  After I had the form published, the only way it would work was with Full Trust on.  I followed these instructions from Microsoft, using the Central Administration method to add my template to the site (pointing to my forms library on the submit action). 
     
    One other thing that I think helped which was not covered in itaysk's article was the use of a context pointer.  I already had one for my people picker, here are the instructions:
    In a secondary data source called "Context" (it's an XML datasource named Context.xml)
    <Context siteUrl="http://myserver" />
    After changing the filename in the submit action, schedule requests are saved to a forms library with the username as the filename and overwrite's that user's previous schedule request.  The next step is to have users select a manager from Active Directory in the form and use that in an automatic approval workflow (I'll write that up later).
     
    Thanks to itaysk for the detailed directions of userprofileservice.
     
    Here is a link to my InfoPath schedule block.  It's setup for a 35-hour work week which is the union standard here, but that's easy to change using the default values.

    Comments (1)

    Please wait...
    Sorry, the comment you entered is too long. Please shorten it.
    You didn't enter anything. Please try again.
    Sorry, we can't add your comment right now. Please try again later.
    To add a comment, you need permission from your parent. Ask for permission
    Your parent has turned off comments.
    Sorry, we can't delete your comment right now. Please try again later.
    You've exceeded the maximum number of comments that can be left in one day. Please try again in 24 hours.
    Your account has had the ability to leave comments disabled because our systems indicate that you may be spamming other users. If you believe that your account has been disabled in error please contact Windows Live support.
    Complete the security check below to finish leaving your comment.
    The characters you type in the security check must match the characters in the picture or audio.

    To add a comment, sign in with your Windows Live ID (if you use Hotmail, Messenger, or Xbox LIVE, you have a Windows Live ID). Sign in


    Don't have a Windows Live ID? Sign up

    Paulwrote:
    I ran into the dreaded error 5566 moving this to production.  The problem turned out to be Anonymous access (needs to be off).  This forum post prevented minor bloodshed.  Thanks fuimaypang.
    Aug. 30

    Trackbacks (3)

    The trackback URL for this entry is:
    http://autosponge.spaces.live.com/blog/cns!D7F85948C20F0293!176.trak
    Weblogs that reference this entry