Skip to main content

Hi!

We have a screen where the user is able to respond to some questions, after the user response, he can click the task "Next" in order to start the handler code.

We are doing this combination in order to have the editable fields directly available and to not be required to open a task for it.

The thing is that the Next task is a ghost task which is triggering the handler for the auto-edit section only if there are some changes. (usually from what we observed, also the default is working that way, until you do not change something in a field and focus out, is not triggered).

The problem for us is that for some questions, the answers can be prefilled from previous questions and the user needs to just skip that question by clicking Next, thing which will not work because there is no actually change of the fields since are prefilled.

We can and have something to automatically skip the question if is answered, but for this case, it will be a bit unhandy since there could be multiple questions answered one after another and this will overcomplicate the code we think.

Do you have any suggestion how to "start" the handler without making an actual change?

Thanks!

 

Hi!

We did find a solution, we moved the code of the handler into a subroutine which will be called from the handler. And since for read-only question the task does not make the trick to start the handler, we check if the question is read-only and call the subroutine from the task with the latest question.

Still, do you have other ideas to start it?

Thanks!


Hey Ionut,

Handlers are procedures and can be called as such. You could opt to execute the procedure in, for instance, the default logic, when all required fields are either filled manually, or pre-filled.

Would that suffice? Difficult for me to say because I do not know the underlying data model and workflow.


Hey Ionut,

Handlers are procedures and can be called as such. You could opt to execute the procedure in, for instance, the default logic, when all required fields are either filled manually, or pre-filled.

Would that suffice? Difficult for me to say because I do not know the underlying data model and workflow.

Indeed, this should work because is the same approach with using a procedure (in our case we made a subroutine also because of less parameters needed than the entire handler procedure). 

For us the default was called only after user changes a field, so when everything is untouchable, it will not be called.

But as a conclusion, I think we have the same route with using the procedure.

Thanks for answer!


Reply