DayBack URLs
Manipulating DayBack with URL Parameters
You can control DayBack by altering its URL and adding parameters as part of a custom action or button. In Salesforce Classic, this is often achieved by adding buttons to your Salesforce layouts. In Lightning, it's typically done when adding DayBack to a custom tab.
In FileMaker, you can pass URLs to DayBack using a FileMaker script or by setting global variables. Details are available here: passing URLs to FileMaker.
Creating a URL:
Options are passed as parameters in the URL. DayBack will execute URL instructions sequentially from left to right. Here’s an example URL that will:
- First deselect all calendar sources using
source=null
- Next, select the calendar named "Events" using
source=Events
- Finally, switch to the calendar to Month View using
view=month
Example Url:
https://app.dayback.com/#/?source=null&source=Events&view=month
Available Options
Here's a reference for the URL parameters you can include. Please note that all of these are case sensitive.
source | The simple example above included the source as a URL parameter so that DayBack knows to turn on the specific calendar you're interested in. Without this parameter, the event you're looking for could be in a source that is currently filtered out. If a source is not specified, the "Events" calendar may not be visible when you open DayBack. Note that the source parameter doesn't turn off any other calendars; it just ensures that the specified one is turned on. Format: To select multiple sources: To deselect all sources: |
date | Similar to the source parameter, specifying the date tells DayBack to navigate to the date you're interested in. Without this, DayBack might be focused on a different month, and you wouldn't see what you're looking for. Format: Important: Leading zeros are required in the date. Dates without leading zeros will not be processed correctly. |
id | The Format: |
view | This is the name of the DayBack tab you'd like to land on, like "Month". Format: |
resourceDays | Sets the number of days in resource view. Format: |
resourceColumns | Sets the number of resources to show per page in resource view. Format: |
sidebarShow | Determines if the left-hand sidebar is shown by default or not. Format: |
filterStatuses | Acts like clicking a status in the Status Filters sections of DayBack's sidebar Format: Multiple values are accepted like this: |
filterResources | Acts like clicking a resource in the Resource Filters sections of DayBack's sidebar. Format: Multiple values are accepted like this: |
resourceListFilter | Search within the resource list for resources with a particular name, description or tags. Learn more about filtering the resource list. Format: |
filterContacts | Adds a "Contact Filters" section to the filters tab of the DayBack sidebar containing any people's names passed in. Use the name of the contact here, not their id. Format: Multiple values are accepted like this: |
contactID | By passing a contact ID, any new calendar records created will be linked to this contact (as their "Related Who"). This is independent of filtering the calendar and requires the contactName URL parameter to be passed as well. Format: Only a single value is permitted. |
contactName | Required as part of passing in a contactID to be used when making new records on the calendar. Format: Multiple values are not accepted. |
filterProjects | Adds a "Project Filters" section to the filters tab of the DayBack sidebar containing any names passed in. You can send in any name that's the related "what" of a calendar item (a campaign, account, case, etc.). Format: |
projectID | When a project ID is passed in, any new calendar records created will be linked to this record (as their "Related What"). This is independent of filtering the calendar and requires the projectName URL parameter to be passed as well. Format: |
projectName | Required as part of passing in a projectID to be used when making new records on the calendar. Format: |
bookmarkID | When a bookmark ID is passed in, that bookmark will be loaded as if you had clicked to view it in the bookmarks menu. More details in the Bookmarks docs here. Format: |
filterText | Sets the text filter section of the filters tab in the DayBack sidebar containing the value passed in. Format: |
refresh | Simply refreshes the calendar Format: |
range | Sets the slider in Horizon view to the duration specified. Format: |
saveState | Setting this to false will prevent DayBack from saving any changes to the state. This is useful when using DayBack in an embedded record for example when you don’t want changes to the current date, view, filters to affect DayBack loaded in another window. Format: |
unscheduledShow | Setting this to true will ensure the unscheduled sidebar is set to a open visible state if unscheduled is enabled. Setting it to false will ensure that the unscheduled sidebar is set to a closed state. Format: |
unscheduledFilter | Setting this to a value will add that value as the filter text in unscheduled. To clear the filter value this could be set to null. Format: |
The headings names, like "Contact Filters" that get added to the Filters tab of the sidebar can be renamed to suit your business vocabulary. Learn more in the article on translation.
Base Parameters
Some parameters need to persist through refreshing the browser. The above hash parameters are cleared immediately after they're processed. Base parameters go before the hash #/
in the URL, and stay in the URL indefinitely.
Available Base Parameters
kiosk | DayBack supports "kiosk mode" as a base URL parameter for folks who want the calendar to run unattended on a large monitor as a whiteboard replacement. For example, this URL will refresh the calendar and update the focus to today every 10 minutes: Format: Full address example: https://app.dayback.com/?kiosk=10#/ |
language | Changes the calendar interface to one of DayBack's nine supported languages. Details here: translation. Format: |
extension | Renders the calendar in mobile view from desktop. Format: Note: For this to work in Salesforce you need to use the Custom App Action in item1: DayBackMobileDesktop.zip |
noLoader | Removes DayBack's logo from the calendar's loading animation. Format: Full address example: https://app.dayback.com/?noLoader=true#/ |
Changing URLs in FileMaker
In FileMaker, developers often create custom sidebars and manipulate DayBack using scripts and buttons. The simplest way to change DayBack's filters or views from these buttons is by modifying DayBack's URL using the syntax mentioned earlier.
Hash Parameters
To change URL parameters while on the same layout/tab as DayBack, use the "Set URL Parameters - DayBack" script provided with DayBack.
If you need to set the URL while on a different tab/layout before arriving at DayBack, set the variable $$DBk_UrlParameters
and then navigate to the calendar. Refer to the last two lines of the "Show Project in Calendar - DayBack" script for an example.
Special Characters
Most special characters in resource or status names should work fine. However, for names with ampersands in your resource or status names use the GetAsURLEncoded
function to encode the name before sending it to DayBack. For example, to toggle on the resources "Meet & Greet Room" and "James Falcor," use:
"filterResources=" & GetAsURLEncoded ("Meet & Greet Room") & "&filterResources=James Falcor"
Base Parameters
Base parameters will need to be added to the Web Viewer calculation. To add base parameters to the Web Viewer calculation, follow these steps:
- Set a global variable for the base parameter you want to apply (e.g.,
$$kioskMode
). - Add the following to your Web Viewer calculation, just above the line starting with
onLoadParameters = Case...
:
baseParameters = If( not IsEmpty ( $$kioskMode ) ; baseParameters & "&kiosk=" & $$kioskMode ; baseParameters );
You can do this for each base parameter that needs to be set in the calendar.