Iโve browsed the forum, and I have found examples that get me close, but not specifically what I need. Looking to the group for help.
Iโve got an 80+ question survey app, that users will return yes/no responses on, with photos as follow-ups to some of the questions asked. Iโve built a workflow that allows the user to โflagโ a survey and will generate an e-mail report with the results. Given the amount of data on the survey, I want only โnoโ responses to display on the report.
Currently, I use a Word template, with a table containing two columns, with expressions such as:
Column 1
<<If: [Question 1] = โNoโ>>
Question 1
<>
Column 2
<<If: [Question 1] = โNoโ>>
<<[Question 1]>>
<>
My issue, is that if they return a large series of โyesโ answers, then the PDF report (and e-mail), have large areas of blank rows, or condensed table lines. I would like to have a clean, dynamic table that only lists the values in the cells that return a match to the โifโ statement.
Perhaps an expression or a way to delete or hide the line if a โNoโ value is returned?
Any help would be appreciated!
Thanks
Try it by putting the IF statement on the same line as the previous ENDIF.
Hi @D.harrier
Would basing your template on a โnoโ Slice be any easier?
I was unable to get it to format correctly using the If statement on the same line as previous ENDIF, as the cell still is an empty value, and thus creates the โcollapsed lookโ
With regards to the slice, if I sliced the data to only equal the โnoโ values, then reported on those for the export, how would I add the photos that are optional for each of those results? They are reported in a separate column, such as [Question 1 - Photo].
Thanks
Ah, didnโt know you were putting it in table cells. Can I see a screenshot of that section of your template?
I donโt believe youโll be able to use a slice for this issue. Slices provide two functions
Neither of these are what you want, what youโre wanting is essentially to filter out certain columns if they are โNoโ
Thanks for the help again, see below example:
I would do something like this:
Unfortunately the cells wonโt be connected to each other this way. I suggest hard-coding the cell widths (right click -> table properties), and/or making the border colors white (or same as your background) to hide them.
Thanks for the reply. I attempted this, but I am still getting blank cells on the PDF report when a condition isnt met.
Perhaps we can look at this a different wayโฆ
Would it be possible to make the table only generate a line, IF the condition is true?
Please post your latest template.
Hi @D.harrier
Have you tried this
Youโll run into a similar issue using an IF expression as using an template-IF. Its all about how you enter in the line breaks and cells/table relative to where the expression is. Iโve successfully done almost exactly what I suggested above, without extra spaces/cells/tables. Iโm sure it is just a small formatting issue.
Although we could simplify the issue by having to only use one expression per column, like Lynnโs suggestion. Consider this template:
Notice that the line breaks are explicitly written inside of a text string, and I open the angle bracket expression on the same line as the previous, any line breaks inside the angle brackets are not read as line breaks in the output (except for the text string line break).
Thank you for your help!
I was able to get it to work, if I created individual table lines, similar to what you added above, but then the IF expressions were outside of each table row, like you have.
User | Count |
---|---|
41 | |
36 | |
30 | |
23 | |
16 |