Posts

Showing posts with the label PowerApps

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 - Create Charts based on the SharePoint List data column Values

Image
While working with SharePoint list, I have a requirement to display bars based on one of the column data. Here are the sample data how it is in the list Name Amount Cement 50000 Iron 10000 Wood 40000 Wood 70000 Labor 8000 Wood 7000 Iron 5000 Labor 9000 I have added following Formulae to get the data.  AddColumns(GroupBy(ProductList,"Name","Grouped"),"Sum",Sum(Grouped,Amount)) After grouping the data we are able to see the data as chart as above.

PowerApps Admin - Governance on Environments

Image
A  Power Platform environment  is a location to manage apps, flows and other components in Power Platform. It will have separate apps with different security and roles. In the environment we can have individual space for apps and flows the different branches for the organization.  As a PowerApps admin we can have the ability to allow users to create Environment.  By default following users will have the ability to create the Environments using the Admin screens.  Global admins Dynamics 365 admins Power Platform admins Allowing other users who is not having proper information about environments will create troubles by creating multiple environments. As a admin we can use following settings to allow users to create the environment. Open admin center - https://admin.powerplatform.microsoft.com/ Click on Gear Icon and Click on "Power Platform Admin Settings" as below.                Select only "Specific people"...

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 ...

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.

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.

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...

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) 

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 It...

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.

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.

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.  

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)