Skip to main content

I have a requirement where user can save the form, open it later and submit OR submit directly.

 

If the data is saved, i do i open it in same form, since workflow is using that particular form's submit button clicked rule to start the workflow.

 

Anyone accomplished this..please share how to.

 

Hi,

 

This is what I would do:

 

1. Make sure your form data can easily be retrieved from a identifier (eg. some sort of ID)

 

2. When you save the form, use SmartObject to create new records. When you create new records, the SmartObject should return you the primary key of the record you just created. You can use that returned primary key as some sort of foreign key to join your data if your form data span across multiple database tables.

 

3. In your form, add a parameter to store the identifier in step 1. So when your user access the form, they just need to specify that parameter to retrieve the saved data

 

4. In your form, when form is initializing or when form is initialized rule, add a conditional rule to check if the parameter is not empty. If not empty, call the relevent SmartObjects to retreive your saved data, and map it back to the controls in your form.


Normally this can be done if you think about drafts. I will try to explain the concept. imagine that you have a portal page where a user can select a specific form he/she wants to fill. For example HR portal has Leave requests, New employees, Travel requests, etc.  So, if you want to fill a new Leave request you click on that link to load the New Leave request submission form. Here comes the data structure: id, name, email, number of days, notes, etc +status.

This 'status' field can solve your problem. So if a user fills the form compleletey and submits it, you set the status as 'Submitted' while executing Create method of your data smartobject and the workflow starts.

If a user wants to save the form data without submitting it, you put a Save button on the form that executes Create/Save method (depending on if the data was previously saved already) that saves the data and set the 'Status' field as 'Draft', closing the form afterwards, or redirecting a user back to the portal page.

There, on the portal page, you just need to insert a simple list view 'My drafts' filtering the data based on the draft status and user. Any time a user may re-open the form from the drafts, add data and either save again or submit it.


Hi Andrey,

 

Your solution sounds ideal but I am very new to K2 and wondered if it is possible for you to explain a bit more with screenshots about how this is done please. In particular how the rules will look.

 

Thank you in advance.

 

Nicola


Hello  @pcorearusa,

 

Please see the following article for more information on how to achieve that. The article includes the visuals and example on how to perform the saving and submitting information: https://help.k2.com/kb000107

 

Also check the related community article: https://community.k2.com/t5/K2-Blackpearl-Forum-Posts/Save-InfoPath-form-in-progress/td-p/60573

 

Should you find the above information useful kindly mark as "Accepted Solution and/or Kudo", as this will assist other community members looking for related information.

 

Regards,
Beswick

 


Reply