Posts

Showing posts from March, 2023

Power Platform: Managing Environment Variables in 'Managed Solutions'

Image
What Environment Variables are a great way to manage your solutions as they pass through DEV/TEST/PROD environments.  They save having to manually update flows/apps during each change and test iteration. However there is a gotcha to understand when you're planning your next migration or app update. More on Environment Variables | Microsoft Learn Why The two issues I faced using Environment Variables were due to the ' Current Value '. Issue #1 : If you don't want the value you used in DEV to push through to TEST/PROD, you need to remove the 'Current Value' from your solution BEFORE exporting it. If this is not done, and you're migrating as a  managed  solution, the 'Current Value' will flow through to your TEST environment, and cannot be changed because the solution is locked down. When a single sentence in an MS Learn article can cause so much pain... Issue #2 : If you're like me and you realised this AFTER you'd already imported into another

Power Automate: Dynamically retrieve SharePoint Online Document Library 'Drive ID'

Image
Thought I'd add a fancy AI-generated blog header from Microsoft Designer while we're here ! Problem Had a Power Automate Flow that would grab a document from a document library and PDF it.   Needed to make the 'Document Library' field dynamic as the workflow was moving between DEV/TEST/PROD environments inside a Managed Solution  Putting the Name of the document library in that field was not working. How What you need to input into that field, is what's called the 'Drive ID' of the document library.  Which is not immediately available without making a HTTP Call.  So do this to get the drive ID of the specific library you're after: Code for each step Filter Array FROM value:  body('Send_an_HTTP_request_to_SharePoint_-_Get_Library_Metadata')['body']['value'] Filter Array Advanced Code : equals(item()?['name'], 'NAME OF DOCUMENT LIBRARY') Document Library Field Code : first(body('Filter_array_-_Get_DOCX_DriveID

Useful Power Automate Expressions and Tips

Image
Wanted to provide a few Power Automate tips and tricks when using expressions and also when using Dataverse Connections. Replace semi-colons with commas  Useful when working with Choice Fields replace(outputs('Get_a_row_from_Dataverse Table')?['body/ChoiceField'],';',',')   If field is empty, show NA Useful when populating an email/document with values and you don't want the fields to have blank values. if(empty(outputs('Get_a_row_from_Dataverse Table')?['body/ChoiceField']),'N/A',outputs('body/ChoiceField'])   If a boolean value is true, show YES Useful for making the wording inside emails/documents make more sense to a human! if(outputs('Get_a_row_from_Dataverse Table')?['body/BooleanField'],'Yes','No')   If a boolean is true different method for certain scenarios if(equals(outputs('Get_a_row_from_Dataverse Table')?['body/BooleanField'],true),'Ye