New Record button doesn't clear all fields - InfoPath Dev
in

InfoPath Dev

New Record button doesn't clear all fields

Last post 02-09-2016 08:38 AM by Hilary Stoupa. 9 replies.
Page 1 of 1 (10 items)
Sort Posts: Previous Next
  • 02-08-2016 05:10 AM

    • Jayne
    • Not Ranked
    • Joined on 02-08-2016
    • Posts 12

    New Record button doesn't clear all fields

    Hi,

    I have an InfoPath 2010 form that submits to a SharePoint 2010 List.  The user completes the form using a SharePoint page InfoPath webpart.   

    Within the form there are cascading dropdowns that link to a secondary data source (SharePoint lists).  Based on what is selected in the dropdowns other text fields are set using rules.  There are two buttons on my form: "Submit" and "New Record".  User presses submit to submit and new record to clear all fields either after submit or if they have made a mistake. 

    The problem I have is that the New Record button resets the dropdowns but not the text fields.  This is ok if the user selects something from the dropdown as the new selection kicks off the rules and sets the text fields again. However there are situations where they may need to leave the dropdown blank - this is when I have a problem as the text fields keep the data from the previous entry. 

    I've searched all over the internet for a solution to this but cannot find anything.  I have tried setting the query fields to blank after submit but this just wipes out my dropdowns and still leaves the text fields set.  I need an out of the box answer as I am not allowed to write code and have no IS support for InfoPath. 

    Thanks in advance for your help!

    Jayne 

  • 02-08-2016 07:46 AM In reply to

    Re: New Record button doesn't clear all fields

    That seems odd - are the text fields also submitting to the same SharePoint list? Can I see a copy of your form? You can attach it under the Options tab in a reply.
    Hilary Stoupa

  • 02-08-2016 07:59 AM In reply to

    • Jayne
    • Not Ranked
    • Joined on 02-08-2016
    • Posts 12

    Re: New Record button doesn't clear all fields

     Hi Hilary,

    Thanks for your response.  I have attached my form as requested.  There are two views in my form - the user sees and fills out the Submit Request view, the offending text fields are in the edit item view.  All fields submit to the same list. 

    I'm fairly new to this (this is the first form I've used query fields on) so I'm hoping it's something stupid I've done (or not done!) 

    I really appreciate any help you can provide.

     Jayne  

  • 02-08-2016 10:32 AM In reply to

    Re: New Record button doesn't clear all fields

    So - the New Record button is supposed to clear the fields... and it returns the user to the Edit view? I've not used SharePoint List forms much....
    Hilary Stoupa

  • 02-08-2016 10:34 AM In reply to

    Re: New Record button doesn't clear all fields

    Okay, I think I get what you are saying now... sorry, it is Monday and I am very slow. :) Your rules are setting these other fields - but just clicking "New Record" does not reset them to blank. Do they get set correctly if you then make a different selection for one of the fields with rules on it?
    Hilary Stoupa

  • 02-09-2016 12:42 AM In reply to

    • Jayne
    • Not Ranked
    • Joined on 02-08-2016
    • Posts 12

    Re: New Record button doesn't clear all fields

    Correct, my rules are setting the other fields. Clicking new record is not setting them back to blank.  If you make a new selection they are set correctly, however users have the option to leave the dropdowns blank which is when the fields not being reset becomes a problem.   

  • 02-09-2016 01:10 AM In reply to

    • Jayne
    • Not Ranked
    • Joined on 02-08-2016
    • Posts 12

    Re: New Record button doesn't clear all fields

    Have just had to use my form as a 'user' submitting requests with blank name dropdown. All of my requests were blank but after the first entry it was picking up data in the fields set by rules.  So now I don't think its a case of the new record button not resetting, I think it's my rules setting values when I don't expect them to.

  • 02-09-2016 07:47 AM In reply to

    Re: New Record button doesn't clear all fields

    Good detective work. So, one thing about rules that people don't always realize (forgive me if I am telling you something you already know) - rules fire when the field they are on changes. So if field1 is equal to B and you have a rule that fires on field1 with no conditions, it will fire every time field1 changes.... but, if you set field1 to B again, the rule won't fire, because the field hasn't changed. Does that make sense? Not sure if it will help you figure out what's up in your form, but thought I'd mention it. :)
    Hilary Stoupa

  • 02-09-2016 08:27 AM In reply to

    • Jayne
    • Not Ranked
    • Joined on 02-08-2016
    • Posts 12

    Re: New Record button doesn't clear all fields

    All my rules were set to when field changes.  I have now set them to when field is not blank and that seems to have solved it, I will continue to play to make sure.  Seems strange to me that the new record button counts as a change, I thought it was effectively reloading the form as new.

    Thank you so much for your help!  Being able to 'talk' to someone who has some knowledge is a lifeline! 

  • 02-09-2016 08:38 AM In reply to

    Re: New Record button doesn't clear all fields

    It seems odd to me too - I know when we query a secondary data source, rules on fields don't fire after the query. It isn't considered a change. So yah, I'm surprised to hear the New Record does act as if fields have changed. That said, at least you know what's going on and can work around it. Oh - I agree about the value of being able to bounce ideas around - sometimes I solve a problem typing it out. :)
    Hilary Stoupa

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