Validation Errors - Unable to Save To List Except on computer creating form - InfoPath Dev
in

InfoPath Dev

Validation Errors - Unable to Save To List Except on computer creating form

Last post 05-28-2011 03:17 AM by Hilary Stoupa. 23 replies.
Page 1 of 2 (24 items) 1 2 Next >
Sort Posts: Previous Next
  • 05-25-2011 10:13 AM

    Validation Errors - Unable to Save To List Except on computer creating form

    I have an odd problem that I cannot figure out.

     I have a standard webform with three submit connections.  All data submitted comes from MyFields and not from sharepoint list data connections.

     SaveToSharepointList works with all three connections from the computer they were created on in either standard form, webform, or when in an Infopath webpart.

    but, none work from any other computer.

    When creating the second and third submit connections, I kept getting validation errors.  No idea why.  I did try to troubleshoot this by elminating mapped fields to see if a specific field caused this; however, it does not appear to be associated with a field.  I do have two required fields and they were always included in the form.  I have no validation setup in sharepoint.

    To work around the validation erors, I used the ClearErrors command and that allowed me to save during pre-deployment testing.

     

    One last thing, the Qdabra rules do not change - ie., no success/error in the Qdabra form fields.

  • 05-26-2011 05:05 AM In reply to

    Re: Validation Errors - Unable to Save To List Except on computer creating form

    Hi-

    1. "When creating the second and third submit connections, I kept getting validation errors."

    What were those errors? They might give us a clue as to what's going on in the form.

    2. "One last thing, the Qdabra rules do not change - ie., no success/error in the Qdabra form fields."

    When a command executes it always writes to Error/Success/Result. If nothing is shown in those fields, then definitely something is wrong in the form, in the injected DLL, or in the execution of the command. Are other commands executing correctly and producing values in Error/Success/Result? Is it just one command that is not returning Error/Success/Result?

    3. "none work from any other computer."

    Do the users have access to write to SharePoint? Do the other machines have identical builds? (InfoPath versions, for example)

    Thanks for the additional information.

    Ernesto Machado
    Qdabra® Software/ InfoPathDev.com
    The InfoPath Experts – Streamline data gathering to turn process into knowledge.™


  • 05-26-2011 08:49 AM In reply to

    Re: Validation Errors - Unable to Save To List Except on computer creating form

    General:  All three commands are adding new items only - I dont get a postback to the form with the new line item.  So, my 'savetosharepointlist' command does not include a line ID. 

     

    1. The error shown in the Qdabra error block was something to the effect of "cannot save due to validation errors. "  It was too generic to understand what was actually causing the problem.

       However, I just removed the clear errors command to get the error again and two of the three commands now work properly without error.  These were the commands that didn't work without 'clearerrors' initially.  Is it possible that  an error in command 1 would create errors when executing commands 2 and 3 - no datafields are shared and each command saves to a different list.  Now that command 1 cannot be executed, commands 2 and 3 function correctly.

    2. It is just one command apparently, I have three pages on my form.  On each page, I have one "save" button assigned to execute one command only.  Two of  the three are working.  One isn't. I have re-verified that the command sent to 'command' is correct.  I have gone back and redone the mapping and redone the submit connection - no success.

    3.  This symptom is no longer present.  When I uploaded the form as an admin template, it worked for hours from the development computer.  Then, when used by any other user, it failed.  Now, it appears that it doesn't work from the development computer - although I didn't change anything.  I developed from home and was at work when I tested on other computers.  I assumed it would continue to work from home.

     

    As a general rule - when adding a "New Item" - I do not enter a List ID in the 'savetosharepointcommand'.  Do I need to have EVERY field in the list included as a local field (ie., a field saved in my:myfields).  For example, a list with columns a, b, and c - I may only have fields a and b in my form.  Field c is not a local field.

     

     

  • 05-26-2011 10:13 AM In reply to

    Re: Validation Errors - Unable to Save To List Except on computer creating form

    jchilde:
    1. The error shown in the Qdabra error block was something to the effect of "cannot save due to validation errors. "  It was too generic to understand what was actually causing the problem.

    The form cannot submit to the submit data connections because it has validation errors. Not knowing what fields are required in your form, or what custom validation you may have set up, we can't guess why your form is in an invalid state when you try to submit. Make sure you have no validation errors before trying to use any submit data connections (which is what the qRules command is using)

     Any fields that are required in your target list need to be mapped from your form as well, but I'd first try making sure the form is valid before submitting, and see. Verify everything works in preview prior to publishing and admin approving your form. Directions for publishing an admin approved template are included in the user guide - I think they start at about page 10.

    Hilary Stoupa

  • 05-27-2011 05:17 AM In reply to

    Re: Validation Errors - Unable to Save To List Except on computer creating form

    I have tried to start over and still get the same error message.  "The form has validation errors and the submit data connection cannot execute."

     I have attached a printout of my list fields and their settings.  I have also attached my mapping xml. I will make a second post with my XSN.

    How do I go about troubleshooting what the validation error is. 

  • 05-27-2011 05:18 AM In reply to

    Re: Validation Errors - Unable to Save To List Except on computer creating form

    This is the xsn referred to in previous post.

  • 05-27-2011 08:12 AM In reply to

    Re: Validation Errors - Unable to Save To List Except on computer creating form

    Just looking at your schema, I can see that CaseID is required -- are you sure that is populated before you submit? Same with FacilityName and some of the Doctors info. Anything required has to be populated prior to submitting.

    Ctrl + Shift + O (the letter O, not the number zero) will take you to the next validation error, if the field is on your form. If the field is not on your form, you'll get a dialog box with a button you can click to find out what field is in an invalid stated.

    Hilary Stoupa

  • 05-27-2011 09:01 AM In reply to

    Re: Validation Errors - Unable to Save To List Except on computer creating form

    Hilary,

     I really appreciate the help you are giving me.  I think I have found my problem.  I recreated the forms and solved all my problems with validation.  It appears that I had a double instead of integer that was causing the problem.  That problem is solved.  Thanks for you help above.

    Now, going my to why I had to recreate the forms, it appears the problem revolves around something bigger that may or may not have something to do with Qrules.

    Here is what I think caused the QRules command to not fire at all:

    I have a column in my form called DocURL.  It is supposed to be a link to a document in a document library; however, I add something to the end so that a reviewer of the list item can open the associated PDF and it takes them to a page identified in another column in the form.  Here is how I did this.

    1. I added a new local variable called "pastedurl".

    2. Next, I put a button next to it called "commit url"

    3. Then, the button determines if the URL is internal or external, removes the prefix form the url (ie., https://sharpeoint/docs/file.pdf is converted to '/docs/file.pdf')'

    4. Then I set the field 'DocURL' to this new converted string.

    When I do this, I can no longer execute the Qrules command at all. 

     

    Any idea why doing calculations and setting fields using local variables would cause my form to fail?  (note:  by local variable I mean that I created a field element in my:fields outside of the group that my form data came from - nothing is a repeating column btw.)

  • 05-27-2011 09:09 AM In reply to

    Re: Validation Errors - Unable to Save To List Except on computer creating form

    Well, again, I'll need some help -- when you say "can no longer execute the qRules command at all" -- What do you mean? Any error in the error node? How do you know the command is not executing -- are you basing that off items not being submitted to your list? Are you submitting any of the fields you mention above to your list? Are you submitting to a hyperlink column in SharePoint?

    Hilary Stoupa

  • 05-27-2011 09:26 AM In reply to

    Re: Validation Errors - Unable to Save To List Except on computer creating form

    By "can no longer execute the QRules command at all" I mean that after hitting the button to execute the qrules command, qRules doesn't indicate anything has occured (ie., no changes to the success check box and no error messages).

     Furthermore, the list doesn't reflect that anything has been submitted.  To answer your other question, I am not submitting a hyperlink column to sharepoint.  I am only updated a text field.

     

     To summarize:  After SubmitToSharepointList is confirmed to be working properly, I then added an extra field to store my temporary data, created a button to perform a calculation on the data and then set the DocURL field, that had worked previously, to a specific value.

     Then, upon hitting the same button as before there is no indication that the button actually worked - no error or success messages.

     

    Something is breaking the form's code related to the button that would otherwise trigger the qrules command.

  • 05-27-2011 09:34 AM In reply to

    Re: Validation Errors - Unable to Save To List Except on computer creating form

    How odd -- the button that performs the calculation uses rules, right? Not custom code?

    Hilary Stoupa

  • 05-27-2011 09:35 AM In reply to

    Re: Validation Errors - Unable to Save To List Except on computer creating form

    Yes - it uses a rule only.  I am slowy building it again step by step and checking it.  No chance the fact that I use full trust could be causing this is there?

  • 05-27-2011 09:46 AM In reply to

    Re: Validation Errors - Unable to Save To List Except on computer creating form

    No, full trust shouldn't do that. So, if you remove or deactivate all the rules that are setting your field, qRules works again?

    Hilary Stoupa

  • 05-27-2011 09:47 AM In reply to

    Re: Validation Errors - Unable to Save To List Except on computer creating form

    No chance you've accidentally hit the button to "edit code" on your button and accidentally added custom code?

    Hilary Stoupa

  • 05-27-2011 09:52 AM In reply to

    Re: Validation Errors - Unable to Save To List Except on computer creating form

    No - it doesn't appear to fix anything to delete everything added after the form was in a known working condition.

     I didn't add any custom code, altough it is possible that I hit the button and closed the window.  That happens sometimes; however, I never would have added anything.

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