Personalized Community is here!
Quickly customize your community to find the content you seek.
Microsoft Customer Co-creation
Help impact how the tools and services you rely on are developed. Microsoft Customer Co-creation connects you directly with our engineers so you can provide feedback before a single line of code is written. Interested? Learn more at Microsoft Customer Co-creation
2021 Release Wave 1Discover the latest updates and new features to Dynamics 365 planned April 2021 through September 2021.
Release overview guides and videos Release Plan | Preview 2021 Release Wave 1 Timeline
The FastTrack program is designed to help you accelerate your Dynamics 365 deployment with confidence.
FastTrack Program | Finance and Operations TechTalks | Customer Engagement TechTalks | Upcoming TechTalks | All TechTalks
In Part 1 of series we created Canvas app using CDS for Apps and customized screens. In this blog we will cover how to make use of collections and update data in collections. Let’s first understand what collections are.
Collections: Special kind of storage to store group of similar items. For example: List of Companies and Products. Collections data is local to an app and cannot be shared across applications or devices. Collections are useful to store and modify data in offline mode by creating a temporary copy of data. You can store single value as well as table data in collections. Below are functions used when working with Collections:
Refer blog for more details on Collections.
In this blog we will make use of ClearCollect function to store Company Products data. We will then Group By Products by Company and finally we will add new column to store Total number of Products by Company.
Collections helps us to visualize data as well with each transformation
Add Company Products Data Source:
Store Company Products Data in Collection:
Group By Products data by Company:
Company column in Company Products is a lookup column and currently Group By function does not support lookup columns. Therefore to group products data by company, we need to add company name in our collection created above.
ClearCollect(ProductsByCompany,GroupBy(AddColumns(‘Company Products’,”CompanyName”,cr2a5_Company1.cr2a5_companyname),”CompanyName”, “Products”))
Add Column for Products count per Company:
Now data is grouped based on company. We will add new column in collection to hold product count per company
ClearCollect(ProductsByCompany,AddColumns(GroupBy(AddColumns(‘Company Products’,”CompanyName”,cr2a5_Company1.cr2a5_companyname),”CompanyName”, “Products”), “ProductCount”, CountRows(Products)))
Business Applications communities