Forum Discussion

mikihiir's avatar
mikihiir
Icon for Helper III rankHelper III
7 years ago
Solved

Did something change with SelectionId, the key looks different now

 

Hi, this.host.createSelectionIdBuilder() service is not working properly anymore for me, did something change with they key, it looks different now. Now there is somekind of identityIndex in it.

 

key: used to be something like this -> 

Key:"{\"data\":[\"{\\\"and\\\":{\\\"l\\\":{\\\"comp\\\":{\\\"k\\\":0,\\\"l\\\":{\\\"col\\\":{\\\"s\\\":{\\\"e\\\":\\\"qtEmergencyRecords\\\"},\\\"r\\\":\\\"Year\\\"}},\\\"r\\\":{\\\"const\\\":{\\\"t\\\":4,\\\"v\\\":2017}}}},\\\"r\\\":{\\\"comp\\\":{\\\"k\\\":0,\\\"l\\\":{\\\"col\\\":{\\\"s\\\":{\\\"e\\\":\\\"qtFacility\\\"},\\\"r\\\":\\\"Facility County\\\"}},\\\"r\\\":{\\\"const\\\":{\\\"t\\\":1,\\\"v\\\":\\\"Alachua\\\"}}}}}}\"]}

 

Any idea ?

 

  • v-viig's avatar
    v-viig
    7 years ago

    It looks good to me.

     

    What API version are you using? API 2.3.0?

     

    If so, I suggest downgrading API version to API 2.2.0 just to make sure it is not related to API.

     

    Ignat Vilesov,

    Software Engineer

     

    Microsoft Power BI Custom Visuals

    [email protected]

13 Replies

  • Ok found something very strange, when debuggin identity object looks like this 

    DataView looks like this 

    I am confused :)

    • v-viig's avatar
      v-viig
      Icon for Community Champion rankCommunity Champion

      It's expected change that was made as a part of performance optimization for Custom Visuals API 2.x.x.

       

      How are you generating a SelectionId?

      I'm asking because the key property is not required to generate a SelectionId.

       

      One possible break is with table and matrix mappings. You can have a look at this code sample to modify your code accordingly if you use table or matrix mappings.

       

      Ignat Vilesov,

      Software Engineer

       

      Microsoft Power BI Custom Visuals

      [email protected]

      • mikihiir's avatar
        mikihiir
        Icon for Helper III rankHelper III

        Hi, thanks for replaying

         

        This is how i create SelectionId ->

         

        I am using categorical mapping