Hi,
Please check the screenshots to better understand my problem.
I have 2 dataverse tables:
1. to store information regarding stores
2. to store sales for each store
If I´m creating a gallery to display all the information related to the store I would like to have a store with the latest purchase date at the top. Do you have an idea how to solve that?
I´d be glad for every suggestion.
Solved! Go to Solution.
@RaSa, okay, using Dataverse there is an easy way to do that. Create a View in the Sales Table and Add your Related Columns from the Store Table along with the PurchseDate Column in the Sales Table. Sort the View by PurchseDate Column and Save and Publish the View.
In the Canvas App, add a Gallery and select your Sales Table as Data Source, Then Select the View you Just Created.
Regards,
Ahmed
If my reply helped you, please give a 👍. And if it has solved your issue, please consider a 👍 & Accepting it as the Solution to help other members of the community find it more.
My Blog: www.powerplatformplace.com
Hello, @RaSa, You can use SortByColumns Function. In you Gallery Items proporty use:
SortByColumns(StoreTable, PurchaseDateColumn, Descending)
Regards,
Ahmed
If my reply helped you, please give a 👍. And if it has solved your issue, please consider a 👍 & Accepting it as the Solution to help other members of the community find it more.
My Blog: www.powerplatformplace.com
Hi @AhmedSalih, to use SortByColumns(StoreTable, PurchaseDateColumn, Descending) I would need to have PurchaseDateColumn inside the StoreTable which I do not have. Correct me if I´m wrong. Thanks for reply 🙂
@RaSa, So I am assuming that you have the PurchaseDateColumn in the store sales table? Which is the Many -Side of the Relationship, correct?
@AhmedSalih that is how I manage data in dataverse. So the StoreTable contains only Store ID and Name. Using SortByColumns(StoreTable, PurchaseDateColumn, Descending)
I am not able reference to PurchaseDateColumn since the StoreTable contains only ID and Name columns.
@RaSa, you can do the following to create the View you have in your GalleryIdea.PNG:
NOTE: I a, assuming that you already have a relationship in place. If not, check my tutorial here for how to accomplish this https://powerplatformplace.com/f/excel-to-dataverse-migration---part-1
Regards,
Ahmed
If my reply helped you, please give a 👍. And if it has solved your issue, please consider a 👍 & Accepting it as the Solution to help other members of the community find it more.
My Blog: www.powerplatformplace.com
@AhmedSalih That would works fine. But still the store with the latest purchase would not be listed at the top of the gallery, and that´s why I have decided to post the question here.
@RaSa, okay, using Dataverse there is an easy way to do that. Create a View in the Sales Table and Add your Related Columns from the Store Table along with the PurchseDate Column in the Sales Table. Sort the View by PurchseDate Column and Save and Publish the View.
In the Canvas App, add a Gallery and select your Sales Table as Data Source, Then Select the View you Just Created.
Regards,
Ahmed
If my reply helped you, please give a 👍. And if it has solved your issue, please consider a 👍 & Accepting it as the Solution to help other members of the community find it more.
My Blog: www.powerplatformplace.com