3 Replies Latest reply on Jun 21, 2018 11:42 AM by Raleigh Chen

    Dynamically selecting a mark requiring a "Measure Names" value throws an "invalidSelectionFieldName" exception

    Raleigh Chen

      Hey all,

      My first post in these forums... not sure how active they are, so we'll see how things go


      I'm using the JS API to integrate Tableau visualizations with another framework and one of the things that needs to be enabled is the ability to select a particular mark dynmically (i.e. some other part of the application outside of Tableau automatically causes some point on the visualization to be selected).  I can get this to work fine as long as there's only 1 measure on the visualization, but when I do something where there's multiple measures, and attempt to select the a mark, it gives me this error:

      Exception$ {_message: "Measure Names", _innerException: null, _error: Error

          at new Exception$ (http://localhost:62618/aad/zen/mimes/sdk_include/com.designstudio.…, tableauSoftwareErrorCode: "invalidSelectionFieldName"}


      Here's the chart I'm using as an example to test the JS API.  Each of the 4 lines are different measures.  I'm trying to choose 1 point on the Backlog Pending (pink) line by using the following syntax:

      sheetObj.selectMarksAsync({"Measure Names":"Backlog Tickets",

          "MONTH(Open Ts)": 1501545600000}, tableau.SelectionUpdateType.ADD);

      Is there any kind of known issue with using a Measure Name as one of the Pair items for a Mark Selection action?