5 Replies Latest reply on Feb 9, 2017 6:55 AM by Matt Coles

    allowed_recipient_addresses error in formula

    jens.bruckmann

      Hi,

       

      facing an issue with the formula in the VizAlertsConfig

       

      when I remove the // at

       

           IF [workbook_repository_url] + '/' + [view_name] = 'VizAlerts_RecipientTests/ToCC' THEN '.*'

               ELSEIF [subscriber_license] = 'Administrator' THEN 'mcoles@yahoo\.com|' + [default_allowed_recipient_addresses]

               ELSE REPLACE([subscriber_email], '.', '\.') // Period must be escaped in regex

               ELSE 0

               END

       

      I am getting an error saying

       

      Expected END at Character 1208 (which is the E of LSE 0)

       

       

      nevertheless I tried the part above

       

       

          //  IF [subscriber_license] = 'Administrator' THEN '***@hotmail\.de|' + [default_allowed_recipient_addresses]

              // ELSE [default_allowed_recipient_addresses]

              // END

       

      where I do not have an error but I do not get a mail to mail private email account. any Idea to this too?

       

       

      and do I find a more detail explanation as it is not really clear for me how this can look like when I would add other domains. I tried to understand the install guide and I thought it is clear but it is not clear how I can get the other domains like gmail or hotmail working

        • 1. Re: allowed_recipient_addresses error in formula
          Jonathan Drummey

          Hi Jens,

           

          Can you share a screenshot of the calculation editor with the error?

           

          Jonathan

           

          Jonathan Drummey - +1.207.831.9657 - jonathan.drummey@gmail.com <mailto:jonathan.drummey@gmail.com> - @jonathandrummey

          Tableau Zen Master and Forums Ambassador

          Follow @helpmedatablick for your @Tableau tip of the day

          • 2. Re: allowed_recipient_addresses error in formula
            Matt Coles

            What's the intent? If the subscriber is an Admin, then you can email a Hotmail address or any internal address, but if you're not, then you are only allowed to email internally?

             

            If so, it should be something like:

             

            IF [subscriber_license] = 'Administrator' THEN 'yourname@hotmail\.de|' + [default_allowed_recipient_addresses]

                ELSE [default_allowed_recipient_addresses]

            END

             

            ( I'm assuming that [default_allowed_recipient_addresses] is using something like '.*@yourdomain\.com' )

             

            The pipe character ("|") functions as an OR operator in regex. So by saying "yourname@hotmail\.de|.*@yourdomain\.com", you're saying "the recipient addresses must all match either "yourname@hotmail.de" OR end with "@yourdomain.com".

            • 4. Re: allowed_recipient_addresses error in formula
              jens.bruckmann

              Hi Matt,

               

              well at the end what I try is to send a standard pdf report to different users who do not have a Tableau License. They could be within our company or outside the company.

               

              With Administrator I think I got it I simply have fogotten my Role is Server Administrator and not Administrator. Nevertheless it is not really clear to me how I know can you VizAlerts with the reports I already have created.

               

              I hav the the VizAlerts trigger in my schedule and I have uploaded the VizAlertsConfig to my Server. But I really don´t know how to combine the excel file with the sheet I have

              • 5. Re: allowed_recipient_addresses error in formula
                Matt Coles

                Now that I look at the viz, I think the subscriber_license field isn't really very helpful, because it doesn't tell you when the user is an Administrator. So that example calculation I provided is not correct.

                 

                To work around this, your calc should probably hard-code the names of the administrators, or a project that only they can post in. Also, make sure you fix the ELSE statement on line 3 of your calc--it should be ELSEIF.

                 

                 

                     IF [workbook_repository_url] + '/' + [view_name] = 'VizAlerts_RecipientTests/ToCC' THEN '.*'

                         ELSEIF [subscriber_sysname] = 'jbruckmann' THEN 'mcoles@yahoo\.com|' + [default_allowed_recipient_addresses]

                         ELSEIF REPLACE([subscriber_email], '.', '\.') // Period must be escaped in regex

                         ELSE 0

                         END