Update SharePoint Lookup Field (multiple values allowed) from standalone Power App

Problem:

It may turn tricky to update SharePoint items from a standalone Power App, if you’ve configured a SP lookup column to allow multiple values.

Solution:

All you need to get around that issue, is to add another ComboBox to the datacard in the Power App form.
Then also create a data connection to the list, where the lookup values reside.

Settings for the ComboBox:

DefaultSelectedItems: If(Not(IsBlankOrError(Parent.Default)),Parent.Default)

OnChange: ClearCollect(myCol,ForAll(ComboBox1.SelectedItems,{Id: ThisRecord.ID,Value:ThisRecord.Title}));Reset(DataCardValue3)

OnSelect: Clear(myCol)

Settings for the origin lookup dropdown:

Change the setting for “multiple selections allowed” to “true”

DefaultSelectedItems: If(Not(IsBlank(Parent.Default)) && IsEmpty(myCol),Parent.Default,myCol)

(myCol = the collection created in the ComboBox OnChange property)

Explanation:

  • First we check, if there are already values available in the source item
  • the OnChange makes sure, that whenever we select new items, the collection myCol will be updated accordingly
  • the Reset() makes sure, that the values in the origin dropdown will also be updated
  • the Clear() function resets the collection, when the user starts a new selection
  • the origin dropdown will always have the selected items from the ComboBox
  • last but not least, hide the origin dropdown and that’s it

One more important thing to mention!
Keep the “Update” property of the datacard as “DataCardValuexx.SelectedItems” – if you try to pass in a table, the submit form function will fail. That’s the trick here.

Enjoy!

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading...

Copy & Paste from Excel into Canvas Power App

Problem:

Power App doesn’t provide functionality to just paste copied content from Excel into a table or a gallery. But it’s annoying people, if they have to type all the values from a calculated Excel file 1:1 into the Power App.
So I found a workaround, that people can just copy & paste values from a standardized table, with which values they need to start an approval workflow for many times.

Solution:

First we create a simple input form on Power App, containing a Text Input field, a table and a button. In my demo I use a SharePoint list as data source.

Then create a Flow with a Power App trigger.

Link the button to the Flow and pass in the text value.

Collection of formulas for you to copy:

Formula for the button:
YOURFLOWNAME’.Run(TextInput1.Text);Refresh(YOURDATASOURCE)

Expression to get the rows:
split(decodeUriComponent(replace(replace(uriComponent(variables(‘strRawTxtInput’)),’%09′,”),’%0A’,’#NEWLINE#’)),’#NEWLINE#’)

Expression to get the columns:
split(decodeUriComponent(replace(uriComponent(items(‘ForEachRow’)),’%09′,’#TAB#’)),’#TAB#’)

Have fun 😉


1 Star2 Stars3 Stars4 Stars5 Stars (2 votes, average: 3.50 out of 5)
Loading...

Change Favicon in SharePoint online (modern)

Have users asking to change the Favicon of SharePoint site collections?
Here we go…

You can download the app package from here: Download

  1. unpack the .zip file – you’ll get the sppkg file
  2. Either enable the site app catalog and upload the app or upload it to the tenant’s app catalog
  3. usually it asks you automatically to deploy; if not, select the sppkg file and click “deploy”
  4. Under site contents add an app and choose “Custom Favicon”
  5. In the Site Assets library place the icon file name “favicon.ico”
  6. STRG + F5 and it should already work (maybe wait for one minute)
1 Star2 Stars3 Stars4 Stars5 Stars (4 votes, average: 4.00 out of 5)
Loading...

Flow: Update People field in SharePoint online with “multiple selections allowed”

Problem:

When you create many workflow applications, you’ll learn, that most of them will use same data again like organization information, responsible persons etc.
So I started setting up a “Central Data” location with all relevant info as SharPoint lists.
Then I went to the different applications and created a “Get Centralized Data” Flow for each of them.
BUT… trying to update a SharePoint People field, that has the setting “multiple selections allowed” turned out to be a pain. You can’t just use the dynamic value from the central list, even the fields were configured identically.

Solution:

Put the person’s claims into an array variable, but don’t use “claims” but “Email” value (yes, it’s confusing ;-))

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading...

Create Cascading Drop Down Input Form for SharePoint with PowerApps

My Scenario:

I had the requirement to have a list input form in SharePoint online, that contains “Scope”, “Category” and a “Subcategory”.
Of course – to have it end user friendly – these dropdowns had to be cascading.

First of all: as of today, cascading dropdowns in PowerApps only works smooth with TEXT only values!! (yes, it’s a real mess)
So how to prevent the user from typing mistakes with text only fields?
–> Provide the user a lookup input interface and create the text only values with a simple Flow.

Solution:

  • First of all create the lists – 3 simple lists with Title only for the lookup values and 2 lists for mapping
  • In the mapping lists make the Title not required, add 2 lookup columns that are required and 2 additional columns for the text value
  • Create a simple Flow for each of the two mapping lists, that updates the text columns, that we’ll use later for our dropdown values
  • Then create a target list (also text only fields for these three “dropdown” columns!) Of course all other columns can be treated as standard.
  • In the main list click on “Customize Form” under PowerApps menu
  • Unlock the 3 Data Cards under “Advanced”, replace the text input controls with dropdown controls and rename them to something meaningful like
    “ddScope”, “ddCategory” and “ddSubCategory”
  • set the “UPDATE” property of the data cards to the name of the SP field to be updated with the value
  • Now modify the “Items” property of the new dropdown fields.

ddScope:
Distinct(cascMap_ScopeCat, LUScopeText)
ddCategory:
Filter(cascMap_ScopeCat, LUScopeText = ddScope.Selected.Result)
ddSubCategory:
Filter(cascMap_CatSub, LUCategoryText = ddCategory.SelectedText.Value)

(if you want to sort the values, you can put a SortByColumns() function around the filter formula)

  • Now the lookups are already working, but if you click on Save, the values are not written to SharePoint. To fix this, we have to re-add the original columns to the form. When added again, unlock them under Advanced and set the “Default” property to the value of the dropdowns.

Scope:
ddScope.Selected.Result
Category:
ddCategory.SelectedText.Value
SubCategory:
ddSubCategory.SelectedText.Value

  • Last but not least, hide those fields from the form by setting the “Visible” property to false
  • Save, publish and enjoy 😉


1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading...