Little excel helpers for WEBCON BPS
Update 2024-07-06
Even so this post is from 2021, this content is still valid, but I want to make a two additions:
- Instead of using the provided way for the multilingual icons, you could use the function business rule.
- Over the years the advanced configuration of the choose field changed a bit. If pasting the value doesn’t work, configure the field manually, and copy the advanced configuration to the excel file. Then you can use it in the future.
Overview
This post will explain two excel worksheets I created for speeding up the creation of SQL commands while preventing errors. The other one is just a collection of template SQL commands for the most common cases.
SQL command for fixed values used in a picker field
At some point in time WEBCON BPS introduced the fixed value list, I’m not a fan of it, as you can read here. I prefer a simple SQL command using constants as Ids (1). In addition, I always use multilingual labels (2) and provide a value for Empty element display name
(3).
Depending on the number of options, it can take a few annoying minutes to set everything up correctly. I don’t like repetitive work so I “misused” Excel for generating the necessary SQL command. I only need to provide the ids (1), in this case unsaved process constants, and labels for each option (2).
Negative constant Ids: Any new, unsaved elements get’s a negative number, which ‘increases’ from -2 to -3. If you have the first one correct, you can just ‘increment’ it for the others. If you group the constants, you can simply use the same id, and right click on each in the designer, to select another one from the group. If you don’t know what I’m talking you can read up on it here.
Afterwards you can copy the complete SQL command form A19 (3) into the expression editor, remove the highlighted double quotes, which Excel adds automatically due to the line breaks characters in the cell. Depending on the situation the values of the constants need to be updated with the correct ones.
The only thing left to do is to open the xml configuration (1) and copy the content of A21 (2) into it and remove the leading and trailing double quote again.
The advanced configuration has default values for Empty element display names
, as well as activated multilingual labels.
The logic can be found in the downloadable excel file in worksheet “Choice field”.
Question: If anyone knows how to get rid of the leading and trailing double quotes I would like to know it.
Creating multilingual icon html tags
This helper simplifies creating SQL commands rendering Office UI Fabric Icons
with multilingual labels. As with the picker helper above, it will hurt more adding multilingual labels later, than doing it right from the start.
If you are in the need of something like this, for example if the traffic light indicator is not sufficient, you can use the work sheet ‘Multilingual icon’. You only need to select an icon (1), decide whether you want to render the icon title as a ‘label’ (2) and define the multilingual labels.
Afterwards you can simply the cell value from A16 (1) to the SQL command and remove the trailing / leading double quotes.
This is intended to be used in a case statement. If you want to use this as a simple column value, you need to provide a name ... end as ColumnName
Remark: The <i>
must be closed by a separate tag <i></i>
using <i/>
will cause unintended css side effects.
Remark: If you want to ‘replace’ the default indicator with icons, you should define a few global classes and use these. Coloring is not handled by the excel helper. You could add it of course.\
Sample classes for an extended traffic light indicator.
.overDue-Icon::before{
content:"\E7BA";
font-size:large;
font-weight:bold;
color:red;
}
.immediatlyDue-Icon::before{
content:"\E919";
font-size:large;
font-weight:bold;
color:orange;
}
.soonDue-Icon::before{
content:"\F0D0";
font-size:large;
font-weight:bold;
color:orange;
}
.enoughTime-Icon::before{
content:"\EA17";
font-size:large;
font-weight:bold;
color:blue;
}
.finished-Icon::before{
content:"\E73E";
font-size:large;
font-weight:bold;
color:green;
}
If you want to uses these classes in a report, you should take a look here and scroll down.
SQL Command templates
The worksheet SQL Command templates
contains just what you can expect. A selection of typical SQL commands which only need to be adjusted for the specific use case. If you are wondering, why I’m explicitly filtering the WFD_COMID
, which is the business entity id, there’s a simple answer. I once didn’t think of it which led to some unexpected results. Having this in the template, I will see it, and can decide whether I need it. The same applies to DET_WFCONID, which is more likely to cause problems. Everything will be fine when you start with one item list, after you added a second once, everything will break down.
Download
The excel file can be downloaded from this repository.
Direct download
Comments