Posts

Showing posts from January, 2023

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 filter data mentioned in the records UpdateIf(EmployeeData, EmpID

PowerApps - Multiple Filtering Conditions

In the PowerApps on Load, i had a requirement to show the screens based on multiple conditions as below, Is User Having Admin Permissions (These are checking from a List in SharePoint) Check if Item is Status is Pending Current User Location is Same Location as the Item (User Location details is in SharePoint List) Current User LastWorking Day is Greater than Project Item Completion Date For the details on the Screen - OnVisible property, I updated following code to get User details (IsAdmin, Location and Last Working Date) Set(varCurrentLoggedInUser,User()); Set(     varCurrentLoggedInUser Details,    LookUp(       'User Details',       User.Email= varCurrentLoggedInUser .Email    ) ); Once we get the details, I have added following logic on click on the Gallery Item, If(varCurrentLoggedInUserDetails.Admin,         If(ThisItem.Status="Pending" &&      ThisItem.Location=varCurrentLoggedInUserDetails.Location &&       ThisItem.ClosingDate<=varCur

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/')

Phone Calls Using PowerApps Launch

one of Client wanted to show the Phone Icon and by clicking on it, it should Launch the Call in Power Apps. There is direct option in Power Apps to open the call screen using Launch Function. Using Launch function as below, PowerApp will call the number. Launch("tel:1234567890") In the above function, PowerApps will call the number.  This function is working for the most of the devices. But iPhone 7 is not working as expected. By clicking on the icon, it just opening the Safari browser and doing nothing. After investigation, i found the resolution for iPhone 7 using the function below. Launch("tel:1234567890"). Hope this helps.

Power Portals - Restrict Portal access by IP Address

Image
We can restrict the portal access based on the IP address of the client. zIn general we can access the portal from internet. But we have ability to restrict the IP address from the Portals. We can follow the steps below to restrict the portal access from different IP Address. Navigate the Power Portal Admin center. Click on "Set up IP address restriction" On Set up IP Address restriction page, click on Add row Enter Type of IP and IP Address to restrict in the IP Address details as below. Select Configure.

Remove Duplicate entries pulling from the collection

 One of my project required to remove the duplicates while pulling the data from a collection. i got the collection but i need to remove the duplicate and add the value to the collection (value removed from collection). I have used following code to achieve the functionality. ForAll(colI mportedData As Col,    If(       CountRows(          Filter(              colI mportedData,             ID=  Col .ID          )       ) > 1,       Collect(           removedData,           {               Title: "Title",               ID: ID                          }       )    ) ); Here colImportedData is imported data and based on Id field we are removing the data from the collection.

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