Check empty fields before Submit

Some of you might shiver now, but this blog post is about InfoPath! Yes! That old form application 

I still think it’s good though for on-prem customers who don’t have PowerApps available.

I built a form that I needed to validate before the user press “Submit” and the validation is to check if mandatory fields has a value. So simply put: check for empty strings before Submit. I tried using Rules but you can only have up to 5 conditions, and I have 8 fields that must be checked. So that did not cover all fields of the form. Here is a screen shot of all fields in the form that are mandatory:

So how do you validate if fields are empty on a web enabled form?

You can not use the Validation rules that are built in, because they will only work when you fill in the form in InfoPath client. But, we can check if the field has any text in it.

The solution:

I added a text field that I called “AllEmptyFields”, that will be hidden on the form. And in that field I added the following formula:

string-length(YourFieldName) * string-length(YourNextFieldName) * …  add all the fields you want to check!

So what you are doing is counting if there are any strings inside the field, and if they don’t it gets the value 0. Now add all the fields that you want to check, and separate them by the * sign. Which means that this field will default have the value 0 and then, when you have filled in all fields in the form, it will calculate a number that simply counts and sums all the characters in those fields. (The screen shot shows the formula in Swedish – sorry. But you get the point, right?)

Then on the Submit button you add a Formatting rule. The rule is to hide the Submit button if the calculated field “AllEmptyFields” contains 0:

If “AllEmptyFields” = 0 then Hide the control (and the control in this case is the Submit button):

Now when I fill in the form, the Submit button will not be visible until all mandatory fields are filled in! Very nice and no risk of empty forms being submitted.

Easy ways to change the look in SharePoint online

Are you using modern team sites or communication sites in SharePoint online? Then there are some good news for you when it comes to changing the look on them. Some of the news are easy to change in the UI and others you must use PnP Powershell to enable.

Change the theme on a modern site

There is a new setting called “Change the look” on the wheel menu.

This will open a pane where you can choose what theme you want for your site. If you don’t see a list of different themes, then the tenant Administrator might have prevented users from changing themes. Read more here. Select a theme:

When you select the theme a new link “Customize” will appear that let’s you do further customizations. The “Header emphasis” controls the background color of the site header. Default it is set to “None”:

Change the header of a site

Here are screen shots of how the different header emphasis looks like:

Neutral

Soft

Strong

Change the look on a hub site

If you have a hub site then you can change the theme and all the connected sites will inherit the same theme.

Change the look on a classic site

You have the same option “Change the look” on classic sites, but then you come to this old familiar page:

Mega Menu – is it coming or just a rumour??

This is something that I have read about but not been able to activate on my sites. Not sure it has been released yet, or if it’s just a rumour… Or I just don’t know how to enable it 🙂 Anyway, when you enable levels in the navigation then you get that “fly-out” effect, which is annoying because if you click outside it the menu disappears:

I would like to use the mega menu instead to make the menu larger, more informative and easier to use. Now there’s supposed to be a PnP cmdlet (you cannot do this in the UI) called MegaMenuEnabled that you can set to True or False, that should control if you want to enable or disable a mega menu. But when I run that in PnP PowerShell I get the following error “The property ‘MegaMenuEnabled’ cannot be found on this object. Verify that the property exists and can be set”:

No luck finding it on this command either: Get-Command -Module *PnP* 

Guess I have to be patient, not my strongest side though! I will update this post after Microsoft Ignite, maybe that is something that will be launched there! Exciting!

Cheers!

Delete and Rename channels in Teams

“I have renamed a channel in Teams, and now the files are gone, help!”

That was the reason why I am writing this blog post. To start with, the connection between the Files tab in Teams and SharePoint works like this: when you add a new Teams team and a channel, a SharePoint site collection will be added (unless of course you choose to add a team based on an existing site). They are then connected and you can see this by going to the “Files” tab in Teams. Let’s say you add a new Team that is called “O365Projects”. Now this will generate a site collection with the URL “https://yoursite.sharepoint.com/sites/O365projects”. On that site a folder will be added into the Documents library, and it’s called “General”:

That connected SharePoint folder is then displayed on the “Files” tab of your team in Teams and the files within it, the “General” folder in example here:

When you then add another channel in that same Teams group, let’s call it “Instructions”:

Then a new folder called “Instructions” will be added in the Documents library in SharePoint:

So what happens if someone either Rename or Delete these folders? Because they are connected now. I will describe four scenarios, what the effects are if you do any of the following actions. An important note: while I was testing this I did not close Teams in between and sometimes it looked like renaming worked, but when I restarted Teams it updated and then it was not working, so it may look like it works in Teams and that is just because it did not refresh properly so be sure to restart Teams when you rename or delete channels!v

Scenario 1: Rename a channel in Teams

If you click the three dots after a channel, and then select “Edit this channel” then you can rename the channel.

I changed the name to “Trainings”. The effect was that the channel was renamed, of course, but the folder in my SharePoint documents library did not change name – it was still called “Instructions”. But.. the connection still works. If I upload documents into either Teams or SharePoint to that channel, the files are visible on both places. But of course, this could end up in confusion when you go to the SharePoint site and look for documents connected to that channel and the name is totally different. Anyway, this works, but not recommended. The natural step would be to change the name in the document library to the same, what happens then? That is in our next scenario!

Scenario 2: Rename a folder connected to a channel in SharePoint

So we changed the name of our channel in Teams to “Trainings”. Now we want to change the folder name in the SharePoint document library to the same, to avoid confusion, right. Okey here we go, in SharePoint on the folder, click the vertical dots and select “Rename”:

Go back into Teams, what happens there? The Files area is emtpy! And the reference on Files is still pointing to “Instructions”. So that will break the connection. As you can see the channel is “Trainings” but it wants to find files in a folder called “Instructions”, so if you are uncertain on what folder the channel is connected to, then you will see that in the top of the Files tab in Teams (here the yellow mark is on the “Trainings” channel which is connected to the “Instructions” folder):

And now what happens in SharePoint is that it will automatically add back a new folder in the library called “Instructions”! So SharePoint will automatically match the channels, if they do not exist in there. Now I both have my new “Trainings” and the old “Instructions” folder. And this is where it could get confusing, because now you have a channel called “Trainings”, which points to the “Instructions” folder which is empty because your files are stored in the “Trainings” folder…. :

Recommended solution: Move the files out of the channel (example: move all files from “Instructions” folder) to a temporary folder in SharePoint. Then delete the channel and folder, and in Teams create a new channel with the name you want. Then move the files back from the temporary folder into that new channel’s folder.

Scenario 3: Delete a channel in Teams

Okey let’s delete a channel in Teams and see what happens in SharePoint. I will delete the channel “Trainings”. Note the message that the files will still be available (it means now on SharePoint) and you can copy that link to go to the connected folder:

And yes, after deletion the folder is still on SharePoint. So that worked. What if I then want to restore the channel? You will find it on the Teams settings tab and Channels, there is section called “Deleted”. Choose to restore the channel there:

That worked because the connected folder was still on SharePoint.

What if we had deleted the folder in SharePoint also, and tried to restore the channel? Then it will restore the channel, and as soon as you click on the “Files” tab it will add back that folder to the library on SharePoint BUT the folder is… EMPTY!! So your files are gone! Teams will not restore your files. I looked in the recycle bin on SharePoint and you can restore the files from there, but it gets stuck on Restoring so not sure that will work. You cannot access the files inside folders from the recycle bin, so that may not work.

Recommended solution: For governance and traceability, do not delete the folders from SharePoint! Then you know you can always restore a channel after it is deleted and the channel will connect back to the original folder.

Scenario 4: Delete a folder connected to a channel in SharePoint

Let’s find out what happens if you delete a channel folder from SharePoint while the channel is still in Teams. I deleted the folder “Presentations” in SharePoint:

Went into Teams and the Files tab and it is empty, as expected:

Go back into SharePoint to find a new folder added called “Presentations”. So SharePoint will add a new folder automatically. What if we want to restore the deleted folder and files then? We did delete this by mistake! Well, that restore does not seem to work, it is stuck on “Restoring”.. So these files are probably gone!

Scenario 5: Delete a channel and add a new with the same name

What if we delete a channel in Teams, the folder and files are still available in SharePoint, and then we do not use the “Restore” but instead try to add a new channel with the same name? That will not be possible,  and you will get a message saying that the channel name is already taken:

Recommended solution: Go into the tab “Channels” and restore the deleted channel. Then the connection to the folder will work and you will get back the conversations etc.

WitGirls Podcast

I have launched a podcast called “WitGirls Podcast” and it will be hosted by me and my friend Christina. We have both long experience from working with SharePoint/Office365 and also from working within the IT business. I also listen to a lot of podcasts, but there aren’t so many in this world that is run by women. So I thought it could be fun to start sharing our experience and also we will invite guests to the show. In the first two episodes we present us, our background and what we work with. In upcoming shows we will invite guests and also deep dive into issues or apps that we are working on. Or topics related, there aren’t really any rules – I don’t like rules – and we can talk about whatever we feel like. If you would like to be our guest, contact us at witgirlspod@gmail.com. Read more on our website witgirlspod.wordpress.com. You can listen to us on SoundCloud or iTunes. Hope you will enjoy the show, and remember – it’s our thoughts and opinions in the podcast, not Microsoft’s or any other product’s views. We do not have any sponsor. This is for fun and I strongly believe that sharing is caring! Hope to see you on a SharePoint somewhere! Cheers!

Change the color of modern views

I got a question from a customer who did not want the red, purple, pink, green etc colors in the modern views in SharePoint on Office365. It seems like each subsite gets their own colors, and how can you change that to one color that matches the company’s graphic profile?

 

Pressed F12 to get the developer tools and deselected the bg color that was in a class called something with theme.. and then the default blue color showed up. So this color theme comes from an actual theme on the site. I have never chosen a theme, but decided to check out if any settings where applied anyway.

First I opened the link “Theme” in Site settings, and removed any folders from there. Did not change anything.

Then I opened Site settings > Change the look and selected the Office Default Theme. No change.

To see the connection between the site and its modern view colors:

Click on “SharePoint”, the tile in the app launcher. There you can see the pattern. The colors comes from the icons there. It matches, I got the pink color and purple color on these two sites when I open the modern views. I am stuck here, there is no settings that I have found that can change these colors.

 

Conclusion:

If you don’t want these random colors, make the following changes (below). Note that this will NOT affect the sites that are already created.

  • Follow my steps above to remove any old Themes
  • Click on the “Office” default theme in “Change the look” so that is really added
  • You can check the “Prevent users from overrriding..” in Admin Center and it will still add the new sites in default blue theme

Now all your site icons in “SharePoint” and the modern view colors will be the default blue:

Modern libraries Part 3

This is the 3rd part of my articles about functionalites that I find annoying or confusing or that simply are gone in SharePoint Online/Office 365. I have two more things on my list:

  1. When you want to filter a view, there are many clicks to get to the actual values you want to filter on. In former versions it was just one click, then the dropdown with values came up. Now you must click (and aim on that flyout can be difficult.. :)) and then click again to see the values.
     It does work in Edit mode though, that menu looks the same as it does in former versions:

    Also, not sure if you can multi-select in this drop down menu. Otherwise you have to click the Filter symbol up in the right corner of the view and open that panel where you can multi-select.

  2. When you have a view Grouped by a value, then the “Quick Edit” button is gone from the document library menu, which is really annoying (because it’s just not efficient anymore). And these things makes people hesitate a bit to work with SharePoint (I know, I hear it all the time from customers!):

    You must click to change to a view that is not grouped, then click Quick Edit, and then you can tag your documents. This used to work in grouped views, in SharePoint 2010 it worked so I don’t know why it has been removed. To workaround this, I have added a link in the left side menu called “Quick Edit” and that links to a new view that I set to open directly in edit mode (you can create a view that opens in edit mode directly) which saves even more clicks for them.

More thoughts on Modern libraries in SharePoint on Office 365

One of my current assignments as a SharePoint consultant is to train users how to work more efficient with document management. It’s quite a challenge, as users mostly are against using metadata, first because they don’t understand it and second because they are used to folders which is of course much more easy but not so efficient and modern. Once you get them to understand the benefits of using metadata they start seeing the possibilities and power of it. But it’s a change of behavior for the users, and it takes some time for them to get into it. My only goal is to help users use SharePoint in the most efficient way and make it easy for them to organize and find their documents.

I have spent a lot of time lately on a customers Office 365 intranet to help them organize and restructure their documents and I found some annoying things and maybe some of them are actual bugs. Also, there are too many clicks involved and don’t we want to reduce that and not increase clicks?! Anyway, thought I wanted to share them here and maybe someone out there has an answer, solution or explanation.

Note: this list is based on SharePoint in Office 365, not on prem servers.

  1. First on my list is a thing that is really annoying, but I know it’s not fixable since it is a new “feature”. You cannot right click on documents to Copy Shortcut anymore. Oh that is so f-ing annoying. I do that all the time, it’s like deep down in your browser behaviour that you forget you can’t. Instead you have to do the “get a link” and then select if the user should have Read + login, Modify + login, Read -login, Modify – login…. Sigh. Why. It is TOO much security and not healthy for the heart!!! And the links is ugly, does not give a hint what it’s about, it’s just a long gui or something.
  2. When you have selected a document in a library and you open the “i” panel to add metadata – the fields in the “i” panel kind of “jumps” or moves a bit so it is hard to focus on them. I don’t like this feature, it’s slow, jumpy and hard to fill in. It’s also a long way to get out of the panel, click the “i” again and then deselect the document. It’s just not a good and user friendly UI.
  3. I miss the “Settings” link when you are in a document library and want to customize it. Now you have to click on “Site contents” in the left menu and then select the library and click the “…” dots and then click on “Settings”. That is a loooong way to go. I want the “Settings” link back!
  4. PDF files and metadata. My customer needed to move an entire library from one site to another. That is not possible through the UI. The “Content and Structure” does not allow move of libraries. So you must first create a template of the library and setup that on the new site (so that all metadata follows) and then you can use “Content and Structure” to select all docs and move them into the new library. That is quite okey, but of course there is a but and it can be a BIG BUT 😉 because if the files are PDF’s the metadata will not follow. Just beacuse it’s Adobe and not Microsoft. It’s just stupid. We are trying to do our daily job and we need good tools for that and these kind of bugs, errors, annoying shit makes us lose patience with the products and users will do it in another way instead.
  5. The Content Query web part is buggy. It works best with IE. But if you use Edge, it will not add the URL to a site or site coll or library in the query field. You must paste it manually. Something I miss with it is also the possibility to group query by Document Library. For instance, I have added a web part that will show all Archived documents on the site, and they are stored in different libraries. So I would like to organize my documents by library, but that is not possible, only by Site. A missing feature.
  6. When you upload a document that already exists in the library you will notice (or NOT! until some time….) in the menu bar that a message is displayed with a red cross saying that “1 items was not uploaded” which is a bit misleading and makes you think something is wrong with the document, until you actually click the message and then it says “a file already exists…” and you can replace it. Not so good UI again… And when the replace is done, you would want that panel to disappear but no, you must click on the X to close it. Annoying, too much clicking and inefficient.
  7. It can be painfully slow to work with SharePoint on O365. Just is.
  8. The customer has a start page on their intranet, but the “new” look top navigation cannot display that link. It says “Page cannot be found“. So no home page is allowed?
  9. “Tiles” versus “list”. How can you control that the tiles are not shown when you open a library? I mean that should be an option that the user makes, not by default. Because: it takes time to load, it is totally messy and you don’t get an overview of your documents and you don’t see your tags. The only time tiles are good is when it comes to pictures. Then I understand why it’s there. But not for documents. I have not found a setting for it, so I wonder if this is something that the browser remembers, like how it was set the last time and then it opens in that mode per user? So that means that I think the library opens in “List” mode but it really opens in “Tiles” when another user opens it for the first time?
  10. This last one is actually the same for ALL SharePoint versions, no matter on prem or cloud, and it should be known for most of the people who uses SharePoint for document storage. And that is: The field “Title” is not in sync with “Name”. And that gives you headache! Because: the Title field is used to display search results, and if that is empty, SP will display the document name. And if the document has a title then the title will be shown in the search result instead of the document name. WHY are there two fields with the same functionality?! And one is filled in but not the other! I have always thought about adding a workflow that simply copies the text in Name to the Title field, but then you must add that to each library and we all know what that will cost in performance, errors in workflows, not possible to achieve even. It’s just bad UI.

 



Thoughts on Modern libraries in SharePoint on Office 365

So this new look has been rolled out last week in SharePoint online for Office 365 users. At first glance it looks great, I like that “hard-to-find” ribbon is gone and easy access to all buttons.

But then I got a call yesterday from a customer who was asking why their document libraries no longer worked as expected. What had happened was that the “Group by” function no longer worked correctly, as the First level grouping was hidden and the Second level was instead displaying all documents. Which led to big confusion for the users of course.

Grouped views displays documents by their second level, not first!

Is this a BUG or change of standard functionality? Grouped views has been in the product as far as I can remember (I have worked with your products since 2003 and document library features has not changed that much). Why change something so basic that has been in the product for so long, don’t the developers at Office365/SharePoint/MS (who knows) think we are using these functions or why??

I noticed that if you change view from “All documents” (which is the default view in document libraries, untouched!) to the “Tiles”, then the grouping works but its still not smooth, it is very much clicking around and you soon get lost on where you are in the library. It shows first level one and if you click on that level you can see level two but you must click back and forth. It’s just not good enough! It’s messy!

There has always been an option to Group documents in two levels (maximum) and now this is obviously removed in SharePoint online (I have tested back and forth and this is what I found), so you can only have 1 level of grouped documents. And yes it would be acceptable if this now is the case and all documents were grouped and displayed by that First level but NO, they are now grouped and displayed by the Second level so we have to go in to each library and REMOVE that second level so that the first level is showing our documents, WTF!!!:

groupedbynolonger

Don’t the developer teams follow their own “best practices” and test these type of scenarios?? I mean, before rolling out a new critical function like this? They don’t think this feature is implemented on intranets and document management systems out there?? Well then they have not seen many real live intranets because I see it a LOT!!

I have always followed the OOB standard and educated people telling them how important it is to follow Microsoft recommendations and use metadata instead of folders, to easily find and filter documents and that search picks up metadata etc. And one thing I have learned from all the years of working very closely to the organizations is that “people want structure“. They can’t handle when you just dump thousands of docs in one library and say “use the columns to filter”. No, they want to organize the documents so it looks like folders, although its metadata. And that magic could happen with the “Group by” function. Yes, you can have one level now in the new “modern libraries” but then the button “Quick Edit” is gone so “win some loose some”. So again. Not acceptable.

Quick Edit not visible on Grouped views

And why isn’t such important functions like “Quick Edit” visible on Grouped views? Come on!!! It was the same already in the on-prem 2013 product on grouped views so I guess this is something that is programmatically hard to achieve (?) but should that be OUR problem? As a workaround I have always had to build own “Edit” views so the users can do this fast and easy (fake it til you make it right?). We want to be able to work fast and easy, not click so many times that you forgot what you were doing on the way there… Yes they can select a document and use the i-button and the task pane etc… But what if they want to use the fantastic “QuickEdit” view to update several documents at the same time?

Button for “Open with explorer”

Yes, this function that users love! Is this gone now, really? Wow. I will not miss it but I know who will…

So questions to Microsoft:

  1. Is there going to be an update to this new library feature so that the Groupings will work on 2 levels again? Or if not, will you correct the BUG that it shows level 2 now and not level 1.
  2. Will the Quick Edit button be visible for Grouped views also?
  3. I never recommend to use this but users LOVE the “Open with explorer” and is that gone also?

Situations like this really makes me question why I am working with this product, because we have to struggle so hard to make users understand how to work properly with SharePoint  and not only use it as a file share, (yes that is very common out there) but to really discover all the great functionality with SharePoint document management. But it’s tiresome when standard functionality changes and all of a sudden you doubt the things you have claimed were good and best practice.