Looks like I’ll be heading back to the SharePoint Conference. It’s been a few years and I’m excited to be back!
Are you attending #SPFestChi SharePoint Fest – Chicago next week? I’ll be presenting a workshop on Monday and sessions Wednesday through Friday. Mostly talking about the intersection of SharePoint and PowerApps but also talking some legacy client-side rendering for SharePoint ‘classic’ as well.
- WRK302 – Introduction to Building PowerApps for SharePoint Users
- PWR104 – PowerApps: New Approaches to the Traditional SharePoint List View
- PWR202 – From SharePoint to PowerApps: Evolution of the ‘Intake Form’ Solution
- PWR303 – Client-Side Rendering (CSR) for SharePoint: from Intro to Practical Application
Let me know if you have any questions about my sessions and hope to see you there!
Last week at SharePoint Fest DC (#SPFestDC) I had a question in one of my sessions that I didn’t know the answer to at the time and wanted to follow up on:
“Can you link to a specific screen on a PowerApp?”
Doing a little search I quickly found the answer HERE in the General Discussion Community Boards.
Background: Link Basics
There are a number of ways to get access to a PowerApp via a URL link. They all by default will land the user on the default start screen for the app.
Clicking on ‘Open’ launches the PowerApp in the browser window on a new tab.
Note: ONLY apps created from the SharePoint interface will show up in the views drop down. If you create other apps starting from the PowerApps interface – either from blank, or from data – they will NOT show up in the views drop down for the list even if they use the list as the data source for the app.
So, the link looks something like this:
This link opens the PowerApps app directly in the browser – so something you could add to a SharePoint page if you wanted users to have more direct access to the app from anywhere.
Note: If you provide a direct link consider who has access to the app (Sharing) and the data (SharePoint list, or other data source). Providing a link to someone that doesn’t have the access they need could be irritating for users.
Link to Screen
The concept seems simple.
- Add a parameter to the app URL
- Add logic in the app to grab the parameter value and determine which screen to navigate to
In the PowerApp, set the OnStart formula to something like the following:
This is essentially two lines of ‘code’:
Param grabs the parameter passed in by the URL string and sets it to the ‘startScreen’ variable within the PowerApp
- If(startScreen=”2″, Navigate(BrowseRankingScreen,ScreenTransition.None),Navigate(BrowseScreen1,ScreenTransition.None))
This references the ‘startScreen’ parameter to determine which screen should be displayed. This particular example is ‘one or the other’ – defaulting to the normal start screen if a parameter is not passed in. You could use a variation of the formula to essentially do a ‘switch’ or multiple ‘ifs’ if you wanted options for a bunch of different start screens.
Once the pieces are all in place, you have the option of linking directly to a specific page in a PowerApp app from SharePoint or anywhere else an HTML/URL link is allowed.
- Be sure that any screen you are choosing to start from will work when directly navigating to it. Depending on how the app was built the screen may normally require data or settings from other screens to work correctly – as when a record selection has been made before coming to a detail screen.
- There were references to the parameter only working with and/or forcing the parameter name to lower case. I have not verified if this is still the case.
- There were also reports of caching issues so you may need to try a few times to get the links working properly. Kind of irritating, but it eventually worked.
- Be aware of the parameter type/value being used. In the example above we used: ?screenid=2 which actually passed in a *string* value of “2”. This required the formula to use the string version as well: startScreen=”2” (correct) instead of startScreen=2 (incorrect). Easy mistake to make and the difference between your formula working or not. If you choose to pass in a non-numeric string it might make readability better down the road: ?screen=thisscreen.
Someone told me that it’s a good idea to always have a ‘top X’ things you’d fix, add, or change in a product. I first posted my PowerApps and SharePoint wish list about a year ago.
Top X Things Needed to Make PowerApps Awesome for SharePoint
Since last time
- Embedded forms have been introduced.
- SharePoint Online now supports customizing SharePoint list forms by using PowerApps. It’s a pretty awesome improvement. Still a ‘step one’, but a pretty huge step.
- The other two things I mentioned are still on the list and reframed a bit below.
The New List
- Full fidelity for complex field types – The more I use PowerApps, the more I want to be able to use the SharePoint column types that we’re using in many of our lists. Namely Option columns and Lookup columns. At the moment there are stumbling blocks in PowerApps when using these fields and things like GroupBy. PowerApps just doesn’t recognize the data in the way we need it to… yet.
True, there are work-arounds for some use-cases, but the fewer of these we need to deal with going forward, the better. Because this actually hampers some development I’ve moved it to the top of my list.
- PowerApps Web Part – In order for users to have a good experience when in SharePoint and using PowerApps, it’s got to be smooth. Right now it’s still very ‘jerky’ when in SharePoint and opening an app… “hold on while we load up this other thing…”.
As I stated in the original post, this is critical for SharePoint ‘view’ replacements.
Yes, we have iframes as a work around. That’s ‘OK’ but just now how smoothly integrated it should be in my opinion.
- When creating an app from the SharePoint interface give us layout options rather than defaulting to the phone layout. Definitely realize this was a ‘first step’ and are grateful for it, but time to take the next step. This will also be a big deal once a PowerApps web part (see #1) is ready.
Workaround: Yes, you can do this when starting from scratch in PowerApps, but you lose out on the gains of using the wizard.
- From SharePoint: Create an app from a SharePoint view.
- From PowerApps: Create an app from a SharePoint view. Seems like these would be the same thing, but because it’s actually the integration of two products there’s work that needs to be done on both sides for this to work. When choosing a data source it currently gets you down to the list level – ‘just’ need to extend one more level down to selecting a view. (I say ‘just’ but fully realize there’s a LOT of work behind the scenes to make this happen – keep it up engineers!!).
More things in no particular order:
- Keep improving PowerApps forms for SharePoint. Wizards, better UX, or whatever it takes to make this both easier for power users (non-dev). Great start – really, I don’t want to sound ungrateful – it’s awesome. Just keep improving on it.
- Improve forms UX for (non-dev) power users.
- Make forms available for anonymous and external users. This works for SharePoint, but not the PowerApps forms quite yet (I assume this is at least in part because PowerApps itself is not available to non-tenant users).
- I don’t have a good name for this one, but essentially a ‘code view’ and search.
Ex. When creating an app from SharePoint it creates a nice 3 screen app with a search baked in. If you delete the Search box, a number of other controls break because they have references to the Search control. It would be nice to have visibility within the PowerApps Studio to where formulas reference a control so makers can update references.
- PowerApps forms available in the SharePoint mobile app
- Responsive (Canvas) PowerApps. Sounds like the model-driven apps will be responsive. When will we get the same responsive options in SharePoint forms and canvas apps?
The list will continue to evolve…
This probably falls somewhere under app design, governance, and tips and tricks in the cross-over space between SharePoint and PowerApps.
When creating a list in SharePoint and needing a field with options in it, we need to decide between the relatively static ‘choice’ field with the options baked in to the control, and creating a Lookup control that pulls its options from another list. They both have their place. Choice fields tend to be a bit simpler while Lookups come with a little more overhead, but are good from a data perspective with consistency.
With the introduction of PowerApps and creating new design surfaces for your list data the Lookup option extends that consistency a bit further and may make you choose Lookups even more. When it comes to CRUD forms, both the Choice field and Lookup fields work great (way to go PowerApps and SharePoint teams!). Building other interfaces, however, may encourage SharePoint users to lean more on Lookups.
A default app created by the ‘Create an app’ option from SharePoint gives you a 3-page app that starts with a gallery view filtered by a Search control. I’d like to change the filtering of the page to be a drop down of a Status field. Two options we can use to accomplish this are to create a drop down with static options (like a the SharePoint Choice field) or to create a drop down connected to the same SharePoint list as the Lookup field.
Option #1 – Static options
The initial reason I considered this was because I didn’t actually want to give (PowerApps) users *all* of the options that are available in a (SharePoint list) choice field. Using a static options control allowed me to just display the options I wanted them to see. This is easily implemented using the method covered in my last post – Simple Drop Down Options – and using values that exactly match your list field values.
One possible upside to this approach is that you could use different text or drop down options that might make sense to users but *don’t* match your list values and then use formulas to match your drop down control values to your list values. For example in the above image I have a number attached to each option in my dropdown which some folks might prefer to leave off: “Paid” instead of “5 – Paid”.
The downside of this approach is I now have one more place where I’m required to maintain the list of values. If I update the Choice field in my SharePoint list I might also need to update the drop down control in PowerApps.
Option #2 – Lookup field options
This seems like how the drop down control was intended to be used. Rather than having to manually add values you can simply connect the control to an existing SharePoint list and have the exact same values as the SharePoint list column.
4. Switch to the Advanced properties for the drop down control and set a default value for it.
5. Finally, change the gallery control to use the new drop down as a filter instead of the Search box (key change is highlighted).
From: SortByColumns(Filter(‘Sponsors 2018 April’, StartsWith(Company, TextSearchBox1_1.Text)), “Company”, If(SortDescending1, Descending, Ascending))
To: SortByColumns(Filter(‘Sponsors 2018 April’, (Dropdown1.Selected.Value = Status.Value)), “Company”, If(SortDescending1, Descending, Ascending))
NOTE: When using this approach It is important to understand how Delegation works with PowerApps and SharePoint in order to ensure complete and correct data is being surfaced in PowerApps. See references below for more information.
The most notable upside to this approach is that both the PowerApps drop down control and the SharePoint list column are pulling their options from the same data source and changes to that one list will update both the SharePoint list options AND the PowerApp.
Finally, as was mentioned in Option 1 – if you don’t want to make all the options available in the drop down control you can still accomplish this here by filtering the list like this:
Items = Filter(StatusOpts, StartsWith(Title,”2″) || StartsWith(Title,”3″) || StartsWith(Title,”4″) || StartsWith(Title,”5″))
The added benefits of using a separate list in SharePoint as a lookup source (Option #2 above) for SharePoint list data *and* PowerApps controls seems the better option for longer-term management.
I’ll just file this under ‘recommended documentation updates’.
(Which I submitted on the corresponding docs.microsoft.com page)
Playing around with some UX in PowerApps I wanted to add a drop down control with simple, static values in it and couldn’t find an example of how to do it on the Drop down control in PowerApps page where I’d expect to find it. What we’re talking about is the Items property and formula. After poking around a bit I found the example I needed in the Examples section of the List Box control page:
Yields the following:
As SharePoint and Office 365 continue to evolve, the SharePoint community seems to be as strong as ever. There are a bunch of conferences coming up over the next few months. Here are a few notable ones:
March 2-3 – North American Collaboration Summit – Branson, MO
Better hurry up if you want to make this one. There are a ton of great speakers in town for this one as it’s just before the MVP Summit in Redmond. So catch these folks while you can. It is a great value for your time and a nice little escape from Winter for a few days.
FYI – It *is* drivable from the Twin Cities – we’ve done it a few times.
Discount Code: COLLABSUMMIT50
March 26-30 – SharePoint Fest – Washington DC
A quality SharePoint, Office 365, Azure, and Microsoft Teams event offered several times a year between DC, Seattle (August), and Chicago (December). These folks do a great job. They’ve been doing this ‘series’ for a few years and they just seem to get better. They’ve recently switched to a longer 5-day format that includes 2 days of workshops and 3 days of sessions. Be sure to check them out. I’ll be doing a workshop and 3 sessions at the DC event.
Discount Code: PrestonDC100
April 7 – SharePoint Saturday Omaha – Omaha, NE
April 14th – SharePoint Saturday Twin Cities – Minneapolis, MN
Back for our Spring event with registration just opening up today.
May 5 – SharePoint Saturday Chicago Suburbs – Chicago, IL
May 21-23 – SharePoint Conference North America – Las Vegas, NV
Note: This is NOT a Microsoft-run event like previous ‘SPC’ events, but it IS Microsoft sponsored, backed, and endorsed. There will be a LOT of product group folks attending and speaking in addition to plenty of community-recognized experts, MVPs, etc.
Discount Code: https://t.co/K9n43i1UOr
And of course there continue to be SharePoint Saturday (SPS) events throughout the US and the world. Please remember, not all SPS events are listed on the SPSEvents site – Including OURS – for a variety of reasons. So keep up to date with your local and regional groups so you don’t miss out on a great event!
So much information, so little time. Hope to cross paths with you at some of these!
SharePoint has a couple of built-in filters for column values: [Today] and [Me]. These allow users to filter views by dynamic data. For example you can create a view called AssignedToMe and set a filter like so:
Using this approach site admins don’t need to create views specific to each user, but can use the [Me] filter on a single view that applies to each individual user. As a user visits the view, they see only the records that are specific to them.
How does one do this in PowerApps when filtering data? Good question. This came up during our Minnesota SharePoint User Group (MNSPUG) meeting today and good old Brian Caauwe knew the answer: rather than using [Me] we use the User function in PowerApps.
On a gallery or data table object, our Items property might have a formula something like this:
Items = Filter(‘IT Request’, AssignedTo.DisplayName=User().FullName)
Note: When bringing fields over from SharePoint, PowerApps translates the CreatedBy and ModifiedBy fields to something a little different. That might be a little confusing when getting started.
- CreatedBy –> Author
- ModifiedBy –> Editor
Good questions from the attendees today and good catch by Brian with the User() answer.
Well done PowerApps team!! Just days before Ignite they rolled out Rules for Conditional Formatting in PowerApps. You could technically get the same functionality with building out formulas, but the new (experimental) rules bypass this and are MUCH more end-user friendly.
Check out the blog post.
AND take a look at the supporting documentation that’s already released:
Create a rule in PowerApps
For those of us coming from a SharePoint background this is creeping closer to functionality that was available back in the days of SharePoint Designer. As soon as a true web part is available to embed a PowerApp in a SharePoint page (hopefully the new “modern” pages) users will be able to replace SharePoint views with robust apps that include conditional formatting and other goodies not currently available in SharePoint alone.
Exciting stuff and more to come!!
SharePoint’s “modern” capabilities are changing the face of SharePoint – for the better. But it is taking us further away from some of the tricks and approaches that work with “classic” SharePoint. Thankfully one of the long-standing legacy features of SharePoint still seems to work – the Source parameter.
When used as part of a URL in SharePoint the Source=[URL] parameter takes users to the specified page after a form is saved or cancelled. This allows us to manage some of the navigation flow for users.
‘Copy link’ for the New Item gives us the URL of the New Item form that can be used to link from other locations – such as an email footer, the left nav in a SharePoint site, etc. This link includes the Source parameter and by default will go to the default list view page for the list. Usually, that’s not where we’d like to see users end up.
If I’m building an intake solution, I might have a ‘My Requests’ page where I’d like users to end up. To make that happen it’s as easy as copying the link from the New Item page, getting the link to the My Requests page, and then swapping out the Source parameter value.
The default New Item link (with site-specific stuff stripped out):
https://[mydomain].sharepoint.com/sites/[sitename]/_layouts/15/listform.aspx?PageType=8&ListId=[listGUID]&RootFolder=&Source=[THIS IS WHAT YOU CHANGE]&ContentTypeId=[contentTypeId]
Target destination URL:
The link you’ll use:
Using this approach you have a link you can use where users will be able to submit a new request, then end up on the My IT Requests page rather than the default list view page.