SharePoint – use Microsoft Flow to enforce uniqueness of a combination of two or more columns

  • Post category:Flow
  • Post comments:1 Comment

In SharePoint there is an out-of-the-box way to enforce uniqueness of fields. Let’s say you have a SharePoint list with events and dates and by design you would like to allow any combination of events per day as long as they don’t have the same name and date/time at once. According to the requirements, this is not allowed: Team Lunch – 12/29/2018 12:00 PM (same name and date/time) Team Lunch – 12/29/2018 12:00 PM (same name and date/time) And these combinations are allowed: Team Lunch – 12/29/2018 12:00 PM (same name, different date/time) Team Lunch – 12/29/2018 2:00 PM (same name, different date/time) OR Team Lunch – 12/29/2018 12:00 PM (different name, same date/time) Vendor meeting – 12/29/2018 12:00 PM (different name, same date/time) If you make both Event and Date fields unique then you won’t be able to achieve that. Would be great if we could create and use a…

Continue ReadingSharePoint – use Microsoft Flow to enforce uniqueness of a combination of two or more columns

Script to turn a Shared Mailbox into an automated calendar only or a combination of both

The purpose of this PowerShell script is to adjust an existing Shared Mailbox to auto-accept calendar invitations and either keep emails or automatically remove them. Why would you do that as an admin? Well, there are 2 scenarios for it, and the choice really depends on the department / team in your company and their needs: 1) Its only purpose is a Calendar (e.g. team calendar for vacations) 2) Its purpose is a combination of a Calendar and a Mailbox (e.g. Help Desk mailbox and team calendar for vacations combined rather than two entities separately). Regardless, the way it works for users - they invite that calendar as a participant when creating vacation bookings. Thus, those bookings will be visible in both a personal calendar and a team calendar. What this script does: Turns on auto-processing; Allows conflict creation; Either deletes emails or keeps them depending on a scenario from…

Continue ReadingScript to turn a Shared Mailbox into an automated calendar only or a combination of both

Script to show my computer name and IP address

If you need to know the name of the computer of a user or the IP address, then this tiny PowerShell script can become handy. For example, that information might be required for remote assistance software. There are some tools out there that show this info, e.g. BgInfo, but they don't always work. Moreover, some users insist on seeing an unobstructed photo of their puppy they just got from a shelter. That's a big one! 1) Create a PowerShell script file with this content: Add-Type -AssemblyName System.Windows.Forms $ip=get-WmiObject Win32_NetworkAdapterConfiguration|Where {$_.Ipaddress.length -gt 1} $ipaddress = $ip.ipaddress[0] $pcname = [System.Net.Dns]::GetHostName() [System.Windows.Forms.MessageBox]::Show("My PC name - $pcname `n`nMy IP address - $ipaddress",'About my PC','OK','Information') This script is a modified combination of scripts out there that other people made, so by no means I'm trying to take any credits for it. 2) Put this script to a network location that every user has Read access to.…

Continue ReadingScript to show my computer name and IP address

SharePoint Column Formatting – show stars that match ratings from 1 to 5

Similar to what is done in the SharePoint Column Formatting – add different mood emojis that match ratings from 1 to 5 post, let's replace rating values with corresponding number of stars. Personally, I think it even looks better. Please note, the formatting doesn't adjust any data. If you export your data to Excel, you will still see numeric values. The icons are from https://developer.microsoft.com/en-us/fabric#/styles/icons To see how it works we will create a SharePoint list, then add a “Rating” column (Number type). For example purposes, five different ratings are added with scores from 1 to 5. To add matching number of stars to the “Rating” column, click on its header – Column settings – Format this column. Once selected, there will be a Format column window on the right side. Paste the code from down below into that windows and save to get the result. { "$schema": "http://columnformatting.sharepointpnp.com/columnFormattingSchema.json", "elmType": "div", "children": [ { "elmType": "span", "attributes":…

Continue ReadingSharePoint Column Formatting – show stars that match ratings from 1 to 5

Add on-screen numeric pad to simplify user experience

If by design your PowerApps app is not supposed to have any text input but numbers then it might be a good idea to "disable" a native phone keyboard and add buttons as an on-screen numeric pad. The only downsides of this method are a bit of additional code and taking screen estate. However, it creates a smooth and consistent user experience. To disable the keyboard all text input fields should have DisplayMode set to: DisplayMode.Disabled A rough preview: The OnSelect code for each numeric button would be (example for button "1"): UpdateContext({varTicketInput: varTicketInput & "1"}) TextInput1 Default value must be set to: varTicketInput X button (to start over) OnSelect code: UpdateContext({varTicketInput: ""}) OK button OnSelect code: Set( TicketNum, TextInput1.Text ) That TicketNum global variable can be used later on any screen. NICE TO HAVE To make your app even better I would recommend disabling some buttons at certain conditions:…

Continue ReadingAdd on-screen numeric pad to simplify user experience

SharePoint Column Formatting – add different mood emojis that match ratings from 1 to 5

If you have a SharePoint List that stores some kind of reviews, usually those are from 1 to 5. Let's add some emojis that match the scores: sad face for 1 and 2 (usually 1 and 2 are equally bad); neutral face for 3; happy face for 4; overly happy face for 5. The icons are from https://developer.microsoft.com/en-us/fabric#/styles/icons It doesn't really add any practicality to the list but makes it look nicer. To see how it works we will create a SharePoint list, then add a "Review" column (Number type). Five different reviews are added with scores from 1 to 5.  To add emojis to the "Review" column, click on its header - Column settings - Format this column. Once selected, there will be a Format column window on the right side. Paste the code from down below into that windows and save to get the result. { "$schema": "http://columnformatting.sharepointpnp.com/columnFormattingSchema.json", "elmType":…

Continue ReadingSharePoint Column Formatting – add different mood emojis that match ratings from 1 to 5

Microsoft Flow – populate a multi choice field in SharePoint

  • Post category:Flow
  • Post comments:95 Comments

How to populate a multi choice field in SharePoint is a frequent question on Microsoft Flow forum. Officially, at the time of this post there is no confirmation that such functionality exists. So I started testing possible ways of doing it and eventually came up with a solution that works and kind of makes sense. If the Trial and Error part is no interest for you, then feel free to scroll down to the Solution. TRIAL AND ERROR 1) I created a Color Choices SharePoint list with Colors being a multi choice column. Choices are Red, Blue, Yellow, Pink, Green, and Orange. Then from the list itself I submitted the 1st item with Red and Yellow values. The goal was to see how data would look like from the Flow perspective. To do that a simple Flow was created that works on selected item and gets data from it. The result was:…

Continue ReadingMicrosoft Flow – populate a multi choice field in SharePoint