Date or Range Widgets – The Problem
I wanted to create an interactive, multiple page dashboard like the one below:
The issue is that I wanted the same date widget to be accessible on every page as your user may want to modify the dates at any time. Typically, you can create all of the widgets (containers, numbers, charts, lists/dropdowns) on a single page and then select them to add them to other pages, as below:
The problem is you cannot do this with Date widgets. As of Winter ’19 (in a pre-release org) you get an error message that states: “Warning! Can’t clone Date or Range widgets.” hmmmm….OK
As the video demonstrates above, the “Add to Page” feature works fine for dropdown lists for use in faceting or bindings along with many other widget types but not for dates…
Workaround #1 – Clone Entire Page
If you are lucky enough to place the date widget onto the main page and set it up prior to creating your additional pages you can just clone the entire page and your date widget will be cloned (despite the error message) onto every page using not only the same step but the same widget (a linked widget just as you would expect).
Of course, this is only an option if you have not yet created your additional pages. In my opinion, it is the preferred workaround because it create a truly ‘linked’ widget and changes to the widget will not have to be manually replicated onto additional pages. Additionally, it is a no-code workaround which is another plus for many.
Workaround #2 – Update Steps
This workaround consists of creating a second, third, … (as many as necessary) date widgets for each additional page required in your dashboard. Then, you will update the JSON to point these new date widgets to the original step that the original date widget is using from page 1.
After creating the date widget onto the canvas, actually set up the underlying step by clicking on the “Date” link and selecting a dataset and date field. You can choose any date field because we will be updating the underlying step manually in a minute.
This step of actually setting up a step is necessary because you cannot drag the date step from the list of steps to the date widget.
Now that we have the original date widget and step from page 1 AND all of the additional date widgets on subsequent pages we CMD+E or Ctrl+E into the JSON!
Locate the original date widget and step from page 1 (you can also click on the widget prior to accessing the JSON and view the details there).
In this case I can see that my widget from page 1 is using the step “Last_Activity_1”. You will want to save this value because we want to update the date widgets from the other pages to also use this step. Once you have located the other date widgets and the steps they currently leverage you can update them.
I like to use the Find & Replace tool that is hidden until you CMD+F or Ctrl+F twice (that’s right, use the same keyboard shortcut twice in a row! Magic!). Now it’s simply a matter of finding the incorrect values and replacing them with the correct value.
Once I have replaced all of them (only the ‘Step’ values), the widgets are linked to the same step and the user can now update the date widget on any page and their selection will persist while navigating to any other page.
Have you encountered this before? I suppose a third workaround may be using code to actually add the same widget (linked) onto each page through JSON however this would be a lot more work for virtually the same result.
How long will we have to live without the ability to drag date steps to the widget or use the Add to Page functionality for date widgets? (Even though we can currently clone the entire page with the date widget included). Let me know your thoughts and your best Einstein Analytics workarounds in the comments!
Geoff Rothman
There is a much easier way to do this. Go to the dashboard page you want to add that date widget to. Then in the upper left hand part of the screen, click on the settings gear and then on the right nav panel that pops out, scroll to the bottom and find the widget name of the date widget you’d like to put on the page. Drag & drop it to the dashboard. VOILA! I would love to take credit for discovering this but Kaushik Ruparel was the one that told me about it.
SFDCr
Thanks Geoff! I haven’t had a chance to update this old post for the best workaround of all-using the ‘unused widgets’ section 🙂 Take care!
Sourav
Is it Possible to copy the widget from one page of dashboard to Other Page of another Dashboard
Jan v O
With the new advanced editor you can now add the widget to the second page and go straight to the advanced editor (so without adding a new step) and copy the widget syntax from the first widget into the widget on the second page. Then hit save and everything looks like you just cloned the widget via UI.
Pedro
Thanks so much Jan, you saved my life!