InfoPath form and SharePoint library not playing nice - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

InfoPath form and SharePoint library not playing nice

Last post 03-18-2019 07:21 AM by DerekS. 15 replies.
Page 1 of 2 (16 items) 1 2 Next >
Sort Posts: Previous Next
  • 03-14-2019 08:31 AM

    InfoPath form and SharePoint library not playing nice

    I apologize in advance, this one’s going to be long.

    So, I was tasked with re-engineering our SharePoint 2010 Supply Request Order Form. The way it is set up currently, someone submits and order, it goes to the designated approver, based on the finance account it comes out of. If it is approved at that level, it goes to one of two approvers based on if it is being funded by a grant or not. The way the approval process works currently is that it sends the approver an email. Inside the email are two links. The first one takes them to the submitted form so they can review it. They close out that browser, and then click the other link, which opens an Accept/Reject SP form. This is highly inefficient, and one of the reasons I was tasked with fixing it.

    I got so frustrated that I purchased Darvish Shadravan and Laura Rogers’ book with my own money, Step by Step – Using Microsoft InfoPath 2010 with Microsoft SharePoint 2010. It’s been extremely helpful. In chapter 11, it shows how to create a form where the approval process takes place in the form itself, with minimal SharePoint Designer workflow usage. Obviously, my form isn’t identical to the example used in the book, but I created all the rules and workflow they did, modifying where needed.

    Firstly, almost every time I open the form, I get a warning error message. If I were to open the form 10 times, I’d probably get the warning 6-7 times. It’s always about an error occurring when trying to connect to a Web service. The only connection I have of that type is the GetUserProfileByName. Most of the time it’s one warning, sometimes it’s two.

    The second issue I’m having is that when I submit a form as a test run, in the SP Library it automatically shows as “completed” before I even get the first approval level email. Not sure what’s going on there.

    The third issue is I’ll get the first level approval email. I click on it, and it takes me to the form for approval as it should. I approve and click the submit button. I get the second level approval email. I click on it, and it takes me to the original state of the form, but this time at the bottom the filename field is filled out, which doesn’t happen until the initial request is submitted.

    I’ve worked on this for the better part of 3 weeks now. I’ve followed so many Google rabbit holes that my eyes are nearly bleeding. I’ve changed rule and workflow parameters, recreated the form in a different configuration, ect. I’m ready to pull my hair out at this point. I’ve reached out to our SP server farm admins, but with specific regards to SP, I know more than they do. They’re just network people.

    If anyone can offer ANY advice, help, well wishes, positive vibes, I’d be very grateful.

    For clarity, here’s the procedure of the form (the way it should work):

    1. Open form. Click one of 5 checkboxes to unhide the section of the vendor you wish to order from.
    2. Enter the information in for the supplies you wish to order.

    3. Choose which financial account this is pulling from, which auto-populates the first level approver info via rules I created. Form load rules sets the view to the first level approver view.

    4. Submit form

    5. Email is sent to first level approver. They review the form and either approve or reject. Comments can be entered if desired, and an approver name and timestamp is auto-populated when the form is submitted. If approved and it is coming from a grant, a rule sets it to be sent to one specific second level approver. If it isn’t a grant, it’s sent to the other specific second level approver. Form load rules sets the view to the second level approver view.

    6. Email is sent to the specific second level approver. They review the form and either approve or reject. The previous first level approver info (name and timestamp and comments if any) are there as read-only. They can also add comments, and their info is auto-populated upon clicking the submit button. Form load rules sets the view to the Read Only view.

    Thanks in advance for any help. I tried going this alone as I’m very much a kinesthetic learner, but I’ve reached my limit. We’re supposed to be upgrading to SP Online or SP 19 sometime between now and June. I can only hope…


  • 03-14-2019 08:55 AM In reply to

    Re: InfoPath form and SharePoint library not playing nice

    Alrighty! Let's break this problem down and tackle it a piece at a time. First issue is the get user profile error, right? So - how is that set up? Is it running when the form opens? Or do you set the account query field in a Form Load rule and then run the connection? From your description, this is a form that is filled out in the browser - is that correct?
    Hilary Stoupa

  • 03-14-2019 09:04 AM In reply to

    Re: InfoPath form and SharePoint library not playing nice

     Apologies, I should have mentioned that. I created it as a secondary data connection, and then yes, I do have it running via Form Load rules. It queries and sets the following fields:

    LastName =Value[Name = "LastName"]

    strCurrentUser = username()

    AccountID = strCurrentUser

    AccountName = strCurrentUser

    UserEmail = Value[Name = "WorkEmail"]

    FirstName - Value[Name = "FirstName"]

    Fullname = Value[FullName = "PreferredName"] 

     

    I can attempt to upload the  .xsn file if that'd be easier.

  • 03-14-2019 09:18 AM In reply to

    Re: InfoPath form and SharePoint library not playing nice

    I would love to see the form - can you attach it to the Options tab in a reply? If it is too big, let me know & I can email you via the forum. :)
    Hilary Stoupa

  • 03-14-2019 09:23 AM In reply to

    Re: InfoPath form and SharePoint library not playing nice

     Please find attached the form. As always, thanks so much Hilary!

  • 03-14-2019 09:49 AM In reply to

    Re: InfoPath form and SharePoint library not playing nice

    Okay, first thing I'd do to try to clear up the GetUserProfile query error is to set the query field to the userName function. I've added a rule for that in this copy of your form. I've also put the query field and data fields on the bottom of your form, with a button to run the query - so if the query errors from the Form Load rules, you can try tinkering with the value in the AccountName query field to see if you need to remove a claims prefix or if there is some other variable in your environment causing issues. You'll want to publish this and test it in the browser - save the attached file locally, right click and select Design to open in Design mode & then you can save / publish.
    Hilary Stoupa

  • 03-14-2019 09:54 AM In reply to

    Re: InfoPath form and SharePoint library not playing nice

     Thank you, I'll try doing that right now. :)

  • 03-14-2019 11:37 AM In reply to

    Re: InfoPath form and SharePoint library not playing nice

    Hilary,

     I feel like the biggest dummy right now. I didn't need the Get User Profile in there. I took it out and just used username instead, and it worked like a charm.

     The only issues I have left is that once a form is initially submitted, SP shows it as completed through the whole process. The other issue (really isn't an issue per se) where the sections are one color in "InfoPath, but when they're published and viewed via a browser, some parts of the section are discolored.
    I'll figure it out, but I wanted to bring it up because that's just weird. :D  

  • 03-14-2019 11:51 AM In reply to

    Re: InfoPath form and SharePoint library not playing nice

    Great! so - first thing you might want to check - do you have any workflows on your library? If you do, that could be part of your issue, right? Maybe a workflow is changing the status on you. What field are you looking at that is showing completed? Is it the promoted Order Request Status field? Or another field? The color issue can be a real problem - sometimes I've had to fix that up in the view file manually, and I can help you with that if needed. It sometimes helps to just change the color on the whole table then change it back.
    Hilary Stoupa

  • 03-14-2019 12:00 PM In reply to

    Re: InfoPath form and SharePoint library not playing nice

     I have 1 workflow for this library, it's a reusable workflow I created following the steps in the InfoPath/SharePoint book. I'll attach a screenshot of the conditions/actions, but no status changes are made within the workflow, it's all in the InfoPath rules.

     The field that is showing "completed" is the Form Approvals column. The reusable workflow is named Form Approvals, so I'm guessing it's something SP put in automatically. I have another field I can insert to show the progress, but I like to have that one too as it is a hyperlink and as admin I can go in and approve an order for someone if they're having issues or they're out of town, etc.

    Ok, well at least it isn't just me. I'll play around with it and see what I can do. Those colors are our school colors, but I've been staring at them every day for the last 3 weeks. Kinda getting sick of them. ;)  


  • 03-14-2019 12:05 PM In reply to

    Re: InfoPath form and SharePoint library not playing nice

    Wouldn't the Form Approvals workflow column show "Completed" when the workflow finishes running? I would expect that to be the case....
    Hilary Stoupa

  • 03-14-2019 12:12 PM In reply to

    Re: InfoPath form and SharePoint library not playing nice

     Correct, but the column goes to "Completed" as soon as the submit button is pressed by the requesting person, before the first level approver opens their email to review the request.

     Is this where I might use that "Wait for the item to be unlocked by the document editor" or something to that effect?

    As the test order requestor, I've received the "your order request has been approved at all levels" email after I've gone in and approved it as both first and second level approvers, in succession as I've received the emails. 

  • 03-14-2019 12:32 PM In reply to

    Re: InfoPath form and SharePoint library not playing nice

    I'd guess that the workflow itself has completed.... perhaps the email still hasn't been sent, or what-have-you, but the workflow is done. Like, if you check the workflow for the item, it isn't still running. You might want to try logging your workflow actions (there is a SharePoint designer action for that). Or maybe you don't need to use workflow at all, and could just use an email data connection in InfoPath to send your emails? Is sending email all your workflow is doing? If so.... I'd probably just use an email submit connection in the form.
    Hilary Stoupa

  • 03-15-2019 05:34 AM In reply to

    Re: InfoPath form and SharePoint library not playing nice

     In reality I technically don't need a workflow, except that the workflow sends an email that contains the formlink variable to the appropriate approver. I've looked around, but I can't see how to replicate that with an InfoPath email data connection. Any thoughts?

     Thanks! 

  • 03-15-2019 07:59 AM In reply to

    Re: InfoPath form and SharePoint library not playing nice

    If you know the name of the form, you can use a default value for the form link. It looks like you have a formname field you are using in your submit, so just add another hidden field for the form link, copy out the URL of an opened form, and concat in the form name. Since this is a browser form, you can switch views and send an email (in Filler, this sends a blank email) - so you can have a special email view with the text / link you want.
    Hilary Stoupa

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