Articles about European Sharepoint Hosting Service
Posts tagged SharePoint 2013 Hosting belgium

SharePoint 2013 Hosting – HostForLIFE :: Two Level SharePoint Designer Workflow In SharePoint Online
Mar 24th
In this article, we will see how can we create a two-level approval workflow in SharePoint Designer 2013 workflows.
Let’s understand the process first,
The process starts by the initiator, who can apply for a request by entering some details which triggers an email to the approver automatically by notifying them to take action on the pending task. The approver can review it and verify all the details which were submitted by the initiator by clicking on the link that is provided in the same mail trail. If he wants to approve it, he can simply click approve button else if he wants to reject then he can click on the Reject button.
If Approver rejects the request then the request doesn’t process for further Approval and the requestor will get a notification mail in which notifying that your request is rejected. But if the request is approved by the first-level approver then the second-level approver receives an approval mail with the same details that were submitted by the initiator and he can take any action by clicking Approve & Reject button. An approver action notification will be sent to the initiator.
Let’s start and create a custom list named “DemoList”. The following columns need to be created- Employee Name, 1stManager, 2ndManager, Start Date, End Date, Leave Type, etc. Now open your SharePoint Designer & click List Workflow and choose your list.
After the naming of the workflow & Select SharePoint 2010 or Select SharePoint 2013 Workflow. And click the ok button.
Kindly select “Find Manager of current user” Action.
Click on this user and select Current Item & Created by & in the output select variable 1stManager.
Same as the previous step again select “Find Manager of current user” Action. Now choose the 1stManager variable and in output 2ndManager as shown in the figure.
Select “Log to in the history list” action. This will be useful for troubleshooting or debugging purposes.
Now Select Action “Start Approval Process on Current list with users”.
Select the user whom you want to assign the task, and select variable manager1st as here we want to assign the task to the manager. After setting the user in that respective variable which will be shown in the below images.
Note
I will suggest you assign task to a user who is available in your tenant as we can’t assign task outside the domain.
Click on Approval (approver) which will redirect to a new window which is given below
Click on Change single task Behavior.
Select set workflow variable action in both places as shown above.
Set to yes in the upper one and set No to in a lower step which leads to the status of the workflow.
Now Log it to the history for logs.
Now select action If value equal value & click on value
In the data source, Select Variables & parameters, and in Filed Source to IsItemApproved
Now click on values and make the value yes after that click ok button.
Choose action Start Approval Process same as the earlier step, current item and user to whom you want to assign the task. Here we will 2ndManager variable.
I will suggest you to assign the task to a user who is available in your tenant.
Now we log the message to the workflow history and click on ok button.
Now Triggered the workflow manually and automatically or when the item is updated as per your requirements.
After that make a step and named it Workflow Ends. Select action Stop the Workflow and log it Workflow Ends at this Step.
Last but not least publish the workflow.
Now we will check our Workflow and output example is given below,
Go into the list and add a new item in the list.
Approver gets a mail like this, in which he has to click on Review “Regarding Leave on 28th of January”.
User can Accept or Reject the request.
This is the out-of-the-box mail format that the user will receive when the approver will take any action on his request. We can also change the mail body.

SharePoint 2013 Hosting – HostForLIFE :: Customize Modern SharePoint List Forms using JSON
Mar 16th
We usually use SPFx or Power Apps to customize the forms in SharePoint online. This article will show how you can customize an out-of-box SharePoint list form using JSON. You don’t need to customize the form using SPFx or Power Apps. Some simple JSON can be used to customize the header, footer, and body of the SharePoint list form. You can create different sections inside the form body and apply some validations to show and hide form fields based on the value of other form fields. The advantage of these JSON customized forms is that they are responsive by default. You don’t have to do any work to make these forms responsive. So, you can use the same form in desktop and mobile.
Create a custom list
Create a custom list using the template ‘Work progress tracker’. I have used this template for my example. You can use any other template or create your own custom list based on the requirement.
When you click on the ‘New’ button of the list, this is out of the box new/ edit form for the list. There is no customization. All fields are visible, as shown in below image.
For our example, we will create a new column, ‘Manager’ for the manager of the assigned user. We will show this field only if a work item is ‘Critical’ in priority.
Show/Hide form field based on conditions
We have a requirement to show the Manager field in the form only when Priority is Critical. To apply a conditional check to show/hide the Manager field, click the New list button to open the list form. Click on Edit columns from top right options available in New form.
Select the Edit conditional formula for the Manager field in the context menu of the field.
You will see below a blank screen to add your formula for the field.
Formulas are equations that perform conditional checks on column values in a list or library. A formula starts with an equal sign (=) followed by the if the function that returns either a true or a false result.
For example, the following formula checks if the value for the Priority column is Critical:
=if([$Priority] == ‘Critical’, ‘true’, ‘false’)
Returning true results in showing the column on the form, while returning false hides the column.
Below is our custom formula based on our requirement to show/ hide the Manager field.
Once you add your formula for the field, your field will be greyed out. This indicates that this field has some custom formula applied to it.
We need to save these changes to apply this formula to the field. Click on the Save button to save the changes.
Reorder fields on the form
We can reorder columns fields of the form. Here we will shift Manager near the Assigned to field. Whatever field you want to move, drag and drop the field to your desired location. To save the changes, click on the Save button.
Test the changes
Now you have reordered the form fields and applied conditions to show/ hide the Manager field based on the selected Priority. Let’s test this by creating a new item in the list and selecting different priorities.
As you can see in the image above, the Manager field is visible when Priority is Critical.
When you change Priority from Critical to anything else, the Manager field is not visible. In the above image, we have selected Priority as High. So, the Manager field is not visible.
Add sections to form body
Now we want to arrange form fields in different sections like Work item details, Status details, and Assignment details. We can do this with the help of JSON without doing any customizations.
To add sections to the SharePoint list form, click the New button to open the form and select the Configure layout option from the options in the top right corner, as shown in the image below.
You will see options like Header, Body, and Footer in the Format window. You need to select Body.
You must add your JSON in the Formatting code field in this window.
Copy the example from the link and modify it according to your requirements:
For our example, JSON will be like this. Here we are adding 3 sections to the form: work item details, Status details, and Assignment details. We have specified fields also inside each of these sections. You need to specify the field display name for each field inside the section to regroup this fields inside sections.
Click the Save button to save these changes and regroup fields of the form in different sections. After saving these changes, you will see the changes when you click on the New button to open a new form.
As you can see in the image, all three sections are separated with horizontal line and have section headers. If you see JSON, we have one empty section in the last. This section holds all those fields not included in any of the above sections. Here blank section has the Attachments field.
Now if you edit form columns from the top right option available in New form, you can see all the fields grouped in different sections. You can also reorder or move these fields from this screen.
Customize Form Header using JSON
In the New form Configure layout, select Header in the Format window as shown in the below image.
You can copy the code provided in this link and change it as required. You can change text and icon etc., which is visible in the header of the form.
For icons, you can use any Fluent UI Icons from this link: https://developer.microsoft.com/en-us/fluentui#/styles/web/icons
For my example, I select the WorkiIem icon, as shown in the image below.
Final JSON code for my example:
After adding JSON, when you try to edit any item, the header will be visible as in the below image. This has the Icon we changed for WorkItem and has our custom text with the value of the Work item field (which is the Title field internally). We have to use the internal name of fields in JSON.
Customize Form Footer using JSON
In the New form Configure layout, select Footer in the Format window as shown in the below image.
You can copy the code provided in this link and change it as required.
JSON for the footer:
You can see the footer shown in the below image.

SharePoint 2013 Hosting – HostForLIFE :: Use Of Text Web Part In SharePoint Online
Mar 10th
In this article, we will discuss the use of Text Web part in SharePoint Online. This web part allows adding text content, images, pictures, table, and hyperlinks to the page, along with various formatting options.
Adding Text Web part in SharePoint Online Page
1. For inserting the Text Web part in the Site Page, click on Edit on the top right of the page to put the page in edit mode. Click on the + circled icon and select the Text web part. Click on Text and insert the web part.
2. After inserting the Text web part, the formatting toolbar along with the Text box will be displayed as under:
The formatting toolbar contains options such as Move Web part, Duplicate Web part, Delete Web part, Font Style, Font Size, Font Color, Highlight color, Bold, Italic, Underline, Right, Center, Left, Justify Alignment, Bulleted List, Numbered List, Increase Indent, Decrease Indent, Insert Table, Insert Image, Strikethrough, Hyperlink, Remove Link, Superscript, Subscript and More Styles.
3. Enter the desired text and format it using the formatting toolbar. To view more formatting options, click on the ellipses (…) on the right side of the toolbar. It will open the Text and Table Formatting panel on the right side of the screen.
4. The options in Text and Table formatting are similar to the Formatting toolbar options as mentioned above.
5. The font style and font size available are as follows:
6. Insert Image in Text Web part
- Click on Insert Image in the formatting toolbar. A dialogue box with various options to insert images such as Recent, Stock Images, Web search, OneDrive, Site, Upload, and From a Link will appear. Select the relevant option and insert the image.
- Once the image is inserted, it can be formatted using various options such as:
- Change Image: On click of Change Image option, the properties panel on the right side of the screen will be displayed providing us an option to change the inserted image or insert a link on the image or use the alternative text to describe the image.
- Alignment – Inserted Image can be aligned right, left, or center.
7. Insert Table in Text Web part
- Click on the Insert Table icon in the formatting toolbar or click on the Insert Table option in the Text and Table formatting panel to insert a table in the Text Web part:
- Table with 3 rows and 3 columns will be inserted in the Text Web part.
- The inserted table can be formatted using various available options such as Table Styles, Insert and Delete (To insert or delete rows, columns or entire table) and Table Alignment (Left, Center, and Right)
This is how we can use the Text Web part in SharePoint Online.

SharePoint 2013 Hosting – HostForLIFE :: Use Of Image Web Part In SharePoint Online
Mar 2nd
This blog describes the use of the Image Web part in SharePoint Online. It allows us to insert an Image on the page from our device or the web.
Adding Image Web part in SharePoint Online Page
To insert the Image Web part in the Site Page, select Edit on the top right of the page and put the page in edit mode. Click on the + circled icon and select the Image web part. Click on the Image and insert the web part.
After inserting the web part, the following default options for inserting the image will be displayed:
Select the relevant option and insert the image.
Once the image is inserted into the page following editing options will be available,
- Resize
- Crop with a free ratio
- Aspect Ratios
- Alignment
- Save
Caption can also be inserted for the image.
Click on the Edit Web part button on the top which will open the property panel on the right of the page displaying the following options:
- Change – Option to change already inserted image.
- Link – Adds a link to the image. On click of the image, it navigates to the link.
- Add Text over the image – Adds Text over the image similar to the caption. It appears on top of the image.
- Alternative Text.
This is how we can use the Image Web part in SharePoint Online.

SharePoint 2013 Hosting – HostForLIFE :: Getting Site Users Report Using PnP PowerShell
Feb 23rd
Recently, I have been tasked with getting the site user’s report in SharePoint sites in our organization Tenant. There are tools and other ways to get it. Here I have used PnP PowerShell version and the concept of PS Custom Object to achieve this task. In this article, we will see how to get the Site Users report using PnP PowerShell and PS Custom Object.
What is PS Custom Object?
This is a new property introduced in PowerShell 3.0 version and above, which helps in creating structured data, and with this data it makes it easier to
- Query the data
- Import and export the data
- Storing the data while working in a session
The details about PSCustomObject is nicely explained by Kevin in his blog and I would highly recommend checking it.
Pre-Requisites
Before proceeding you need to have the following configurations.
- Access to your organization tenant as SharePoint Admin or Global Admin or access to the sites as Site Collection admin where you want to get the site user’s report
- PnP PowerShell module installed. Please investigate the references section on how to install the PowerShell module.
Steps
Please follow the below steps to get the site user’s report.
Step 1
Connect to the SharePoint site
Step 2
Get the Permission Groups in the SharePoint site.
Step 3
For each user in Group get the required information and write to object. Here I am only getting Email, PrincipalType, Title, LoginName
If you are interested in getting additional properties you can also add them. By default, it gets the following properties, which can be found by querying a member with select * parameter.
Step 4
Export the object data into CSV.
Validation
Below is the input format of the CSV file.
Below is the output CSV after the script run completes.
Below is the complete script

SharePoint 2013 Hosting – HostForLIFE :: Create Lookup Field In Existing SharePoint List Using REST API Schema XML
Feb 10th
In this article, we will learn how to create a lookup field in an existing SharePoint list using REST API and schema XML. The REST API enables us to communicate with SharePoint using standard HTTP methods, such as GET, POST, PUT, and DELETE. The API provides access to various SharePoint entities including lists, libraries, and sites, allowing us to retrieve data, create and update lists, fields, items, upload files and manage user permissions.
Prerequisites
- Access to a SharePoint site with permissions to create lists and fields
Below are the steps,
Step 1. Create a lookup list
The first step is to create the list that you want to be the source of the lookup field. I will use the “Department” list with the “Title” column as a source for creating the lookup field in this demo.
Step 2. Create a new list
Create a new list and use it to create a multiselect lookup field by using the lookup list created in the previous step as its source.
Step 3. Create REST API request body
For creating the multiselect lookup field using the REST API, we need to define the request body for the API call. This body will contain the schema XML for the field, which must include the following properties:
- FieldType: Specifies the type of the field. For multiselect lookup fields, the value should be “LookupMulti”.
- Name: The internal name of the field.
- DisplayName: The name of the field as it will be displayed in the list.
- Required: Specifies whether the field is required or not.
- List: The ID of the lookup list.
- Mult: Specifies that the field is a multiselect field.
- ShowField: The name of the source field from the lookup list.
Step 4. Make the REST API Call
With the request body defined, you are now ready to make the REST API call. You can use any REST client to make the call, such as Postman. The REST API call should be made to the following URL:
The request should be a POST request and the request body should contain the schema XML defined in the previous step.
Output
After making the REST API call, you can verify that the multiselect lookup field was created by going to the destination list’s settings page and checking the list of fields.
List view