SharePoint Column Formatting – hide Title column and use JSON to show View and Edit buttons in any column

It’s not always convenient to use a default Title column that comes standard with a newly created SharePoint list. PowerApps form can take care of it and add some logic to it but it is still a Single line of text column. To make it even more complicated to remove, that Title column ties to a "view/edit an item" link. If you still want to get rid of it and not lose any functionality you can use a simple JSON code below: { "elmType": "a", "txtContent": "@currentField", "attributes": { "href": "='https://contoso.sharepoint.com/sites/dev/Lists/TestList/DispForm.aspx?ID='+[$ID]" }, "style": { "padding": "10px", "font-weight": "bold" } } However, this method has quite a few downsides: when closing a form, it redirects to a Default view (it is possible to specify which view to go but that might be a lot of hard-coding depending on how many views you have); the link is hard-coded; does not seem to open "modern…

Continue Reading

Microsoft Flow – archive SharePoint List data into a single Excel file

This post is about a quite simple task to achieve - archiving SharePoint List data into a single Excel file that is stored in a Document Library. I think it is important to go through this process to show the basics and have it as a prerequisite for a more complicated process - archiving data into multiple excel files. There are several reasons why one would archive data into Excel: excel file is easy to move or share; it is very fast to work with (no paging, no 5000 item limit view threshold). Let's create a SharePoint List with different types of columns (single line text, date, number, choice): Then we add a few test items: After that we create a Document Library and put an Excel file into it: That Excel file should have a table in it and the same columns as our SharePoint List. The formatting of…

Continue Reading

PowerShell – change the storage space for a specific user’s OneDrive

As an admin you can easily make an adjustment of a OneDrive storage limit for all users through a OneDrive admin center. If you need to do the same for a specific user, here is a Microsoft article that describes that - https://docs.microsoft.com/en-us/onedrive/change-user-storage Truth is, it only takes a single line of code to make an adjustment; however, my script below takes care of most little things, requirements, and inconveniences: you only need an email address of a user; the minimum size of allocated space is 1 GB; the maximum size is 5 TB. $email = Read-Host "Please provide an email address of the user" $convertedemail = $email -replace "\.","_" -replace "@","_" $partofthelink = "-my.sharepoint.com/personal/" + $convertedemail $onedriveurl = Get-SPOSite -IncludePersonalSite $true -Limit all -Filter "Url -like $partofthelink" $onedriveurl Do { Try { $num = $true [int]$sizegb = Read-Host "Please specify the size of OneDrive storage space to be set…

Continue Reading

PowerApps – enhance Combo Box search functionality

Even out of the box PowerApps is a great tool that provides lots of functionality. Way more than InfoPath could. However, most of the time with very few adjustments it is possible to achieve even more. A great example would be a Combo Box and its search ability. Let's create a SharePoint list with a Choice column and these values: It doesn't really have to be a Choice column, you might as well use a Lookup column. When a PowerApps form is created, the studio creates a Data Card and a Combo Box control associated with that Choice field. Let's see how the search in that Combo Box works and why it is limited in its current state. Note how it finds BK but doesn't find Black. The search has a StartsWith behavior. What if it is necessary to search for a word regardless of its position. Well, that's very easy…

Continue Reading

SharePoint – enable or disable Share option per each library within a site

This post is about how to enable or disable Share option for each library within a SharePoint subsite. There are different suggestions that worked for some but didn't for the others in this stackexchange topic - https://sharepoint.stackexchange.com/questions/208090/how-do-i-disable-get-a-link-share I found a way to control it by adjusting Access Requests Settings and Permission levels. Unfortunately it's almost impossible to find any documentation on what each Permission option does. Let's see how it all works together. Microsoft is known to change things down the road, so the settings that work today might not in the future. Please test everything before moving forward in your production environment. So here is a test subsite with two document libraries: The first requirement is Allow members to share the site and individual files and folders must be checked: Second, on your main site within a site collection you need to create a copy of the Contribute permission level, name it Contribute…

Continue Reading

PowerApps – 3 different ways to implement currency input mask

As far as I know at the time of this post PowerApps doesn't have an Input Mask (currency mask in this particular case) feature. It is possible to mimic that feature using Text function but implementing it is not really straightforward and gets even more complicated if you are dealing with PowerApps integrated with SharePoint. In this post I will show you 3 different ways of implementing a workaround for a currency input mask, each has its own pros and cons: The currency mask formatting is not visible until you submit the form (the simplest). You can see the mask formatting even before submitting your form but you need to click away from the field to see the formatting (medium complexity). The currency formatting is applied real time as you type in the numbers (the most complicated but the most natural way of working with currency). Let's create a testprice…

Continue Reading

PowerApps form in SharePoint – show values of Created and Created By before item submission

I am huge advocate of using as few columns as possible when building PowerApps forms in SharePoint. Let's take a look at a very simplified example - a custom Requests SharePoint list.  It surely has to have fields like: Requested By (a user name here) Requested On (a date and time here). So rather than creating two more columns and populating them with values, I would highly recommend using columns that already exist in SharePoint - Created and Created By. The downside of these columns is they don't have values until a user submits the request. Because of this it might be not the cleanest user experience if you decide to use and show those fields. There is a simple way to prepopulate those fields with values that will be exact (user name) or very close (date and time) to the ones that will appear after submission. Let's create a…

Continue Reading

PowerApps – using Checkbox controls with Multi-Valued Choice columns

At some point Microsoft PowerApps Team added support for fields with multiple values through a Combo Box control. However, as of this moment (2/3/2019) there is still no native support for Checkbox controls even when you configure your Choice column in SharePoint to have Checkboxes (allow multiple selections). There is a good article (https://powerapps.microsoft.com/en-us/blog/multivaluedchoicesinforms/) published by Carlos Figueira from PowerApps Team that shows how to implement Checkbox controls. The downside of it was using a Text column that imitates a Choice column. It's been a while since that article was published, so it's hard to say if anyone has done it differently. In this post I will explain how to pair Checkbox controls with a true Multi-Valued Choice column. Please note, in my example I will be using a PowerApps Form rather than PowerApps App; however, it shouldn't make any difference. Let's create a SharePoint List, name it TestList, add a TestListColors Choice column.…

Continue Reading

SharePoint Document Library – show Path column in the view and make it clickable to open that path

How to add / show Path column in a view in a SharePoint Document Library appears to be a question with hundreds of different answers to it. The reasons for such a variety are: different versions of SharePoint (on premise, online, 2010, 2013); two Workflow variations ("old" workflow, Microsoft Flow); SharePoint Designer (2010, 2013); using Web Parts and more. Why would one need to see a Path column? Take a look at the two examples below; however, there might be more use cases. Example 1 - when searching for files. Example 2 - when using a view with "Show all items without folders" option selected Here is a test Document Library with a folder and some document in it: It's not possible to show Path column using out-of-the-box tools, the Path column is just not available to be selected: Although the Path can be seen if you open the details pane:…

Continue Reading

SharePoint Column Formatting – customize the look of Hyperlink columns and their Display Text

There is nothing wrong with how SharePoint Hyperlink columns display information by default. However, some users believe that the look is too generic, hard to bring attention to, which I myself tend to agree with. Let's see how it looks by default: The issues in my opinion are: the Display Text is grey and no different than any other column if Display Text needs to always be the same (e.g. CLICK HERE), then it has to be typed in that way in every single list item. We will address both issues. 1. KEEP THE ORIGINAL DISPLAY TEXT AND CHANGE THE LOOK The following JSON code is applied to both Hyperlink columns: { "$schema": "http://columnformatting.sharepointpnp.com/columnFormattingSchema.json", "elmType": "a", "txtContent": "@currentField.desc", "style": { "color": "red", "font-weight": "bold" }, "attributes": { "target": "_blank", "href": "@currentField" } } 2. SHOW PREDEFINED DISPLAY TEXT AND CHANGE THE LOOK The following JSON code is applied to both…

Continue Reading
  • 1
  • 2
Close Menu