Applies to version: 2020.1.x and above; author: Michał Kastelik
This article describes:
Read this article if you are interested in SharePoint workflows made easy by using WEBCON BPS.
Preparing the document library view
Additional columns have been added to the standard view of the document library:
The prepared view is as follows:
To add a start hyperlink to the workflow, select the “Start” column settings and then select the “Format this column” option.
Then paste the previously prepared JSON code:
{
“$schema”: “https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json”,
“elmType”: “a”,
“txtContent”: “=if([$Status]==’’,’Start WEBCON BPS!’, if([$Status]==’In progress’, ‘’,’’))”,
“attributes”: {
“target”: “_blank”,
“href”: “=’https://presentation.webconbps.com/BPSPortal/db/1/app/71/start/wf/145/dt/148/form?com_id=2&returnurl=%2Fdb%2F1%2Fapp%2F71&AttText1=’ + [$FileLeafRef] + ‘&AttText4=’ + [$ID] + ‘&AttText3=’+[$FileRef]”
}
}
Depending on the “Status” column value, a “Start WEBCON BPS” text is displayed in the SharePoint library view; there is a simple function here:
if([$Status]==’’,’Start WEBCON BPS!’, if([$Status]==’In progress’, ‘’,’’))”,
The WEBCON BPS workflow is started from the hyperlink that contains the following fields:
After moving to the next step, the workflow has the following actions defined:
If the value of the SharePoint document library form was updated, the Edit a list element” action was used. The configuration of the “Insert BPS link” action is presented below:
The ID field contains the instance ID from the SharePoint library to be updated.
Downloading the attachment and saving it in the workflow
A field that identifies the document in the case of an attachment download from the SharePoint library is the “Item URL” form field in which the [$FileRef] value is stored in the format „/Start BPS Library/SuperHero.png.” The missing part of the entire hyperlink is stored in the additional “Connection” field.
After executing all three actions, the attachment from the SharePoint document library is saved in the WEBCON BPS workflow. Also, the current workflow step is saved in the “Status” field on the SharePoint document list, the link to the WEBCON BPS instance is saved in the BPS URL field and the starting link from the “Start” field is hidden.
The WEBCON BPS form view:
The SharePoint document library view:
Starting a workflow by using the SharePoint list was described in this article -> Starting workflow by using the SharePoint list (webcon.com)