3 Replies Latest reply on Apr 1, 2019 11:13 AM by Matt Coles

    "Consolidate Lines" and "Sort Order" Field Names

    Jolie Ngan

      Just to share some findings about Consolidate Lines and Sort Order.


      As the instructions on VizAlerts/user_guide.md at master · tableau/VizAlerts · GitHub  says field names are customizable, instead of using of "Consolidate Lines" and "Sort Order", I used "Consolidate Lines" and "Consolidated Sort" in my first VizAlert tab. The emails were sent with no problem. However, when I test the VizAlert in the 2nd tab of my workbook, which also uses "Consolidate Lines" and "Consolidated Sort", I received error message when I test it.


      Once I went back to the 2nd tab and changed "Consolidated Sort" to "Sort Order", the VizAlert went through with no problem.


      So the finding is: the field name "Consolidated Sort" worked in the 1st worksheet but did not work in the 2nd worksheet, although two worksheets have similar structure and similar fields.


        • 1. Re: "Consolidate Lines" and "Sort Order" Field Names
          Matt Coles

          The error you're getting is because VizAlerts found two fields in your data whose name matches a single defined property.


          There's a little funkiness there because we changed the field names a few versions ago to make them more generic (as we wanted VizAlerts to do more than just emails). But, we also wanted the new version to be backwards-compatible with everyone's previous alerts. You can see the regex patterns used to match the fields in this portion of the code:


             # General
             # consolidated and sort have backwards-compatible options for v1.x
             self.action_field_dict[GENERAL_SORTORDER_FIELDKEY] = \
             self.action_field_dict[CONSOLIDATE_LINES_FIELDKEY] = \



          So your two fields are being matched like so:


          Email Consolidate Lines - Closed C/R

          Email Consolidated Sort Order - Closed C/R


          So, just rename the second to "Sort Order - Closed C/R" or something similar, and it will work fine. Just make sure "Sort Order" comes first--the rest doesn't matter.


          Does that answer your question?

          • 2. Re: "Consolidate Lines" and "Sort Order" Field Names
            Jolie Ngan

            My question was: why the naming worked in the first worksheet but failed in the second worksheet in the same workbook...? I would think if the naming does not work, then it shouldn't have worked in the first worksheet either as it has both "Consolidate Lines - xxx" and "Consolidated Sort - xxx" as well. Yet, it worked in the first worksheet -- the VizAlerts went out with no errors... That's what confuses me. If it didn't work in the first worksheet, I would have figured it out earlier...

            • 3. Re: "Consolidate Lines" and "Sort Order" Field Names
              Matt Coles

              That I can't answer without seeing the logs. My guess is that there was something different between them, somehow.