Autopopulate email subject line - InfoPath Dev
in

InfoPath Dev

Autopopulate email subject line

Last post 09-29-2013 08:04 PM by donstephen. 37 replies.
Page 3 of 3 (38 items) < Previous 1 2 3
Sort Posts: Previous Next
  • 09-19-2013 01:05 PM In reply to

    Re: Autopopulate email subject line

     donstephen,

     I actually created a "Save As" field and when I click the "Submit/Send E-mail" button the "Save As" field is populated with the value in the "TTU ID" field. Will the "Save As" field suffice for a field that generates a unique ID for the form name? Is this what you had in mind? If yes, then should I follow the instructions that you have provided me in the pas post or is there something else that I will need to do?

     

     

     


  • 09-19-2013 05:39 PM In reply to

    Re: Autopopulate email subject line

    Yes, the SaveAs field will suffice, as long as this field does not create another file name if there is already a file name. You could set that by adding a condition rule which only generates a file name if SaveAs is blank. At the SharePoint Library submit data connection, click the fx button and insert the SaveAs field. Make sure to tick the checkbox for allowing an overwrite. If this does not work, check the File Name. If your form generates a new file name every time a form is re-opened, then it will not overwrite the existing XML file but instead save it as a new file.

    Don Stephen Lambatin / Support Engineer
    Qdabra Software
  • 09-20-2013 10:16 AM In reply to

    Re: Autopopulate email subject line

     donstephen,

     I have tried your suggestion and I am still coming across the same problem. I have the "Submit/Send E-mail" button assigned to a rule which states that the "Save As" field will be populated with the value entered in the "TTU ID" field when the button is clicked. Once that rule goes through, the form is saved with the following name, "Attention - (Value from TTU ID Field)". Once the form is saved I can go back and make changes to it but the "Save As" field still has the previous name under which it was saved. So if the form was saved under "Attention - 12345" and I go back and change the value in the "TTU ID" field to "123456" and click on the "Submit/Send E-mail" button, the form is then saved under a new name, "Attention - 123456" instead of changing the previous save from "Attention - 12345" to "Attention - 123456". This is a problem because if a wrong value is entered into the "TTU ID" field I will need the change that is made in this field to be reflected on the name that the form was saved under. Any other changes that are made to the form can be made without a problem because they are not displayed in the form name. The problem lies in the "TTU ID" field because when it gets changed then the change must be also made to the name that the form was saved under.

    Thanks!

  • 09-22-2013 07:33 PM In reply to

    Re: Autopopulate email subject line

    I see. If that's the case then I would suggest promoting the TTU ID field as a column for the Form Name (Go to File > Advanced Form Options > Property Promotion, then select the field). Then, instead of having the TTU ID field populating the Save As field, proceed to Form Load (located under the Data tab) and create an Action Rule which generates a File Name for the field Save As, and add a condition the this rule should only run if Save As does not have any value.

    Save As = File Name (use this field at the SharePoint Library Data Connection)
    TTU ID = Form Name (promote this field when publishing the form)

    Your SharePont Library should now have a column for the File Name and another column for the Form Name. Note that the File Name should not change it's value even if the form has been re-opened, in order for the form to be overwritten when re-submitting. I hope this clears up everything for you, but if not, kindly attach your form so we could have a look.

    Don Stephen Lambatin / Support Engineer
    Qdabra Software
  • 09-23-2013 11:15 AM In reply to

     I looked through my form to make the suggested modifications to the form settings and rules. I am already using the "Save As" field at the SharePoint Library Data Connection. I do not understand as to what I need to do to set up the "TTU ID" as the form name. I guess I am a little confused because if I create a action rule which generates a File Name for the Save As  field, and add a condition to the rule that the rule will be run "if Save As does not have any value" then wouldn't that be the same as what I have already setup for the "Save As" field?

     

    I am attaching the form to this e-mail for you to take a look at.

    Thanks

  • 09-24-2013 10:13 AM In reply to

    Re: Autopopulate email subject line

    Hello remigiuszmarian,

    I was able to check your form and perform some tests on a SharePoint Library and it was able to overwrite the existing form template. My questions at the moment are:

    • How unique is the TTU ID data?
    • Will you have certain forms which will have the same TTU ID content?
    • Did you change the TTU ID when you re-submitted the form?
    • Have you tested overwriting on your SharePoint Library using a different form?
    Don Stephen Lambatin / Support Engineer
    Qdabra Software
  • 09-24-2013 02:38 PM In reply to

    Re: Autopopulate email subject line

    The TTU ID is a significant number; the TTU ID is a 6 digit number that identifies a computer in the College of Engineering. Every computer has a unique TTU ID. Due to the fact that each computer has a different TTU ID each form will have a different value in the TTU ID field. I created a form in which I had entered a 5 digit TTU ID instead if six and saved it. The form was then saved under the name Attention - 12345. I then opened the saved form and added a 6th digit to the TTU ID field and saved the form using the Save button on top which I had assigned via the form options menu. The form was still listed as Attention - 12345 but the change made on the TTU ID field was saved as 123456. What needs to happen is that if the TTU ID is mis-entered the user can go back and change it and when they save the form after making the change in the TTU ID field the form will be overwritten with updates number in the TTU ID field. I tried this in my SharePoint library and I always ended up with a new form being saved instead of the edited one being overwritten with the updated TTU ID value.
  • 09-29-2013 08:04 PM In reply to

    Re: Autopopulate email subject line

    Thank you for the additional information. I'm now seeing the cause of the problem. What's happening here is that you are using the TTU ID as part of the File Name. Any changes made to that field will not allow you to overwrite a file because you are changing the File Name. To simply put it, you cannot overwrite a file which does not exist, but instead you will be creating a new file.

    Here are my suggestions:

    • Remove the TTU ID value from the SaveAs formula
    • Populate SaveAs field with a formula which generates a unique value
     - Go to Data > Form Load
     - Add an Action Rule with a condition that onlye runs if SaveAs is blank
     - Sate a field's value
     - Select SaveAs for the Field
     - Add a formula - Ex. now()
       Note: Formula now() will generate date and time: 2013-09-30T10:50:25
                 If somebody else creates an entry with the exact date and time, it will overwrite the file. If you have multiple users who create new entries, there is a chance that forms will be overwritten.

     

    • Use another field which populates the E-mail Subject (since SaveAs will now create a unique ID for your form)

    Use SaveAs for the File Name at the Submit to SharePoint Library Data Connection. Let me know if this helps

    Don Stephen Lambatin / Support Engineer
    Qdabra Software
Page 3 of 3 (38 items) < Previous 1 2 3
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.