Saturday, 9 October 2021

Power Automate: Proper Case String Workaroud

There is Proper functions in Power Apps to converts any first letter of a word to Uppercase.

But there is no Proper case function in Power Automate yet. 

Reference to a blog post written by Paul Murana to achieve the same result.


Below is the Input.


and here is the Output.



Follow the steps below:

  1. Create Data Operation - Compose to input the string.


  2. Create Control - Apply to each and add Data Operation - Compose inside.


  3. In Apply for Each, using referencing function to call Compose output. Enter Expression below:

    split(outputs('Compose'), ' ')

     


  4. In Compose - Proper, enter Expression into Inputs as below:

    if(equals(length(item()), 1), toupper(item()), concat(first(toupper(item())), toLower(substring(item(), 1, sub(length(item()), 1)))))

     


  5. Create Data Operation - Compose for Result.


  6. In Compose - Result, enter Expression into Inputs as below:

    join(outputs('Compose_-_Proper'), ' ')

    You have Proper Case function in Power Automate now.

Power Automate: Return value from Execute a SQL Query (V2)

Working on Power Automate aka Flow to retrieve result from Execute a SQL query (V2).

Wondering where is Dynamic Content for Execute a SQL query (V2) ?


Execute a SQL query (V2) response:



Add Compose action underneath and go to expressions and paste this in.

    body('Execute_a_SQL_query_(V2)')?['resultsets']['Table1'][0]['Approved']



It just work like a charm !



SharePoint Online: How to Restrict Download for Document library




For IRM protected document library, you will see this error while uploading protected or digitally signed PDF files. Something that working fine for Sharepoint 2010 but NOT for SharePoint Online.

According to Microsoft article:

IRM protection cannot be applied to protected documents as SharePoint needs to open the documents on upload

This is most demanded features for SharePoint Online UserVoice suggestion. 
Unfortunately, This UserVoice instance is no longer available anymore. While waiting for Microsoft to allow upload password protected / AIP protected / digitally signed PDF files in SharePoint IRM document library, workaround need to be in place.

Since we are not able to upload protected PDF into IRMed folder, only option is upload into non-IRM folder. 

To further protect the PDF, customer have asked on how to restrict download PDF from document library.


How to hide/restrict Download from the document library ?



Please follow the step below to remove Download option.
  1. Navigate to Site Permission > Advanced Permission Settings.
  2. Under Permission, select Create Group.


  3. Under Give Group Permission to this Site, tick View Only and click Create.


  4. Now you won't see Download option for the user assigned with View Only permission.

No Save/Download option in preview too.



SharePoint Online: View Only Permission Level is hidden

Excited to know that there are way to restrict downloading on SharePoint Online Document Library.

But where is the Read Only permission ?


Follow the steps below to Activate it.

Navigate to Site Settings > Site Collection Administration > Site Collection Features.
Look for SharePoint Server Enterprise Site Collection features
Click Activate.


Here you go. View Only permission is available now.


Follow this blog for more tips !