Problem with Receive Data Query not working for condition - InfoPath Dev
in

InfoPath Dev

Problem with Receive Data Query not working for condition

Last post 08-21-2012 08:15 AM by ebonymb. 20 replies.
Page 1 of 2 (21 items) 1 2 Next >
Sort Posts: Previous Next
  • 08-17-2012 12:53 PM

    Problem with Receive Data Query not working for condition

    I have built a Data Query that retreives the Created by data from a sharepoint list.  On submit, the form does the following:

    1. (no conditions)Submit to sharepoint
    2. If Type = MDEBIT
      • Query Created by
      • Populate a hidden field with summary MDEBIT form data which includes @Created by
    3. If Type = Phone_Address
      • Query Created by
      • Populate a hidden field with summary Phone_Address form data which includes @Created by
    4. If email is blank, email to @Created by
    5. If email is not blank, email to Created by and Email

    The form works PERFECTLY whenever type = MDEBIT.  But when type = Phone_Address, The rules stop working after the first few submissions.  I test it in preview and it works.  Then I publish and test it live and it works.  After a few minutes, the Created by query stops working completely but only for type Phone_Address.  For the life of me I cannot tell why the form works perfectly for the mdebit condition and not the phone_address.  I've tried putting it in rule 1 where the query should happen no matter what type of request is chosen, but it still stops working for phone_address.

     I'm at a loss.

  • 08-17-2012 01:02 PM In reply to

    Re: Problem with Receive Data Query not working for condition

    These are Submit rules?

    In general, if rules aren't working as I anticipate, I assume that a condition is not what I expect, for some reason. If this were my form, I'd put all the fields in play onto the form, temporarily, and see if I can determine a reason for the change...

    Hilary Stoupa

  • 08-17-2012 01:10 PM In reply to

    Re: Problem with Receive Data Query not working for condition

    Yes these are submit rules.  I've tested all the fields in the condition and initially they work.  Then I publish and test all the fields from the live site.  They still work.  The users will begin using the form again and it works... A few minutes later, only 1 condition is working for all of us.  Even the saved copy I preview on my hard drive stops working.  But when I check the code and rules on the hard drive and the publish version... it's still all the same.

  • 08-17-2012 01:14 PM In reply to

    Re: Problem with Receive Data Query not working for condition

    So, you have the Type field displayed on your form, and you can see that the value is Phone_Address and you click Submit and the rule doesn't fire?

    Hilary Stoupa

  • 08-17-2012 01:21 PM In reply to

    Re: Problem with Receive Data Query not working for condition

    Yes.  The type field is a radial button. button 1 = mdebit and button 2 = Phone_Address.  It is a required field so one or the other must be selected. The rule to submit to the sharepoint library works all the time, no matter if button 1 or 2 is selected.  The submit rule to query Created by from the library and email to Created by is what is broken when button 2 is selected.  It works fine with button 1.

  • 08-17-2012 01:34 PM In reply to

    Re: Problem with Receive Data Query not working for condition

    So, I think I figured it out.  I think it has to do with the formula for populating the hidden field.  For mdebit, the formala is:  concat(Type, " ", "Effective Date:", concat(substring(Effective_Date, 6, 2), "/", substring(Effective_Date, 9, 2), "/", substring(Effective_Date, 1, 4)), " ", "Borrower: ", Borrower, " ", "Loant#: ", AcctNum, " ", "DDA: ", DDA, " ", "STATE & GL: ", State, " ", GL, " ", "PRIN: ", PRIN, " ", "INT: ", INT, " ", "ANNUAL: ", ANNUAL, " ", "LATE: ", " ", LATE, " ", "OTHER: ", OtherFees, " ", "TOTAL: ", TOTAL, " ", "CONFIRMATION=", Confirmation, " ", "Created by: ", @Created_By)

    For phone_address, the formula is much longer:  concat(Type, " ", "Effective Date:", concat(substring(Effective_Date, 6, 2), "/", substring(Effective_Date, 9, 2), "/", substring(Effective_Date, 1, 4)), " ", "Borrower Demographics", " ", "Address:", B_Address, " ", "City:", B_City, " ", "State:", B_State, " ", "Zip:", B_Zip, " ", "Home Phone:", B_HomePhone, " ", "Business Phone:", B_BusinessPhone, " ", "Guarantor Demographics:", "Address:", G_Address, " ", "City:", G_City, " ", "State:", G_State, " ", "Zip:", G_Zip, " ", "Home Phone:", G_HomePhone, " ", "Business Phone:", G_BusinessPhone, " ", "CONFIRMATION=", Confirmation, " ", "Created by: ", @Created_By)

    Without that rule to populate the hidden field the phone_address type submits as it should.  I think I need to figure out how to limit the characters so the hidden field rule doesn't stall.  The query happens right after the library submit, but the hidden field rule must be stalling or timing out.  Therefore, the @Created_By is missing.  It comes before the email submit rule which also uses the @Created by and I believe, that's what's hanging that rule up as well. 

  • 08-17-2012 01:38 PM In reply to

    Re: Problem with Receive Data Query not working for condition

    You could use a substring formula around your concat to truncate to a specific length.

    Hilary Stoupa

  • 08-17-2012 01:43 PM In reply to

    Re: Problem with Receive Data Query not working for condition

    I'm not well versed on the substring.  What I have is just a copy and paste from what someone else gave me.  how should i incorporate it into the formula?

  • 08-17-2012 02:02 PM In reply to

    Re: Problem with Receive Data Query not working for condition

    I came up with a work around to populate the hidden field before the submit but I would still like to add on the @Created by field which is queried on submit.  Is there a way I can attach @Created by to the end of the formula?

  • 08-17-2012 02:03 PM In reply to

    Re: Problem with Receive Data Query not working for condition

    Do you know how many characters you can have in your field that you are setting?

    The formula would change to be:

    substring(Your Current Formula Here, 1, Total Length Here)

    Hilary Stoupa

  • 08-17-2012 02:06 PM In reply to

    Re: Problem with Receive Data Query not working for condition

    Isn't @CreatedBy already in your formula? I'm confused.

    Hilary Stoupa

  • 08-17-2012 02:08 PM In reply to

    Re: Problem with Receive Data Query not working for condition

    Created by is there, but it only queries on submit.  So although the function is in the formula, it shows up blank because the query has to happen after the form is submitted to the library

  • 08-17-2012 02:17 PM In reply to

    Re: Problem with Receive Data Query not working for condition

    Well, to be clear, if you set the field's value after you submit the XML to SharePoint, the next time you open it, the value won't be what you've just set it to....

    But you should be able to set the field to the value of itself concatenated with your other field - concat(Select Your Field Here, @CreatedBy)

    Hilary Stoupa

  • 08-20-2012 03:02 PM In reply to

    Re: Problem with Receive Data Query not working for condition

    I've been all over this form and i've confirmed it is not the character count in the field.  For some reason, the Created by query is just not stable.  I don't know if the form is corrupt or what but now when the type = mdebit, the Created by query is not working. 

  • 08-20-2012 03:10 PM In reply to

    Re: Problem with Receive Data Query not working for condition

    Feel free to attach your template to a reply under the Options tab if you'd like me to take a quick look at your logic.

    Hilary Stoupa

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