Posts

Showing posts from 2022

Canvas Apps - Enhanced delegation for Microsoft Data verse

Image
Microsoft allows to connect with Data verse to ease use of Finance and Operations  by allowing the accessibility easily. One of the option in Canvas apps is "Enhanced delegation for Microsoft Data verse". Enhanced delegation for Microsoft Data verse is an option to allow users to us following functions without Delegation errors. in AsType CountIf CountRows Without selecting the " Enhanced delegation for Microsoft Data verse " option, PowerApps  will throw Delegation errors for Data verse while using the above functions.  We can enable to option by selecting the settings and enabling the " Enhanced delegation for Microsoft Data verse " as below.

PowerApps - Encoding URL and Converting HTML text

PowerApps allowing users to  Encode the URL and converting the HTML Text. Using Encode function,we can Encode the URL string. EncodeUrl function will convert the special characters with % value and a hexa decimal number. For Example, if i pass a string - " https://make.powerautomate.com/environments/ " as input to the EncodeUrl, it returns the value as " https%3A%2F%2Fmake.powerautomate.com%2Fenvironments%2F " EncodeUrl function accepts string as parameter and it is required . It returns the Encoded Url as result. PlainText() function in PowerApps converts the HTML/XML tags  in to proper text. For example if we pass the Value to Plain Text as  <P> Hello This is Sample text from &nbsp;&quot;Tech Battle Field &quot; &nbsp; blog. </P> It returns the result as  Hello, This is Sample text from "Tech Battle Field" blog generally we use PlainText() function when we get the data from RSS feeds and shown them in the PowerApp. RSS feeds w

ColorValue in PowerApps

Image
 In PowerApps to update the CSS color using following functions Color ColorValue RGBA Using Color we have the enumerated values as shown below. Color.Red  Color.Yellow Using Color Value we can pass the 6 - digit or 8- digit hex values or Color name as shown below. ColorValue( "#faebd7" ) ColorValue( "#54 faebd7 " ) ColorValur("Red") Using RGBA, We can pass the Red, Green, Brown, Alpha as shown below. RGBA(255,2555,255,0) 

Get lookup values in Model driven app using Xrm.WebApi

 One of my project, i had a requirement to get the Lookup value by passing the lookup value from the form when page load. For that i have added a JavaScript function on page load methos by adding the javascript file in the web resources of the app. In the JavaScript method, i have added following code the get the Lookup value using the existing lookup value id  function GetValuesFromLookup(executionContext) {     var formContext = executionContext.getFormContext();     var transferId = formContext.data.entity.getId();     if (formContext.getAttribute("student").getValue() !== null) {         var itemid = formContext.getAttribute("student").getValue();         var id = itemid[0].id;         Xrm.WebApi.retrieveRecord("student", id, "?$select=_classid_value").then(             function success(result) {                 var uomidlookup = result._classid_value;                 if (uomidlookup !== null) {                     formContext.getAttribute(&q

Column Names in PowerPortal Entity List

Image
While working with one of the Project in Power Portal i got a requirement to change the one of the column Heading other than we get from Dataverse We can update the Column names using the steps below, Open Power Portals Open the site and go to Lists in the Related section Click on Advanced Settings as below. In the Advances settings click on  Override Column Attributes and update  column that we need to rename It will allow us to enter the width and Percentage for the width. After Saving the settings, we see the updated Titles and width percentages in the Power Portals.

RequestHide() function in PowerApps

Image
RequestHide() function in PowerApps will allow users to hide the SharePoint form. This function will allow only on SharePoint forms integration with PowerApps. RequestHide() function will hide the form. We need to call RequestHide() function on Success() function of the form. By default on Cancel() function will be automatically hide the form.

Spell Checks are not working in PowerApps

Image
While working with one of the client, client wanted to allow spell checks in the multiline text boxes. We have option in PowerApps to enable Spell checks by updating  EnableSpellCheck   option as below. After enabling the Spell check Property, Spell check is not working as expected. After investigating further, i found following update from PowerApp community an found Spell Check is not enabled in Chrome. I see Spell check Disabled in my chrome. I have updated the Spell check as below. After enabling the spell check in chrome, Spell check worked as expected.

ETAG mismatch (Conflicts exist with changes on the server, please reload)

While working with one of the screen Save button, i see error while patching the SharePoint list data. After investigating the issue, I found it is due to old data that is pulled to the screen. As per Mozilla Documentation in the link , ETag is http response header to a version of a resource. It will help to save the time to avoid unnecessary transactions. If there is no changes in the content, it will not send response to the web server. So as there is no change in the List,  Etag will not send response to the web server and it returns the error. So when we save the list it throws error. To avoid the issue, we need to refresh the Data Source in the after Patching the list. In my Case, i have updated the Refresh as below. Path(<< DataSource >>,<< Item to be Updated >>,{<< Column >>:"Yes"}); Refresh( << DataSource >> ); After adding Refresh() function it worked as expected. Hope this helps.

PowerApps Gallery - Showing one item on each page

One of my project i have used Gillery and inside the gallery i have used two levels. Based on the first Gallery items, the inner Galleries data will be loaded. On the Top/Fist gallery i am showing only one item per page and added Next button on the bottom to show the next Item. By default Power Apps Gallery will load all the items at once. In my case i want to load one item and based on the item values the other two Galleries will be populated. For the First Gallery i have used following formulae, In the Items property i have added below formulae,   Table( Last( FirstN(<<Data Source>>, Coalesce(<<Variable>>, 1))) In Next button "On Select" property i have added following formulae,   UpdateContext({<<Variable>>: Coalesce(<<Variable>>, 1) +1}) Here we are getting First Non-Blank value (using Coalesce  function .) and mapping it to a variable. For each case we are getting the next value and binding it to the variable. In the Items

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.

Model Driven App Send-in Notifications

Image
In Model Driven app, Notifications can be stored in Notification table and we can see the notifications in the notification area. We can see all the notification until we dismiss the notifications or notifications expired. By default it is set to 14 days and admin can override the notifications expiry settings. By default notifications set to Owner. But if there is any users to to be set, we need to add the users in the owners list.  To enable the app-in notifications we need to follow the steps below, Open Power Apps portal, Open Model Driven app Edit the Model Driven App. Click on "Settings" on the top. In Features section,  Enable "In-app notifications" shown below. Click on Save and Publish the app to see the notifications.

ConfirmExit and ConfirmExitMessage in Power Apps

Image
ConfirmExit and ConfirmExitMessage functions allow us to not lose the changes made in the Power Apps form. Using the functions we can warn the users not to lose the changes made in the app. ConfirmExit is a Boolean value. By Default the value is false. When it is true, the alert pop-up will appear in the screen. We can use the ConfirmExit when user updated the details in the form and not Saved the changes. We can validate the changes saved or not saved using Unsaved property in the PowerApps. We can use the ConfirmExit on following cases, While using Exit function on button click If we are using app in browser and user try to click on Back button in the browser or Back icon in the mobile app If we are using app in browser and user try to close the browser window. while using ConfirmExit, we can use ConfirmExitMesssge to pass the Message to the end user in the PowerApps. We can call the ConfirmExitMessage by passing the custom message 

Model Driven App Issue - Opening other forms instead of quick form create

Image
While working with Model Driven app, I got an issue with quick create item. When i try to create an item, i see different form instead of the form i have expected to create. After verifying the logs i found following details in the logs. I have filtered the app with FormChecker category I found the reason for the issue in the logs as below. "The Entity is not enabled for quick create. Contact the entity owner to enable it." To enable the Quick create we need to follow the steps below. Open PowerApps portal. In Data Section, Click on Tables as below. Select the Table and Click on Settings on the Top Right as below. Select Enable Quick Create Forms options as shown below. 

Canvas App - Debugging options

Image
Canvas apps debug can be done using the Monitor option. With Monitor we can track the events trigger in Canvas app using authoring experience or track the events in published canvas app.  We can get monitoring using the steps below, Open Portal.Office.com Open the power app. Click on Tools in Advanced settings. It will open the app statistics page as below. In the Dashboard, we will have Invite and Options as shown above.  We can also monitor the published app as shown the steps below. By Clicking on the Monitor we can see the dashboard as shown below.

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.

Canvas App - Debug Published app setting

Image
We can enable debugging Canvas app by enabling the "Debug the published app" in Canvas app setting. This setting will allow users to generating the expressions in the app. Even the setting is off, we can see the events happen to the app.  We can enable the setting using the steps below. Open Canvas App in Edit mode Click on File -> Settings -> General  We can see the Events happened in the app using the "Monitor" option in the app.

Model Driven App - Check user details and Access details

Image
As a user we can see the user information details about the user and organization. In the the page, we can see the contact information and security role about the user and organization. Users can have the option to change the details based on the role. (i.e. if user role is Read, user cannot have the ability to change the details). We can see the user information using the steps below. Open Model Driven App, Click on settings Icon on Top right and click on "Personalization Settings"  It will open the pop-up. in the pop-up, click on General tab as shown below. Click on "View your Information". It will open the User Information page. In the Administration tab we can see the user permissions as below.  

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.

How to send dynamic attachments in a email using Power Automate

Image
 We can send documents get from SharePoint or other sources and send as attachments in email. In my case, I need to get the SharePoint document based on the id and convert to PDF. Once we convert to PDF, need to send the PDF document as attachment in a email. To get the SharePoint document, I have used Get File Content method to get the file content. Once we get the content, Using One drive convert method, convert the file to PDF. (before conversion, we need to create same file in One drive using Create File Method). Once we get the file content, we can send the file as attachment in the attachment section as sown below. We can also pass the JSON instead of passing the attachments. We can use this option if we have the array configured already. 

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)

Update look-up column types in Data verse using flow

Image
In Data verse power automate, we don't have direct option by passing the value to the field. We need to pass the Table with Id of the column. For Instance i have Table A and I am trying to update the Lookup column in Table  B, we need to pass the id of the Table A column. For Example we have Loans Table and referring loans table inside of the other table as a lookup column. to Update the Lookup column, we need to pass the value of the Loans as shown the image below. Similarly we can update the other columns like Owners based on the System Users as shown below.