Skip to main content
July 28, 2023
Question

Scan substitution keys/merge fields(declared with ###) from word template and show on the interface

  • July 28, 2023
  • 5 replies
  • 0 views

Hi,

My requirement is that user can select already uploaded word template document(some substitution keys included in the template already) from a dropdown on a form.

After selecting, I have to scan all the substitution keys from the template and show in the grid on the same screen with 2 columns - field name(substitution key) and value(that will replace substitution key).

So, after submitting the form, the word document will be populated with those values. I know we can do this from process model with word from template smart service but my requirement is that substitution keys can vary in number. So, I have to get the values from the interface only.

5 replies

mathieud0001
July 28, 2023

I don't think the scanning part is possible. The best you can do is provide an inventory of pre-defined keys they can use in the word doc.

mikes0011
Brainy
July 28, 2023

The best you're going to be able to do is to offer them a variety of pre-loaded templates (and you can just store the substitution key strings somewhere else), and when they select one, launch a process model dedicated to the selected template.

July 28, 2023

The problem is we won’t have all the templates. It depends upon customer what they upload, name and number of keys.

Had it been one single template, we can handle that.

mikes0011
Brainy
July 28, 2023

Unfortunately there's no way to handle arbitrary replacement fields like this.  They all have to be pre-defined in the configured smart service node.  So your customer's assumptive requirements will, one way or another, need to be mitigated (or perhaps "expectations-checked") per the functionality that's actually available.