Form buttons: 'Save & Copy' and 'Save & New' - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Form buttons: 'Save & Copy' and 'Save & New'

Last post 10-24-2016 11:39 AM by Winnie. 6 replies.
Page 1 of 1 (7 items)
Sort Posts: Previous Next
  • 01-23-2014 03:43 AM

    Form buttons: 'Save & Copy' and 'Save & New'

    Hi all,

    I'm creating an InfoPath form that Submits to a SharePoint List in 2010 and will be used by a team of people inputting data.  Sometimes they need to input lots of records that are almost identical to each other except for maybe one field.

    To save them from having to fill out the entire form each time, I planned to put in two buttons.  One to submit and open a fresh version of the form, and the other to submit that record but keep the data so that they can amend for the next record and then submit again.  I've hit issues trying to do what I thought would be a simple task!  I set the submit options to leave the form open, and then I created two buttons with rules.  The first to only Submit, and the other to submit and then set all fields values to whatever they were by default (via seperate actions).  The problem I have is that when I use the submit only button, once I change the values and submit again it is only updating the first record - overwriting it. 

    I'm now pretty worried that this will cause the whole project to get pulled because it's really not going to be fit for purpose if they have to fill out the form every time.  They can sometimes have 10-20+ records that only have one thing different (house number for example)....

    Does anyone know anything about this or if it's even possible?  I'm searching the web but finding nothing related.

    Ask not what your company SharePoint can do for you, but what you can do for your company SharePoint...
  • 01-23-2014 09:47 PM In reply to

    Re: Form buttons: 'Save & Copy' and 'Save & New'

    Hi Theonus,

    It looks like the GUID is not being specified whether you want to create a new entry or update an existing one. This would depend on which ever submit to SharePoint list method you are using. You may also want to check out qRules' SubmitToSharePointList command, here's a short video about it. Hope this helps.

    Don Stephen Lambatin / Support Engineer
    Qdabra Software
  • 01-24-2014 02:03 AM In reply to

    Re: Form buttons: 'Save & Copy' and 'Save & New'

    Hi donstephen,

    What I did was to set InfoPaths submit options to Leave the form open after submit, then I created two buttons and made rules on them.  One of them will "Submit Using Data Connection: Main Data Connection", then clears the values in all fields by means of set field value to "" for each field (I know, it's a pretty annoying way to go about this, but I couldn't work out a way in InfoPath to reload the form for one button and not the other).

    The second button is supposed to just "Submit Using Data Connection: Main Data Connection", then do nothing else.

    My guess is because the default behaviour assumed that because I'm not reloading the form I probably want to apply any further saves / changes to the same record, I will need to add some XPath somewhere or something?

     

    Unfortunately I work for a large company that has strict rules on it's software and supported applications etc, so qRules is but a dream for me, I have to work with vanilla InfoPath 2010 (soon to be migrated to 2013).

    Ask not what your company SharePoint can do for you, but what you can do for your company SharePoint...
  • 01-27-2014 12:05 AM In reply to

    Re: Form buttons: 'Save & Copy' and 'Save & New'

    Hi Theonus,

    Are you using a SharePoint List custom form? If so, then the custom form's rules alone are not enough to modify the configuration of the submit options. You will need to use code in order to submit these forms properly - If you choose to use CAML, InfoPath here will need to specify whether you are creating a new entry (generate a new ID and set the CAML mapping to New) or updating an existing entry (specify the ID and set the CAML mapping to Update).

    Here is a previous post which discusses how to update a SharePoint List item using CAML. Also, we have a previous webinar which showed a CAML submit technique which you may want to check out as well.

    Don Stephen Lambatin / Support Engineer
    Qdabra Software
  • 01-27-2014 01:39 AM In reply to

    Re: Form buttons: 'Save & Copy' and 'Save & New'

    Hi donstephen,

    I am using a Custom List, then editing the form in InfoPath using the "Customize Form" button from List options.  We also have to avoid where possible using complex code and such as we're not getting support for custom things when we are updated - we're due to update soon to SP2013. As always, there's a lot of red tape gets in the way of doing the best job you can on things which is something I'm now used to having to deal with.

    Those solutions looks really interesting, I'm going to check them out - thank you so much for taking the time to point me toward them!

    Ask not what your company SharePoint can do for you, but what you can do for your company SharePoint...
  • 03-21-2016 01:16 AM In reply to

    Re: Form buttons: 'Save & Copy' and 'Save & New'

    I know this is an old post, but maybe this will help someone.
    I managed to do this by using 2 buttons, a boolean variable("clone"- default value: true) and a SP workflow.
    Regular submit button - rules: Set clone to false + Submit
    1st button - rules: hidden if ID has value + submit +set clone to true + submit + set blank value to the fields you need emptied for a new record. * Yes, submit is there twice.
    2nd button - rules: hidden if ID has value +set clone variable to true + submit + set blank value to the fields you need emptied for a new record.
    You need the 2 buttons, because one shows up when you start a new record and then you keep piling up other things, and the other one if for adding items after existing records.
    The SP WF: Start on item changed; If Clone equals yes -> copy item: Current item to current list
    Filed under: , , ,
  • 10-24-2016 11:39 AM In reply to

    Re: Form buttons: 'Save & Copy' and 'Save & New'

     Hi,

    I'm trying to do something very similar. I have a regular button to submit, then it directs you to a confirmation page (another view) that asks the user whether he wants to submit another request.

    If the person clicks "Yes", then it would set blank value to some fields and the user can submit a new form from here.

    My question is, do I still need two buttons in this case?

    Also, can you elaborate on how to set up the SharePoint workflow?

    Thank you! 

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