I can’t get my head around this one. I wonder if a much smarter aimer can...
So here’s the scenario:
I’ve got a parent business object called ‘questionnaire’ that has a reference list called ‘questions’. Questions is actually a BO group and has different types of questions such as those with a numeric answer, yes no answer, a choice list etc.
Now the idea is that a staff member can configure a ‘questionnaire’ in the operation mode and they can create an infinite amount of ‘questions’. Once the staff member has the ‘questionnaire’ configured then a ‘customer’ can call it (duplicate via a process) and can then provide answers to the ‘questions’ contained there in.
With me so far? Good. That all works and no problems with that.
Now what I need to do, the part I’m struggling with, is I need to produce a word document for the customer to download once the ‘questionnaire’ is complete. I need the contents of that document to be dynamic and configurable in the operation mode by the ‘staff member’ in the same way that they can configure the ‘questionnaire’ in the first place. I need to have another reference list under ‘questionnaire’ that is called ‘recommendations’.
A ‘recommendation’ will need to be made up of some regular text and the answers to some or all of the questions from the ‘questionnaires questions’ in any manner as defined by the staff member.
For example a recommendation might read something like this when in the final document:
Because “one” of your children is “under 3 “ years old you must hire a child seat as well as a “size nine safety kit”.
Those words or phrases in double quotes are answers to the questions within the questionnaire.
So I guess I need some way to reliably pull the answer from any of the questions by creating some way in the operation mode for a staff member to create tags or links to those answers and be able to mix those tags with their own regular text. Once all that is set up I then need a way to parse all those tags and regular text into some attribute that I can then pass to ms word when creating the final document.
Any ideas???
Many thanks