3 Replies Latest reply on Jun 30, 2017 6:29 AM by Christian Berg

    Javascript in OBIEE Narrative to change Session Variable

    3467129

      I'm currently building a javascript map visualization in an analysis.  When a user clicks on a point on the map, I want it to change another analysis in a dashboard.

       

      How can I use the javascript I've placed in a narrative within an existing analysis to change the surrounding analyses on the same dashboard?  I.e., when a user clicks on a point in the JS generated map on NY, NY, I want to change the chart to the right of the map (another analysis) to only include data about NY, NY. 

       

      I assume this means that the JS code would need to change a session/presentation variable in OBIEE that could then be used to change the other analyses.


      From within a narrative, using Javascript, how can I change a session or presentation variable for a dashboard?

        • 1. Re: Javascript in OBIEE Narrative to change Session Variable
          Gianni Ceresa

          Did you already looked once at what your browser does when you load a dashboard page? Did you look at what happen when you change the value in a prompt which is going to reload analysis in the page with the new filter?

           

          If you didn't it's maybe time to give it a try ...

           

          Do not think OBIEE is a little simple webpage with just few pieces of HTML. Everything is driven by a huge set of javascript libraries, with events listener in all directions, with most of the actions firing ajax calls around doing things.

           

          What you ask is supported out of the box if you use the embedded map functionalities.

          It's also kind of simple if the click would navigate to a different page passing a parameter in the URL, even if you navigate to the same exact page by adding the clicked parameter in the URL.

           

          But if you want to make it without navigation, without reloading the full page, I guess you can plan few weeks of works for a half working solution ...

          And of course at each update/upgrade you will have the surprise to discover if your code still works or not as there is no guarantee things will not change.

           

          Have a look at what your browser does when you do something in OBIEE and you probably see why I'm highly suggesting you look for a different behaviour

          • 2. Re: Javascript in OBIEE Narrative to change Session Variable
            Daniel Willis

            Thinking out loud here.

             

            Could you use javascript to change a prompt (perhaps in a hidden section) which had a presentation variable attached. Hoping changing the selected value of a prompt with JS would kick off a refresh of the analyses.

            • 3. Re: Javascript in OBIEE Narrative to change Session Variable
              Christian Berg

              Totally crazy and novel idea: Why not use the tool as they are built and go for Visual Analyzer? Shocking to actually use the software you are already paying for, I know...

               

              And if you complain that you don't have VA because you're on 11.1.1.something - well next time include it in your question.