Solved

Ideas for how to determine the template selected in a DocLauncher?


Userlevel 4
Badge +6

Hi, so I am developing a DocLauncher with multiple templates that have slightly different intake forms but all launch the same workflow. Ideally, the workflow would select different branches of logic depending on which template was selected but in order to do so it would need to know which template was selected, the heart of the problem. I'm wondering if anyone has any ideas for tackling this problem?

The brute force strategy would be to simply copy the workflow into different variants, one for each template/intake form, but this really increases cost of maintenance and developing new features. A slightly more elegant approach would be to refactor common parts of the workflow into "component" workflows but there's only so much that can be componentized and it's a non-trivial amount of work I'd like to avoid if possible.

icon

Best answer by Community Expert 15 July 2019, 18:01

View Original

5 replies

Userlevel 3

The only real way to do this at present is to hard-code a hidden text field on the template with the designator value.

Userlevel 3

Zakee is right, you'll have to hard-code a field on the Document Generation form.

Userlevel 3

Thanks for the feedback, guys. This is actually the solution I arrived at independently as well, although it's not without its drawbacks. It means you have to makes copies of intake forms that might otherwise be reusable, but better than nothing I guess. Thanks!

Userlevel 1
Badge +12

Maybe not. Caveat, I have not tried this before, so proceed with caution.

If possible to determine what template you are generating from the users selections, defaults, or ETLs you could in theory use the conditionals to suppress and expose the appropriate value.

Userlevel 3

I like it, that's an interesting idea. I'm not sure if it will work in this situation but it's something to keep in my toolbox.

Reply