qRules and Web-Based InfoPath Forms - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

qRules and Web-Based InfoPath Forms

Last post 08-30-2018 01:56 AM by B02002. 7 replies.
Page 1 of 1 (8 items)
Sort Posts: Previous Next
  • 08-28-2018 09:03 AM

    qRules and Web-Based InfoPath Forms

    I've created a form which gets data from various SharePoint lists. The user of the form is able to click a button which will then create an entry in another SharePoint list. This is achieved using qRules (nothing fancy, I've only used basic functionality). I've tested the form in InfoPath filler and everything works perfectly. I've then published the form to SharePoint as an "admin approved" form and presented it on a web page. So far so good. The form works as expected, apart from the "submit" button which does not create an entry in my SharePoint list. I don't get any error messages.

    I'm sure I must have forgotten to do something but what? If it works in InfoPath filler what would prevent the qRules command from working in a published form? Is it something to do with the mapping file? Perhaps I need to store the mapping file in a SharePoint library and reference it from there? I'm a sporadic user of qRules, so it's hard to remember all the ins and outs of it when you haven't used it for a while.

     My qRule command looks like this (as you can see, very basic):

    SubmitToSharePointList /submit=ReminderSubmit /mapping=mapping-AM-EQ-Reminder 

  • 08-28-2018 09:20 AM In reply to

    Re: qRules and Web-Based InfoPath Forms

    Have you put the QdabraRules Error node on your form so you can see if there is an error there? If your form currently closes on your button rules, you'll want to change that temporarily. Is this an actual submit button with submit rules? Or a regular rules button? Is postback set to always on the button?
    Hilary Stoupa

  • 08-29-2018 01:46 AM In reply to

    Re: qRules and Web-Based InfoPath Forms

     I did originally have the qRules error node on my form when I was testing it in InfoPath filler and it reported no errors. The code is attached to a picture button and is executed on click:

    I guess I'll have to put the error node back on the form to see what gets reported when the form is hosted on SharePoint .

    My form is essentially providing a dashboard so that feedback about activities can be monitored. When feedback has not been received an "envelope" icon appears so that the user can send an automated email to remind the highlighted user to submit feedback. The envelope icon is a picture button. When clicked, it should write an entry to a SharePoint list. I have a workflow on this list which sends email when a new item is created. Here's a screen dump of part of the form, for clarification:

     

    The postback setting on the picture button  is set to "always".

  • 08-29-2018 02:58 AM In reply to

    Re: qRules and Web-Based InfoPath Forms

     My screen dumps seem to have been removed from my post above - sorry about that.

    I've added the error node back to my form and republished. When running the form in InfoPath Filler no error is received, but when I run the form from SharePoint I get the error message "Error occurred submitting data to list. The specified user could not be found (it lists my name in "<surname>, <forename>" format. This is enlightening I'm sure, but I don't know what to do about it?

  • 08-29-2018 07:32 AM In reply to

    Re: qRules and Web-Based InfoPath Forms

    As further clarification, in plain English, it seems that SharePoint knows who I am when I submit using (qRules) from InfoPath Filler but not when I submit (using qRules) from an admin-published form in SharePoint. At least that's my observation from seeing the qRules error message "user could not be found".

    Could this have anything to do with the way I injected qRules into the form originally? By default, the injector specifies Browser and Sandbox as default. I changed this to Browser and Admin Deploy for my form. No idea of what the significance of doing that is though.

  • 08-29-2018 08:37 AM In reply to

    Re: qRules and Web-Based InfoPath Forms

     After further investigation it seems to be very similar to this incident:

     

    http://www.infopathdev.com/forums/p/30777/104959.aspx

    I have two accounts in our domain - a user account and an admin account. The display name for both accounts is the same, i.e."Sellars, John". qRules doesn't seem to have a problem with this if I submit from InfoPath Filler, but doesn't like it when I submit from an admin-approved published form. 

    In the ULS log the message is a bit more specific than the qRules error message. It says "The user does not exist or is not unique".

    I've tried my form logged in as a user with only one account and it works as expected. Is there anything I can do about those users who have more than one account though? It almost seems like qRules is trying to use the display name of the logged-in user when submitting rather than the ID. Confused...

  • 08-29-2018 09:07 AM In reply to

    Re: qRules and Web-Based InfoPath Forms

    Are you submitting data to a person / group field?
    Hilary Stoupa

  • 08-30-2018 01:56 AM In reply to

    Re: qRules and Web-Based InfoPath Forms

     No. The fields in my form are all text-based and the fields in my SharePoint list are text-based, so my mapping file is just mapping text fields to text fields. It seems to be working for most users but fails if a user has more than one account in the domain.

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