Skip to main content

Selection Binding using Static Step

Welcome to this new blog. Today we will look how to create selection binding using static step

For this exampe we will use a Toggle widget which will consist of values that we will be adding to the static steps.

Let's get started..

  • Create a new lens and add it to the dashboard as a step. Okay there are couple of ways to do this 
    1. Click on the dataset this will open a new lens. Change the grouping and filter and select clip to dashboard. This will open a new dashboard tab.
    2. From the Einstein app click on create blank dashboard then select create step/create query, select the dataset and apply the necessary grouping and filters and click done.
         In this example for the bar length we will keep the count of rows and for the bar (Grouping) we will select Account Type                                                                           
                                                               
       

  • Drag the step that was created as part of creating the lens in step 1 from the right side panel onto the dashboard this will display a chart. Drag the corners of the chart to increase the size of the chart.                                                                                                                                          
  • Drag the toggle widget from the left panel onto the dashboard above the chart. If there is no space above the chart press shift while dragging the toggle widget the chart will automatically shift downwards.                                                                                                                                   
  • Drag the static step which we had created in step 2 onto the toggle widget. This will show all the values from the static step as a toggle.                                                                                       

  • At this point of time you can preview the dashboard and try toggling the values, but nothing will happen. We need to bind the values with the chart so that when we click the toggle the chart will get filtered accordingly.                                                                                                    
  • Let us now see how to do the binding. We call this selection binding as the binding happens only when we do a selection/interation with the widget. To do this we have to grab the selected value and pass it to the chart. Okay let's see how this is done. This cannot be done using point and click as of now. We have to change the source file and inorder to do that we have to switch to the source code view. How do we do this? well that's really easy, while you are in the dashboard click CTRL+E this will switch to the source code view.                                 
  • Next step is to search for the step name created in step 1, to do this press CTRL+F and enter the step name. Inside this step search for the follow grouping  "groups": [   "Account_Type"] and replace it with "groups": "{{column(Static_1.selection,[\"value\"]).asObject()}}"  and that's it of you now preview & click on the toggle you can see that the grouping has changed.   
  •  Okay so let's look at what the syntax says. so we write binding expression in double curly braces {{}}. The column(source,[columnNames,..]) function returns column of data as 1-D array from the source. In this case the source is that Static Step which we have binded to the toggle. The Static_1.selection gets the selected column and the column name in this case is value the \" is used for escaping double quotes in json file.
Final Dashboard 


















Comments

Popular posts from this blog

Create Static Step in Einstein Analytics Dashboard

How to create static step in Einstein Anlytics Dashboard ? You got the question right? today we will look at how to create static step in dashboard. Let's get started.. Once your on the Dashboard page click C reate Step button from the right sidebar. If your not able to see Create Step button click once inside the dashboard This will show a new pop up select  Create a Static Step with Custom Values. This will again open a new pop up for creating static step. Provide the name for the static step  & values of static steps.  Each static step value consist of the Display & the Value. The Value will be the actual column name from the dataset or the actual value you would like to provide to do sorting & filtering on the data.  The Display is the text that would be visible to the user You can see the new step being added to the dashboard. You can then use this step with Dashboard widgets like Toggle, List etc. Hope this will help...

Salesforce CPQ : Create Multiple Orders from Quote

1.     Go to Installed Packages 2.     Click on Configure next to Salesforce CPQ Package 3.    Check  Allow Multiple Orders checkbox under the Order Tab 4. Populated the Order By field on the Quote before creating Orders from Quote 5. Create Orders by clicking Ordered check box. 6. Check that multiple orders are created on the Quote.