Article published on the 5th of March, 2021.
Contents
1. Introduction
Displaying web controls in WorkPoint Express allows you to display e.g. maps or Microsoft Power Apps for entities in WorkPoint Express.
A use case for this feature could be adding a power app for companies in WorkPoint Express which can be used to display each individual company's location on a map, along with other entity details, or even possible button s to execute various WorkPoint actions from the Power App.
Another use case could be to add a web control which automatically shows a google search using the entity title as search query.
For information about how to create Power Apps for WorkPoint, please visit this article.
2. Requirements
There are no requirements associated with the use of embedded web controls in WorkPoint Express.
3. Configuration
In the following sections you will find a couple of examples of how to show web controls in WorkPoint Express.
3.1. Example 1: Showing a Power App
In this example we have developed a Microsoft Power App which shows a map indicating the location of company entities. For information about how to create Microsoft Power Apps, please visit this article.
We want this Power App to be usable when inspecting a Company on our solution in WorkPoint Express.
This configuration can be set up in the WorkPoint Express settings:
- In the WorkPoint Express interface, click the "Menu" button.
- In the menu, click "Settings".
- In the WorkPoint Express settings, go to the "System" tab.
- In the System tab, go to the "Embedded Web Controls" tab.
- In a new line, in the "Site" field, select the solution for which you wish to display the web control (in this case, the Power App). In this example, we select the "anm0011" site. Only sites added to the current WorkPoint Express solution ID are selectable here.
- In the "Business Module" field, select on which business module this web control should appear. In this case, the Power App displays information about companies, so we select the "Companies" business module.
- In the "Name" field, we can type in a name for the embedded web control. This will be the displayed name for the control in WorkPoint Express.
- In the "Link" field, paste in the link to the Power App in play mode. It is important to remember that if the Power App uses any WorkPoint fields, these need to be added in the link. For example, the Power App used in this example utilizes two Company fields: the Address 2, and the Email fields. Depending on the WorkPoint to Power App configuration, these field names can be customized. In this example, the Power App uses fields entitled Entity_Address and Entity_Email (The "Entity_" prefix indicates that the field is an entity field). These are then mapped in internal field names on the Company entities. The link given in this example is the following:
https://apps.powerapps.com/play/b4f48754-7a68-4a72-bc35-b0a07a81bd67?tenantId=0db2c88f-50f0-4bca-a5ae-6ad9fc3b0c65&source=portal&screenColor=rgba(0%2C%20176%2C%20240%2C%201)&Entity_Address={wpAddress2}&Entity_Email={wpEmail}
Pay special attention to the "&Entity_Address={wpAddress2}&Entity_Email={wpEmail}" part. This is where we tell the Power App to show the field with internal name of "wpAddress2" where the "Entity_Address" parameter is used in the Power App, and to use the field with the internal name "wpEmail" where the Entity_Email parameter is used.
- Once the configuration is complete, click the "Close" button. WorkPoint Express will prompt you to restart WorkPoint Express for the changes to take place.
Once WorkPoint Express is up and running after the restart, the web control now shows up on Company entities:
3.2. Example 2: Displaying a Google search of the Entity title
In this example, for each project in WorkPoint Express, we wish to display a web control which automatically searches google for the project title.
This can be configured in the WorkPoint Express settings:
- In the WorkPoint Express interface, click the "Menu" button.
- In the menu, click "Settings".
- In the WorkPoint Express settings, go to the "System" tab.
- In the System tab, go to the "Embedded Web Controls" tab.
- In a new line, in the "Site" field, select the solution for which you wish to display the web control. In this example, we select the "anm0011" site. Only sites added to the current WorkPoint Express solution ID are selectable here.
- In the "Business Module" field, select on which business module this web control should appear. In this case, the google search should be performed for Project titles, so we select the "Projects" business module.
- In the "Name" field, we can type in a name for the embedded web control. This will be the displayed name for the control in WorkPoint Express.
- In the "Link" field, type in the google search query. Here, we can use WorkPoint entity fields in the search query. In this example, we use the following link:
https://www.google.com/search?q={Title}
Note that in the google url, we have added "search?q={Title}". This tells google to perform a search for whatever comes after "q=". In this case, we have used to WorkPoint entity field called "Title". It is important to note that WorkPoint fields must be encompassed by curly braces. It is also important to note that you must use the internal name of the field. We could also have used e.g. the Project ID as a search query. In that case, we would instead type "search?q={wpProjectID}" after the google url.
- Once the configuration is complete, click the "Close" button. WorkPoint Express will prompt you to restart WorkPoint Express for the changes to take place.
Once WorkPoint Express is up and running after the restart, the web control now shows up on Project entities:
3.3. Example 3: Displaying a Google search for company CVR number
In this example, we will set up a custom link to a google search for companies' CVR numbers:
- In the WorkPoint Express interface, click the "Menu" button.
- In the menu, click "Settings".
- In the WorkPoint Express settings, go to the "System" tab.
- In the System tab, go to the "Embedded Web Controls" tab.
- In a new line, in the "Site" field, select the solution for which you wish to display the web control. In this example, we select the "anm0011" site. Only sites added to the current WorkPoint Express solution ID are selectable here.
- In the "Business Module" field, select on which business module this web control should appear. In this case, the google search should be performed for company CVR numbers, so we select the "Companies" business module.
- In the "Name" field, we can type in a name for the embedded web control. This will be the displayed name for the control in WorkPoint Express. In this case, we type in "Search CVR".
- In the "Link" field, type in the google search query. Here, we can use WorkPoint entity fields in the search query. In this example, we use the following link:
https://www.google.com/search?q=CVR+{wpCVR}
Note that in the google url, we have added "search?q=CVR+{wpCVR}". This tells google to perform a search for whatever comes after "q=". In this case, we have typed in a static query of "CVR" followed by a WorkPoint entity field called "wpCVR". It is important to note that WorkPoint fields must be encompassed by curly braces. It is also important to note that you must use the internal name of the field. We could also have used e.g. the company Account Number as a search query. In that case, we would instead type "search?q={wpAccountNumber}" after the google url.
- Once the configuration is complete, click the "Close" button. WorkPoint Express will prompt you to restart WorkPoint Express for the changes to take place.
Once WorkPoint Express is up and running after the restart, the web control now shows up on Company entities:
4. Notes
Note that when using WorkPoint fields in the web control links, you must use the internal field names.
Additionally, the internal field names must be encompassed in curly braces.
Remember that there is a difference between capital and non-capital letters in internal field names.
Comments
0 comments
Please sign in to leave a comment.