7 Replies Latest reply on May 23, 2019 4:30 PM by Jonathan Drummey

    Include 'All' in a filtered attachment

    Daniel Lawrence

      Hi all,

       

         For email attachment, I am sending out a Viz_PDF for each location determined by a filter.  The filter on the dashboard includes '(All)' as it is an included Tableau lambda function/setting, how can I include the (All) option when sending out PDFs?

       

      Thanks for any and all insights!

        • 1. Re: Include 'All' in a filtered attachment
          Jonathan Drummey

          Hi Daniel,

           

          I don't know the right URL parameter value offhand, my usual solution for views like this is to publish the view with either no Quick Filter or the Quick Filter set to (All), then when VizAlerts runs the default setting would be (All) and I could override that in the content reference when I wanted to. Would that work for you?

           

          Jonathan

          • 2. Re: Include 'All' in a filtered attachment
            Daniel Lawrence

            Jonathan,

             

              I am not quite sure I understand.  The view was originally published with (All) as default as can be seen below:

            VizAlerts Locations Snip.PNG

            but when I setup the vizalerts sheet with entries based on the Location Filter with this calculated field:

             

            'VIZ_PDF(GloveworxReporting/SummarySnapshotPage1' + "|filename="                    SUMMARY SNAPSHOT PAGE 1

            + STR(DATENAME('month', DATEADD('month', -1, TODAY()))) + ' '    (THIS PDF IS FROM A DIFFERENT VIEW AND BEING APPENDED TO THE MERGED PDFS BY LOCATION BELOW)

            + STR(DATENAME('year', DATEADD('month', -1, TODAY())))

            + ' Gloveworx Summary Snapshots'

            + "|mergepdf" + ')'

            +

            'VIZ_PDF(GloveworxReporting/SummarySnapshotPage2?Snapshot%20Location%20Filter='

            + (IF [Id (Reports Location)] = 4 AND YEAR(TODAY()) > 2019 THEN 'WTC'                                   SUMMARY SNAPSHOT PAGE 2

            ELSEIF [Id (Reports Location)] !=4 THEN [Snapshot Location Filter] END) + "|filename="        (WTC LOCATION RESULTS IN THE NULL BELOW BY DESIGN)

            + STR(DATENAME('month', DATEADD('month', -1, TODAY()))) + ' '

            + STR(DATENAME('year', DATEADD('month', -1, TODAY())))

            + ' Gloveworx Summary Snapshots'

            + "|mergepdf" + ')'

             

            VizAlerts email attachment snip.PNG

             

            I am receiving the correct PDF for:

            • The singular Summary Snapshot page 1
            • The Summary Snapshot Page 2 for Santa Monica
            • The Summary Snapshot Page 2 for Century City
            • It is correctly omitting Summary Snapshot Page 2 for WTC
            • Summary Snapshot Page 2 for (All) is not showing up as a data point in VizAlerts Email attachment area nor sending a PDF as the view default

             

            Am I missing something or would using the Filter as a determining factor for the number of data entries in VizAlerts be negating the ability to use the (All) as the viz default?

            • 3. Re: Include 'All' in a filtered attachment
              Jonathan Drummey

              Hi,

               

              The SummarySnapshotPage1 with no filter is getting pulled twice, then  SummarySnapshotPage2 (with the Santa Monica and Century City filters) is getting pulled twice.

               

              I’m guessing you’ll want one of those SummarySnapshotPage1 references to change to 2.

               

              Jonathan

              • 4. Re: Include 'All' in a filtered attachment
                Daniel Lawrence

                Correct me if I am wrong, but the above method is the way to get an appended pdf from one viz added to a merged pdf from another viz (so they are all merged)?  As it appears, the "mergepdf" command in combination with the "Consolidate Lines" command give me a consolidated/merged PDF of these three with no duplicates:

                • The singular Summary Snapshot page 1
                • The Summary Snapshot Page 2 for Santa Monica
                • The Summary Snapshot Page 2 for Century City

                 

                So far so good, exactly what I am looking for.  I just wanted to be able to add the Summary Snapshot Page 2 for (All).

                 

                I suppose my main problem is how to reference it in a calculated field for email Attachment so that it actually shows up as a data entry (alongside Santa Monica, Century City, etc...)

                It somewhat feels similar to a data scaffolding problem because I cannot seem to insert the entry for which it would be filled in the email Attachment field.

                • 5. Re: Include 'All' in a filtered attachment
                  Jonathan Drummey

                  Hi Daniel,

                   

                  I don't know exactly your data structure, however it's entirely possible to write a set of calculated fields to get what you want.

                   

                  In this case since you seem to know exactly the values that are needed my suggestion would be to not make this dependent on the data and in your alert just have one row that has one long calc that has all 4 of the VIZ_PDF() content references in it.

                   

                  Jonathan

                  • 6. Re: Include 'All' in a filtered attachment
                    Daniel Lawrence

                    So I ended up mixing a few things together to get it to work.  You were correct in saying that I should not make it dependent on the data for the (All) value but you also addressed it earlier in your first response and I did not quite grasp it at the time.

                     

                    This is my calculated field (combined with mergepdf and Consolidate Lines):

                     

                    'VIZ_PDF(GloveworxReporting/SummarySnapshotPage1' + "|filename="

                    + STR(DATENAME('month', DATEADD('month', -1, TODAY()))) + ' '

                    + STR(DATENAME('year', DATEADD('month', -1, TODAY())))                       Summary Snapshot Page 1

                    + ' Gloveworx Summary Snapshots'

                    + "|mergepdf" + ')'

                    +

                    'VIZ_PDF(GloveworxReporting/SummarySnapshotPage2' + "|filename="

                    + STR(DATENAME('month', DATEADD('month', -1, TODAY()))) + ' '

                    + STR(DATENAME('year', DATEADD('month', -1, TODAY())))                    Summary Snapshot Page 2 (All) - just referencing the default after uploading (All) as default

                    + ' Gloveworx Summary Snapshots'

                    + "|mergepdf" + ')'

                    +

                    'VIZ_PDF(GloveworxReporting/SummarySnapshotPage2?Snapshot%20Location%20Filter='

                    + (IF [Id (Reports Location)] = 4 AND YEAR(TODAY()) > 2019 THEN 'WTC'

                        ELSEIF [Id (Reports Location)] = 4 AND YEAR(TODAY()) <= 2019 THEN NULL

                        ELSE [Snapshot Location Filter] END) + "|filename="

                    + STR(DATENAME('month', DATEADD('month', -1, TODAY()))) + ' '                            Summary Snapshot Page 2 for all non-(All) locations (i.e. dynamic)

                    + STR(DATENAME('year', DATEADD('month', -1, TODAY())))

                    + ' Gloveworx Summary Snapshots'

                    + "|mergepdf" + ')'

                     

                    Thanks for pointing me in the correct direction!