Using URL parameters to set filters and control navigation

Profitbase InFront supports a given URL format to control both initial filter states and the initial startup report/dashboard.

Startup control
When accessing InFront by using the base address

http://myserver/InFront

a lookup function will run that finds the report/dashboard matching the properties set on the first InFront role you belong to, and load (route to) this. The URL path in the browser will be changed to

http://myserver/InFront/#/dashboard/startupdashboard

if the startupdasshboard was found for your user.

However this an be overridden. Consider the following format :

Http://myserver/InFront/#/report/myreport

If you access InFront by hitting this address, it will override the function that found the “startupdashboard” and the “myreport” report will be loaded when you start InFront.

The important thing to notice here is that InFront should always be accessed by using the base address unless overriding the startup functionality is intended.

Controlling filter state
What is meant by this and what is the purpose? Well, being able to control the startup state of filters when starting the application gives the application a flexibility that can be exploited especially when starting InFront from another 3rd party system or when linking to InFront from another web page.

Setting filter members with uniquename
Consider the following url:

http://myserver/InFront/?filters=myFilterId:A,B,C

Here we can see that an URL parameter has been added :

 filters=myFilterId:A,B,C

The parameter ‘filters’ will tell InFront to look for a filter with filterId “myFilterId” and instantiate that filter with the filter members A, B and C. These values should be the ‘uniquenames’ of the members you try to set.

Setting filter members with search
Consider the following url:

http://myserver/InFront/?search=myFilterId,key:nn

The parameter ‘search’ with the given values will tell InFront to perform a a search in the filter with filterId ‘myFilterId’ for one or multiple members that has the value ‘nn’ as part of the ‘key’ member property value. The ‘key’ parameter can be omitted and if so, the search function will use ‘caption’ as default lookup property. The URL would then look like this :

http://myserver/InFront/?search=myFilterId:nn

In addition to this, the search value itself can contain matching syntax. If no matching syntax are found, the search will default to “contains”. So in the example given above the search function will match any members with property ‘caption’ that contains the value ‘nn’.

The following are examples of the other supported matching syntax.

StartsWith :     *nn      (notice the star)
EndsWith:     nn*         (notice the star)
Exactmatch:     =nn       (notice the equals sign)
StartsWith and EndsWith:     aa*nn      (notice the star)
Contains:     nn   (the default)

Notice this syntax is also valid to use in the search field of a standard searchable filter inside InFront. However the instantiation a filter at startup through this search functionality does not require the filter to be a searchable filter. It works just aswell on a filter that is defined to be a socalled ‘Browsable’ filter.

Exceptions
If you are using InFront in ‘Card mode’ all filters can be set through this technique. If you are not using card mode, there are limitations linked to the period/datepicker filter, other filters that are instantiated with values by the system during startup and also with filters using the the ‘filter on filter’ functionality. Be aware of this or else you will end up with unwanted behavior.

The reason for this is  that InFront runs the loading of the datepicker and default filter values and this evaluation of URL string parameters in parallel for best possible performance..

 

Creating Workbook Plugins – Conditional Execution of GenericAction

This is part 5 in the series about creating Workbook plugins for Profitbase InVision.

Part 1 : The Basics
Part 2 : Reading data using the Sql Script Web Service API
Part 3 : Writing data using the Sql Script Web Service API
Part 4 : Publishing events to the Workbook
Part 5 : Conditional execution of GenericAction (this one)

Download : Source code and sample database

In this post, we’ll walk through how to configure what to do when the GenericAction of a plugin is called.

Continue reading

Creating Workbook Plugins – Publishing events to the Workbook

This is part 4 in the series about creating Workbook plugins for Profitbase InVision.

Part 1 : The Basics
Part 2 : Reading data using the Sql Script Web Service API
Part 3 : Writing data using the Sql Script Web Service API
Part 4 : Publishing events to the Workbook (this one)
Part 5 : Conditional execution of GenericAction

Download : Source code and sample database

In this post, we’ll walk through how to publish events from a plugin, so that other components in the Workbook can react and do their thing.

Continue reading

Creating Workbook Plugins – Writing data using the Sql Script Web Service API

This is part 3 in the series about creating Workbook plugins for Profitbase InVision.

Part 1 : The Basics
Part 2 : Reading data using the Sql Script Web Service API
Part 3 : Writing data using the Sql Script Web Service API (this one)
Part 4 : Publishing events to the Workbook
Part 5 : Conditional execution of GenericAction

Download : Source code and sample database

In this post, we’ll walk through using the Web Service API of InVision to write data to the database. As I mentioned in Part 1, InVision is built using AngularJS, so some experience with that framework is required.

Continue reading

Creating Workbook Plugins – Reading data using the Sql Script Web Service API

This is part 2 in the series about creating Workbook plugins for Profitbase InVision.

Part 1 : The Basics
Part 2 : Reading data using the Sql Script Web Service API (this one)
Part 3 : Writing data using the Sql Script Web Service API
Part 4 : Publishing events to the Workbook
Part 5 : Conditional execution of GenericAction

Download : Source code and sample database

In this post, we’ll walk through using the Web Service API of InVision to read from the database. As I mentioned in Part 1, InVision is built using AngularJS, so some experience with that framework is required.

Continue reading

Creating Workbook Plugins – The Basics

In this short series, we’ll walk through creating a simple Workbook plugin.

Part 1 : The Basics (this one)
Part 2 : Reading data using the Sql Script Web Service API
Part 3 : Writing data using the Sql Script Web Service API
Part 4 : Publishing events to the Workbook
Part 5 : Conditional execution of GenericAction

Download : Source code and sample database

Profitbase InVision is built using AngularJS (1.0 right now), so some experience with AngularJS is required for building plugins.

You can download the source code and sample database for this demo from the link above. I won’t talk about how I built the UI since there’s nothing InVision specific about it, it’s just standard HTML, CSS and AngularJS.

Continue reading

Debugging custom Data Flow Item Class Libaries

This is the fourth and final post in a series focused on Data Flow development.

Probably the most important tool used while developing software is the debugger. The debugger lets you step through your code and inspect the state of your program during runtime, so you can see what’s actually going on.

This post will focus on how to debug your custom class libraries while they are being executed by the Profitbase InVision Worker. For information on how to deploy your assembly (build and copy to target folders), you should read Part 1 of this series.

Continue reading