Posts

Showing posts with the label Power Automate

Powe Automate - Get Team Web URL

Image
 While working with Power Automate flow, i had a requirement to pull the web url of the Teams. Using the Get Team Information, i am able to get the ID of the teams not the Site URL. By using Graph API and sending the requests i am able to get the details required. Here are the steps i have followed to get the information. Add Action, Get Teams. Enter the Team ID/Name. Then call HTTP Request as below. We get the Teams details from Graph API. To get the URL, by using following expression, we can get the Teams URL. outputs('Send_an_HTTP_request')?['body']['weburl'] Hope this helps.

Power Apps Issue with Dropdown filter - The requested Operation is Invalid. Server Response XXX - Invalid filter clause

 While working with Power Apps, i got an error assigning the text box i got an error saying,   Power Apps Issue with Dropdown filter - The requested Operation is Invalid. Server Response XXX - Invalid filter clause. Only single 'eq', 'ne', 'contains', 'starts with' or 'ends with' is currently supported. I see the issue it is applying the filter on multiple dropdowns. I have fixed the issues by using the steps below. For the dropdown, i have added the Items property for Dropdown1 by adding the formulae below, Sort(Distinct(<< LIST NAME >>,<< LIST COLUMN >>),Result) for the Items for dropdown2 , I have added following formulae, Filter(<< List Name >>,<< List Column 2 >> = Dropdown1.Selected.Result ) After getting the items form dropdown2, I have added following formulae for the Textbox Text property. LookUp(<< LIST NAME >>, << LIST COLUMN 2 >> = Dropdown2.Selected.Result , <...

PowerApps - Back to Basics - Update Lookup Column based on child list

While working on one of the PowerApps form, i have a requirement to update the lookup column based on the other list. I have two lists and both the lists having the lookup columns. When updating the record we will get the child look-up value and based on the child look-up value we need to update the parent list using the form. After navigating to the PowerApps and clicking on the one of the child list record, we need to pull out the records based on the Parent list and update the data in the parent list. I have used following formulae to update the records. With(      {              childListData: LookUp( <<Child List>> , <<Look-up Column Name>> = " <<Look-up Value>> ")      },      {                Id:  childListData .ID,               Value:  childListData .linkedCol...

PowerApp tip - Sum with Filter in Power Apps

While working with Power Apps i got a requirement to update the Sum of a column for the specific month and Save it in to a column. I have tried ForAll i see it was failed. After Using With and Filter as shown below i am able to achieve the functionality using the formulae as below. With(    {       SumValue :       Filter(          ' AccountsData ',          Month( DateFieldValue1 ) = Month(Now())       )    },    Sum(       SumValue ,       AmountValue    ) ) Here SumValue will get the value from List AccountData (Data). From Accounts list Amount Value will be summed-up.  Here we are applying the Filter based on the current month with the of the PowerApps form DateFieldValue. Getting the AccountsData and applying the filter with the DateFieldValue mentioned in the PowerApps forms.  After Summing the value, i ...

Unrelate the Rows in Dataverse using Flow

Image
Unrelate the rows in power Automate will be same as RelateRows. Rows will be unrelated using the action. To Unrelate the Rws we have the action as shown below. Adding UnrelateRows will have following details to be added, Table name - Name of the table to delete the relationship Row ID - GUID of the row to unrelated Relationship - Relationship details Unrelate with - URL of the  OData identifier of the resource

Relate Rows in Data verse using power Automate

Image
We can relate the Dataverse Records in Power Automate flow using RelateRows action. We can relate the tables if there is already a relation between two tables (One - Many or Many - Many) We can relate the rows in the flows using the steps below, In the actions, Search for Relate Rows We need to add following details once we add the action, Table Name - Name of the Table to create the Relationship Row ID - Unique RowID as GUID to create the relationship  Relationship - Relationship with other table as  Relate With -  resource URL of the row to add the relationship After adding the details, Save flow to create the relationship.

Perform a change set request in Dataverse

Image
In Power Automate flow, Changeset will help us to perform multiple operations at once. When multiple operations combined in a change set, if there is any operation fails all the transactions will roll back. In flow, we can add a new step as Change set as below In the Change Set we can multiple operations as below. We can add the multiple operations in the Dataverse change set as the image above.

PowerApps Back to Basics - Update VS UpdateIf

Update and UpdateIf functions helpful to update the records using PowerApps. Following are the syntax for Update and UpdateIf functions. Update( DataSource, OldRecord, NewRecord [, All ] ) DataSource is - Source of the data to update the records OldRecods - old records to be updated NewRecord - New record to be updated All - All is optional, if we mention this all the records matching this will be replaced. UpdateIf( DataSource, Condition1, ChangeRecord1 [, Condition2, ChangeRecord2, ... ] )    DataSource  is - Source of the data to update the records Condition1 - Conditions to get the records Change Records - Records to be changed, i.e after satisfying the condition this records will be updated. Following the two cases for Update and UpdateIf with Data Update(EmployeeData, First(Filter(EmployeeData, EmpName ="Mike"  )), {EmpFirstName: "Mike"});  In the above case, Update function will work on the fi...

Power Apps toPower Automate Error - The input body for trigger 'manual' of type 'Request' did not match its schema definition , the input String does not validate against the date

While working with power Apps to Power automate, passing the Date time values as Text(DateTimeValue) throws error as below. The input body for trigger 'manual' of type 'Request' did not match its schema definition. Error details: 'String '' does not validate against format 'date'.'. After checking the Microsoft documentation and few blogs i found out the date values should be passed as a formatted date time. TO pass the date time  we need to use following functions. Text(<<DateTimePicker>>.SelectedDate,"[$-en-US]yyyy-mm-dd") Even after passing the value i am still seeing the same issue and finally found out the default value ids sending as empty and formulae failing for empty values. So we need to make sure the Date Value should not go blank to the formulae and the value should be formatted using the formulae as above. Hope this helps.

Power Automate Trigger flow - on Specific file or Specific File Extension

Image
 We can trigger Power Automate flow to a SharePoint document library file But to trigger the flow to specific file or specific file extension in SharePoint document library. We can do that by setting the trigger condition by navigating to Settings and Click on adding new trigger condition as shown below. In the trigger condition we can pass the extension or file name as shown the formulae below. @equals(triggerOutputs()?['body/{FilenameWithExtension}'], 'FiletobeTriggered.txt') Similarly we can trigger the extension of the file as shown the below formulae @endswith(triggerOutputs()?['body/{FilenameWithExtension}'], '.docx') We can also set trigger for the folder using following formulae, @contains(triggerOutputs()?['body/{Path}'], '/TriggerFolder/')

Found a node of type 'PrimitiveValue' when starting to read the property value; however, a node of type 'StartObject' was expected. Error while updating SharePoint file name - Power Automate

Image
While working with SharePoint Library file name update i got following error, "status": 400,   "message": "Found a node of type 'PrimitiveValue' when starting to read the property value; however, a node of type 'StartObject' was expected. The '__metadata' property must have an object value.\r\nclientRequestId: ",   "source": " ",   "errors": [     "-1",     "Microsoft.SharePoint.Client. InvalidClientQueryException"   ] } This error id due to the issue while sending the metadata for the http request. We need to make sure the item body should be send as below. { '__metadata': {'type':'SP.Data.Shared_x0020_DocumentItem'}, 'FileLeafRef': <<Filename to be updated>> } Here  SP.Data.Shared_x0020_DocumentItem is the term of the document library. We can get this checking the api call fo the document library.  <<SharePoint Site URL>> /_ap...

PowerApps - Restrict a Text Box to 2 decimals

 One of my project got a requirement to restrict the Text box to 2 decimal point. By default PowerApps not giving the option to restriction option. But we can do that using the formulae using the steps below. Update following commands in "On Change" event of the Text Box. UpdateContext(    {        texBoxValue :        Round(          Value(Self.Text),          2       )    } ); Reset(Self)  Update variable in "Default" of the Text Box.                          texBoxValue Hope this helps.

Submit as template in Power Automate

Image
 Power Automate flow will have the ability to save the flow as template in Power Automate Gallery. This will help the users to re-use the template once the Power Automate team approve the flow to publish in the Gallery. We can use the steps to create the template.  Navigate the flows. Click on Details in the flow as below Click on Submit as Template on the Top navigation as below. To submit the template, low must run at least once. If flow not ran anytime, we can see the error.  If flow ran at least once, it will navigate to following screen. Provide Name, Description, Benefit, Number of Users, Number of Runs and Category details. and Click on Submit. Once Submit the details, Power Automate Team will review the template and updates in the Gallery.

Create Flow using the Microsoft Visio

Image
 We can create the flow using the Microsoft Visio using Power Automate tool. We can create the flow using Visio template as shown the steps below, In Power Automate portal, Click on Templates. On the Top Menu, Click on Visio as below. Click on the BPMN Diagram. It will open the Visio designer. Add the actions to the visio Once completing the design, on the "Process" Tab, click on "Prepare to Export" button. Visio will open Prepare to Export group. We need to map the actions accordingly. once all the actions mapped, Export the Visio to Power Automate.

Power Automate - Get File(s) Action not returning results

Image
While working with Get Files action in SharePoint, i am not getting any results. In my request i am trying to get the files using the folder name. By passing the folder name dynamically i am not getting any values to the result. I tried to pass the folder name manually but i didn't get the results. Tried to get the results without passing the folder name. Now i am able to get 100 items.  i found the reason for the issue. By default Get Files action will get only 100 records. But my Document Library having 9500 records. My Filer folder is running only on 100 items and not getting any results . So i am not seeing any results with default settings. To fix this issue, we need to set enable Pagination and set the values using the steps below. After setting the Threshold values, Click on Done to save the pagination value.  After running the file i am able to see the filtered results.

Power Automate - Securing Inputs and Outputs

Image
How can we handle the secure information in Power Automate? i.e. i need to pass the Sensitive information and users cannot see it in the logs. To manage that, we can use Secure Inputs and Get Secure from Azure Valut. To enable Secure Inputs, Click on three dots on the top and click on Settings as below. Click ok Done. This will omit the results from the logs. Similarly there is another option using the Secure Key in the actions list as below.

Convert HTML to Text in Power Automate

Image
We got a requirement from the customer to automate the server status details. There ill daily email alert trigger from server to Shared email box. We have created a flow based on the email alert triggered to Shared mail box as below Based on the Subject, Trigger will identify the email. In the trigger condition we have mentioned not to trigger if the Subject contains RE or FW. Once we get the email to extract the content, using HTML to Text conversion action. In HTML to Text conversion email text will convert to string. Once we get the string i am using the string options to extract the required text and converting the string to JSONformat by applying the loops.

Concurency Control and Degree of Parallelism in PowerAutomate

Image
Concurrency control and Degree of parallelism are the options available in Power Automate triggers and Apply-each controls. Using Concurrency Control option, We can control number of flows to run in parallel. Without enabling the concurrency control, power automate can trigger multiple instances of a flow. But enabling the concurrency control we can mention number of instances to trigger and run in parallel. If we trigger multiple flows they will be in waiting stage. To enable PowerApps Concurrency control, select Settings and click on Concurrency control as below. After enabling the Concurrency control, there will be Degree of Parallelism option. This will allow how many flows to trigger at parallel.  In the above case, only 25 instances can run in parallel. If we get more than 25 instances they will be waiting status as below. Similarly we can enable Concurrency Control for Apply-each and it will run parallelly. 

Active Screen in PowerApps Canvas App

Image
 PowerApps Canvas app will have App property will have different properties. ActiveScreen is one of the property in PowerApps App level. ActiveScreen property will following properties, Name ContentLanguage Orientation BackgroundImage Fill Height ImagePosition LoadingSpinner LoadingSpinnerColor Printing Size Width We can set the screen color based on the ActiveScreen name. We can change the field types based on the current screen. We can set the Screen background using the formulae below. If(App.ActiveScreen.Name = "Screen1",Gray,Tan)

Custom Links in Approval flows

Image
 We can add custom links in the approval flows using the formulae. We can add the links using following formula in the approval email. [Go to Link](http link) Here are the steps i have used to send the email with the link. I have added the Approval mail and in the Description i have added the link as below. We can see the email in the output as below. Similarly, we can add dynamic links to the approval flow by using compose action and adding it as output to the approval link.