1 2 Previous Next 22 Replies Latest reply on Jun 30, 2016 12:34 AM by Matt Coles Go to original post
      • 15. Re: Example: Subscriptions conditional on a successful Extract Refresh
        Matt Coles

        1. Yes, you're right--the "extra sheet" instruction isn't necessary, you can just use Extract Success. Sorry about that!

         

        2. No, it doesn't. So the viz that tells VizAlerts what to do, and when to do it, is referred to as the "trigger viz". The Extract Success sheet functions that way in this workbook. But in your trigger viz, you can use the "VIZ_IMAGE()" content reference to point to whatever viz you want, as long as you have access to it and it's on the same Site. So rather than:

         

        'VIZ_IMAGE(SubscriptionWorkbook/Subscription)'

         

        you could say:

         

        'VIZ_IMAGE(ARandomWorkbook/SomeOtherView)'

         

        ...and it would work just fine. As long as you have access to the data that tells you when a successful refresh happened, and on what workbook, you have everything you need.

        • 16. Re: Example: Subscriptions conditional on a successful Extract Refresh
          Taku Kato

          Thank you for clarifying!

           

          I am currently having trouble referencing the view to show up in the Email body via VIZ_IMAGE().

          The view I am basing my trigger on is located in the same site, but different Project.

           

          --Error Message

          Alert was triggered, but encountered a failure getting data/image references:

          Unable to render VIZ_IMAGE(Workbook/ViewName) with error:

          Unable to get vizdata from url http://localhost/views/Workbook/ViewName?&:format=png&:size=1500,1500&:refresh=y. Cause:

          --

           

          When I had the Subscription view and Trigger view in the same Project, it worked just fine.

          I just can't seem to pull views that are Project separated.

          • 17. Re: Example: Subscriptions conditional on a successful Extract Refresh
            Matt Coles

            Two possibilities I can think of off the top of my head...

             

            1. The project might be set to manage permissions at the Project level and you don't have the right access for exporting the image when it's in that project
            2. The path to the view may be slightly different since there were two versions of the same workbook at one point--when viewing the viz in Server, click Share then look at the link text, and make sure that's the exact name you're using in the content reference. For duplicate workbook/view names, Server will append "_0", "_1", "_2", etc to the end to make sure they're unique.
            1 of 1 people found this helpful
            • 18. Re: Example: Subscriptions conditional on a successful Extract Refresh
              Taku Kato

              Hi Matt,

              Thank you for your reply, I managed to get it to work.

              The problem was that I had a 'space' in between my View name, which I set because I actually did have a 'space' in the View name.

               

                   NG: VIZ_IMAGE(Subscription/Subscription View)

                   OK: VIZ_IMAGE(Subscription/SubscriptionView)

               

              Hopefully as my final question (many apologies and thanks),

              is it possible to use the 'Subscription Workbook' to track and send alerts based on multiple Views, or would I have to make a 'Subscription Workbook' for every View I want to track?

               

              For example: I have 2 views (A and B) that I want to track whether their extracts have been refreshed or not.

                                    I want to send an image of A to personA and B to personB when an extract is refreshed. Both View's are on the same

                                    Alert and Extract Refresh Schedule.

                                    In this case, would I have to create 2 separate 'Subscription Workbook' for each view I want to track?

                                    So basically the same procedure you taught me x2.

              • 19. Re: Example: Subscriptions conditional on a successful Extract Refresh
                Toby Erkson

                Takuya,

                In the future please ask new questions in a new post.

                1 of 1 people found this helpful
                • 20. Re: Example: Subscriptions conditional on a successful Extract Refresh
                  Matt Coles

                  Thanks for reminding us of good Community etiquette, Toby! I tend to forget that myself.

                   

                  Takuya: Yes, what you are asking is possible. You can send as many emails as you want with as many rendered Views in each as you want, and the rendered views can be from different workbooks, so long as they live on the same Site as the subscription workbook, and you have the right permissions to access them.

                   

                  The short-and-easy way to do this in your case is to simply edit the filter on Title in your workbook and add the other workbook to it, so that you see two lines of data (remove the date filter temporarily so you can see them easily), one for each workbook. Then edit your calc for the VIZ_IMAGE reference so that it dynamically pulls the name of the workbook and view in there, like:

                   

                  'VIZ_IMAGE(' + [Workbook Name] + '/' + [View Name] + ')'

                   

                  You'll notice there are no such fields in the connection right now. That's because the query I provided for this workbook is just an example and I didn't join to all the tables necessary to pull the info you need. If you want to proof-of-concept it anyway without taking the time to build out the connection, you can just build a quick IF THEN calculation to provide the proper path based on the Title value (not recommended for long-term use since you'd have to edit that calc for each new workbook you were doing this for).

                   

                  You will also need to make the Email To * field dynamic at this point as well, providing the logic necessary to display the right recipient for the workbook.

                   

                  Each line will be one email. If you want to get fancier and send multiple views from each workbook dynamically, you'll need to change the connection to show each view on a separate line, then use the Email Consolidate ~ field to consolidate the multiple lines into a single email. That functionality is more advanced, but well-explained in the User Guide document.

                   

                  One final thing. While it's possible to set this up to run for many Workbook/Views, I would not recommend doing so, because:

                   

                  1. A single VizAlert like this will fail entirely if even one issue is encountered.

                  2. The same timeout will apply to all attempts to render all Views for the email images...and some Views take longer than others. And if they timeout, that's bad (see #1)

                  1 of 1 people found this helpful
                  • 21. Re: Example: Subscriptions conditional on a successful Extract Refresh
                    Taku Kato

                    Toby,

                    Apologies for not doing so and thank you for reminding me.

                     

                    Matt,

                    Cannot even begin to describe how thankful I am.

                    Thank you so much for looking into this and helping me out!

                    1 2 Previous Next