This blog is intended to explore a quick idea on the basic operations like sorting, filtering and searching of data in PowerApps.
Please know: In all the below examples, we are taking D365 CRM tables as the data source.
In PowerApps, we can view the records in a particular sequence using the Sort or SortByColumns functions. Let’s learn using them with small examples:
Syntax: Sort(source, expression, order)
Here, source and expression are mandatory, whereas order is Ascending by default.
Examples:-
The formula shown in the below screenshot will sort the Contact entity records in the gallery by ‘First Name’ in descending order.
The formula shown in the below screenshot will bind the Contact entity records in the gallery having only 3 letters in their ‘First Name’ at the top followed by the other records.
Syntax: SortByColumns(source, column, order)
Here, source and Column are mandatory, whereas order is Ascending by default.
Example:-
The formula shown in the below screenshot will bind the gallery with the Contact entity records sorted by the “fullname” in descending order.
We can make use of Filter function in the PowerApps to find the records in a table based on the specific criteria.
Syntax: Filter(source, logical_test(s))
Examples:-
The formula shown in the below screenshot will bind the gallery with the Accounts having the Name beginning with the letter “A”.
The formula shown in the below screenshot will bind the gallery with the Accounts having Country as “Canada” and the Name beginning with the letter “A”.
Using the Search function, we can find the records in a table which contains the specified string in the given column(s).
Syntax: Search(source, text, column(s))
Example:-
The formula shown in the below screenshot will bind the gallery with the Accounts having the word “street” in their address1_line1 Or address1_line2 fields.
We can also make use of the combination of the above functions to get the desired data.
For example, in the below screenshot you can see that the gallery is bound with the Accounts having Country as “Canada” as well as having the word “street” in their address1_line1 or address1_line2 fields. And finally, the data is sorted in descending order of the “Created On” field of the Accounts.
In this manner, you can use the Sort, SortByColumns, Filter & Search functions in the PowerApp to get the data in the desired way.
I hope this helps you.
Insert data into Many-to-Many relationship in Dynamics CRM very easily & quickly, using the Drag and drop listbox.
http://www.inkeysolutions.com/what-we-do/dynamicscrmaddons/drag-and-drop-listbox
Comply your Lead, Contact, and User entities of D365 CRM with GDPR compliance using the GDPR add-on.
https://www.inkeysolutions.com/microsoft-dynamics-365/dynamicscrmaddons/gdpr
Create a personal / system view in Dynamics CRM with all the fields on the form/s which you select for a particular entity using the View Creator.
http://www.inkeysolutions.com/what-we-do/dynamicscrmaddons/view-creator
© All Rights Reserved. Inkey IT Solutions Pvt. Ltd. 2024
Leave a Reply