Skip to Content
Technical Articles

Launch “Search To Insight” in SAC Analytic Application

In SAC Story, “Search to Insight” option is available right at the top, however in case of Analytics Designer it needs to be configured and launched accordingly. In this blog, I have tried to give an overview of Search to Insights component and corresponding APIs available in SAC Analytic Application.

Search To Insight in SAC Analytics Designer:

The APIs for “Search to Insight” in SAC Analytic Application has been delivered with Q1 2020 release. Users will be able to fetch smart insights to their data by getting answers to queries using Natural Language Query Processing.

There are 3 steps for triggering “Search to Insight” in Analytic Application :

  • Enabling the underlying model for “Search to Insight” – In order to use the model for searching the details or querying, model indexing must be switched on from the model preferences. Indexing is the process by which all the dimensions and members of the model will be searchable in “Search to Insight” dialog window.

 

  • Creating SearchToInsight Component – In Analytic Application design mode, under the outline view, a SearchToInsight component has to be added while designing the analytic application. Once you add the component, you can configure it by associating the component with the underlying model (source for the dashboard):

 

  • Using Script to launch SearchToInsight –  Use SearchtoInsight_1.openDialog() script function to launch Search To Insight dialog. You can embed the script inside the button onClick function.

The syntax is as follow: SearchToInsight_1.openDialog(“Question”,mode, CleanHistory, autosearch);

Example:

In run mode, once you click on launch “Search to Insight” button, it will open the dialog with default query:

**You can keep the question as blank in case you don’t wish users to see any default result.

Apart from opendialog() script function, below are some of the other functions that can be used with Search to Insights:

applySearchToChart(question, chart) – Applies the Search to Insight result to a chart

closeDialog() – To close the Search to Insight Dialog window

getVariables(model_Id: string) – Returns the variable values stored in this Search to Insight component

 

Conclusion : In this way using scripting functions and a button, users can launch “search to Insight” in SAC Analytic Application via the API and get insights to their questions.

Reference :

https://www.sapanalytics.cloud/build-smart-analytics-app/

 

Regards,

Hemant

Be the first to leave a comment
You must be Logged on to comment or reply to a post.