You are viewing limited content. For full access, please sign in.

Question

Question

Resetting Forms values to NULL using Workflow

asked on September 23, 2020

I have a training form that is used multiple times to document field training for employees. Once a shift is finished and the form is submitted, it is saved to the repository and I have a workflow that *should* wipe the scores so that the same form can be used for the next shift (there could be dozens of identical shifts, I really don't want to have to build a new form for each one).

The workflow is really simple:

A sample of the Reset scores properties:

 

Can anyone help me figure out what I'm missing? I feel like it's probably something stupid simple and I'm just too far into the weeds to see it.

Thank you!

Shawn

0 0

Replies

replied on September 23, 2020

Can you explain the bigger picture of this process. Who is filling out each form, what are they filling out, and what data is being saved? You should be able to submit the same starting form many times to record new values, you shouldn't have to "clear" anything out. 

0 0
replied on September 23, 2020

We want to use one Forms process for the entire training process (moving from phase to phase, completing training, etc). Within each phase of training, the same form is used during each work shift (day) to score the trainee. My back-up is to use a Forms process for each shift, and just submit a blank form, but it seems like we should be able to clear scores and assign a new shift with a blank form. Does this explain the overall process better?

0 0
replied on September 24, 2020

If you ever want a blank form, it usually makes sense to submit a new instance. From what I gather about your process, a trainee spends multiple days on each phase of the training, and each day they have to fill out a scoring form. I'm assuming the scoring form for each phase is different. What isn't clear is where you put the data for the previous day that gets cleared out after submission. 

One solution might be to have a single process with a form made for each phase. The process could be triggered manually each night or automatically with a timer event (not a message start event). The first step would be to run a workflow to determine what phase that trainee is in and what day it is, then assign a user task using the form for that proper phase. The scoring form would be filled out based on the current phase + day, then saved to the repository in that trainee's folder. You'd start a new instance for each day for each trainee, and the same process could handle all forms for each phase and be submitted fresh each day. 

I think conceptually, you should try to work your process around 

start event -> check where the trainee is at (phase + day) -> assign a user task with the proper form for that phase -> save the data somewhere -> update metadata or database with new trainee information (new phase) -> end event

Each day you'd submit a fresh instance based on where the trainee is at. 

0 0
replied on September 29, 2020 Show version history

Great suggestions Jared.

I wanted to throw this out there in case Shawn just needs something to clear the fields from his form. 

Shawn, you can clear values from a form when it loads using jQuery as well. Rather than using workflow to do it, just have the Form itself do it on load from  the JavaScript/CSS tab:

$('.sampleField1 input, .sampleField2 input').val('').change();

The different field types can require different methods to clear them out (like checkbox, radio, etc.), but the above is just a simple example. Just google whatever you need to know. I don't want to go into much detail if this isn't helpful, but you should get the idea.

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.