none
New Vs Edit Form RRS feed

  • Question

  • Hello Everyone

    How could i know if the form is opened in edit mode or new ? there must be some feature or flag that may tell you about form status but excuse me for my lack of knowledge on subject. Many thanks.

    Thursday, April 1, 2010 1:30 PM

Answers

  • Hi Derryl,

    Unfortunately there is no such default feature available to detect form status but you can achieve same result through workaround.

    Add hidden text field and lets called it txtStatus (default value: false), and before sumbit action use rules to set its value to true.

    This way you can check this hidden field to know exactly if its new form or edit form.

     

     

     


    Ashraf ul Islam
    Sharepoint Consultant
    • Proposed as answer by Clayton Cobb Thursday, April 1, 2010 1:50 PM
    • Marked as answer by Derryl Stynes Thursday, April 1, 2010 2:22 PM
    Thursday, April 1, 2010 1:37 PM

All replies

  • Hi Derryl,

    Unfortunately there is no such default feature available to detect form status but you can achieve same result through workaround.

    Add hidden text field and lets called it txtStatus (default value: false), and before sumbit action use rules to set its value to true.

    This way you can check this hidden field to know exactly if its new form or edit form.

     

     

     


    Ashraf ul Islam
    Sharepoint Consultant
    • Proposed as answer by Clayton Cobb Thursday, April 1, 2010 1:50 PM
    • Marked as answer by Derryl Stynes Thursday, April 1, 2010 2:22 PM
    Thursday, April 1, 2010 1:37 PM
  • Derryl, Ashraf is right.  The way I handle this is that I create a Filename field that is hidden, and I use this field for auto-generating and setting my filename when the form is first submitted.  From that point on, I do not change that field when re-submitting so that the filename is always the same for a given form.  What this does is give me a built-in flag for New vs Edit, because if it's blank, it's New.  If not blank, then it's an Edit.
    SharePoint Architect || My Blog
    Thursday, April 1, 2010 1:51 PM