I have created a form that collects data, i.e Water Usage, Gas Usage, Electrical Usage. So I need to create a report that only displays the sections that have actual data from the form. So if there is no Gas for example, that section of the report template would be suppressed.
Thoughs?
Discussion posts and replies are publicly visible
as addition to stefans reply (regards by the way)you can check for "empty" values with the isnull() function.example: (please replace "label" with you actual label string and local!value with you actual local or rule input)
textfield( label: "label" value: local!value saveInto: local!value showWhen: not(isnull(local!value)) .... ) /* isnull() = true -> there is no value, isnull()=false, there is a value */
Sorry I was not clearer.
Let me see if this helps. I have created an interface for data collection and some of the ruleInputs will have values and some will not:
ri!waterSavings ($100.00)
ri!powerSavings null
ri!gasSavings ($50.00)
So on my Word template it might be something like attached, but I would want to suppress and text where the ri! might be null, in this
I would want the word "Power" to not show at all.
test.docx
hi allenp001How do you create this document?
Via XML function and word template? if yes:
Idea: add the word "power" to the value you insert. Not just the value itself.
So you insert instead of just "$50.00", you can insert a string of "power: $50.00"
possible via a combination of a if clause and concat() in your xml.
I just use Word, not an XML function?
what kind of smart service do you use?The following?
docs.appian.com/.../Word_Doc_from_Template_Smart_Service.html
Yes sir
You will need to remove the hardcoded "Water / Power / Gas" language from your template file, and instead, provide one replacement field i.e. '###allSavings###'; after this, you will assemble the text necessary to inject into that replacement field which will recreate your desired text along with linebreaks, for which you will need to use the special XML flavor known as "WordML"
Thanks Mike. Any tips on where to go to learn WordML or how to start?