{"id":1398,"date":"2024-12-21T15:09:00","date_gmt":"2024-12-21T20:09:00","guid":{"rendered":"https:\/\/automatethemundane.com\/index.php\/2024\/12\/21\/cards-for-power-apps\/"},"modified":"2024-12-21T15:09:00","modified_gmt":"2024-12-21T20:09:00","slug":"cards-for-power-apps","status":"publish","type":"post","link":"https:\/\/automatethemundane.com\/index.php\/2024\/12\/21\/cards-for-power-apps\/","title":{"rendered":"Cards for Power Apps"},"content":{"rendered":"\n<p class=\"has-text-color wp-block-paragraph\" style=\"color: rgb(0, 0, 0)\">I really like to use cards when sending notifications to users <a href=\"https:\/\/adaptivecards.io\/\">Adaptive Cards<\/a>, however, making complex cards can sometimes be unwieldy with a large card. Additionally, ensuring user output from a card is complex at times. This is where cards for power apps <a href=\"https:\/\/learn.microsoft.com\/en-us\/power-apps\/cards\/overview\">Cards for Power Apps overview - Power Apps | Microsoft Learn<\/a> comes into play. Cards for Power apps provide a \u201csimple\u201d canvas app interface, allowing users to take full advantage of PowerFX and multiple Datasources. To demonstrate how this all works, I am going to build a card and flow based on a Microsoft Planner board. It will go out each day and get tasks I am assigned, send me a teams message with the card, and allow me to update the task from the card, or navigate to the task and update it. <\/p>\n\n\n<p class=\"has-text-color wp-block-paragraph\" style=\"color: rgb(0, 0, 0)\">&nbsp;<\/p>\n\n\n<p class=\"has-text-color wp-block-paragraph\" style=\"color: rgb(0, 0, 0)\">The end product will look as follows:\n\n<\/p>\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/automatethemundane.com\/wp-content\/uploads\/2024\/12\/image-29.png\" alt=\"\"\/><\/figure>\n\n\n<p class=\"has-text-color wp-block-paragraph\" style=\"color: rgb(0, 0, 0)\">With the ability to click into each item and see any tasks from that selection. <\/p>\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/automatethemundane.com\/wp-content\/uploads\/2024\/12\/d7666e11-0977-48fb-88c0-9e04b11fc5bc.png\" alt=\"\"\/><\/figure>\n\n\n<p class=\"has-text-color wp-block-paragraph\" style=\"color: rgb(0, 0, 0)\">&nbsp;<\/p>\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/automatethemundane.com\/wp-content\/uploads\/2024\/12\/image-30.png\" alt=\"\"\/><\/figure>\n\n\n<p class=\"has-text-color wp-block-paragraph\" style=\"color: rgb(0, 0, 0)\">&nbsp;<\/p>\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/automatethemundane.com\/wp-content\/uploads\/2024\/12\/image-31.png\" alt=\"\"\/><\/figure>\n\n\n<p class=\"has-text-color wp-block-paragraph\" style=\"color: rgb(0, 0, 0)\">&nbsp;<\/p>\n\n\n<h1 class=\"wp-block-heading\">Building the Card<\/h1>\n\n\n<p class=\"has-text-color wp-block-paragraph\" style=\"color: rgb(0, 0, 0)\">From a solution, select new card\n<\/p>\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/automatethemundane.com\/wp-content\/uploads\/2024\/12\/image-32.png\" alt=\"\"\/><\/figure>\n\n\n<p class=\"has-text-color wp-block-paragraph\" style=\"color: rgb(0, 0, 0)\">Give the card a good name and description<\/p>\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/automatethemundane.com\/wp-content\/uploads\/2024\/12\/image-33.png\" alt=\"\"\/><\/figure>\n\n\n<p class=\"has-text-color wp-block-paragraph\" style=\"color: rgb(0, 0, 0)\">This will give us the core of the card and what it needs to start\n\n<\/p>\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/automatethemundane.com\/wp-content\/uploads\/2024\/12\/image-34-1024x459.png\" alt=\"\"\/><\/figure>\n\n\n<p class=\"has-background wp-block-paragraph\" style=\"background-color: rgb(241, 241, 239)\">&#x1f4a1; If you have ever built an adaptive card in the past you can select JSON in the upper right to see how the card is being created<\/p>\n\n\n<p class=\"has-text-color wp-block-paragraph\" style=\"color: rgb(0, 0, 0)\">The Tree view on the left hand pane looks just like the canvas app design studio with one minor difference. \n\n<\/p>\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/automatethemundane.com\/wp-content\/uploads\/2024\/12\/image-35.png\" alt=\"\"\/><\/figure>\n\n\n<p class=\"has-text-color wp-block-paragraph\" style=\"color: rgb(0, 0, 0)\">Within each page will be a body and an Actions sections. The body is where the core of the card will go, and the Actions is where buttons can be placed (though they can also be in the body). <\/p>\n\n\n<p class=\"has-background wp-block-paragraph\" style=\"background-color: rgb(241, 241, 239)\">&#x1f4a1; You will be tempted to delete the two default text labels, however the card designer is a bit finicky and keeping them in there will help for the time being <\/p>\n\n\n<h2 class=\"wp-block-heading\">Variables<\/h2>\n\n\n<p class=\"has-text-color wp-block-paragraph\" style=\"color: rgb(0, 0, 0)\">Before getting to work on the card design, the data structure needs to be defined. If we were connecting this to Dataverse we could easily connect this to a Dataverse table(s) and get rolling. But since we are connecting to Planner we need to have the data \u201cfed\u201d to the card via a Power Automate Flow. To get the data into the card we will make a series of variables. From the left hand pane, select variables and create three variables. <\/p>\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/automatethemundane.com\/wp-content\/uploads\/2024\/12\/image-36.png\" alt=\"\"\/><\/figure>\n\n\n<ol class=\"wp-block-list\">\n<li>colPlannerNoDates\n<ol class=\"wp-block-list\">\n<li>Type - Collection<\/li>\n\n\n<li>Columns\n<ol class=\"wp-block-list\">\n<li>PlanName - Text<\/li>\n\n\n<li>TaskName - Text<\/li>\n<\/ol>\n<\/li>\n\n\n<li>Purpose - Collect all tasks that are missing<\/li>\n<\/ol>\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/automatethemundane.com\/wp-content\/uploads\/2024\/12\/image-37.png\" alt=\"\"\/><\/figure>\n<\/li>\n\n\n\n<li>colPlannerHasDates\n<ol class=\"wp-block-list\">\n<li>Type - Collection<\/li>\n\n\n<li>Columns\n<ol class=\"wp-block-list\">\n<li>PlanName - Text<\/li>\n\n\n<li>TaskName - Text<\/li>\n\n\n<li>DueDate -Text<\/li>\n\n\n<li>PastDue - Boolean<\/li>\n<\/ol>\n<\/li>\n\n\n<li>Purpose - Collection for all tasks that have a date\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/automatethemundane.com\/wp-content\/uploads\/2024\/12\/image-38.png\" alt=\"\"\/><\/figure>\n<\/li>\n<\/ol>\n<\/li>\n\n\n\n<li>varSelection \n<ol class=\"wp-block-list\">\n<li>Type - Text<\/li>\n\n\n<li>Purpose - Used to control the visibility and filters of the collections on screens. <\/li>\n<\/ol>\n<\/li>\n<\/ol>\n\n\n<p class=\"has-text-color wp-block-paragraph\" style=\"color: rgb(0, 0, 0)\">&nbsp;<\/p>\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/automatethemundane.com\/wp-content\/uploads\/2024\/12\/image-39.png\" alt=\"\"\/><\/figure>\n\n\n<h2 class=\"wp-block-heading\">Pages<\/h2>\n\n\n<h3 class=\"wp-block-heading\">Main <\/h3>\n\n\n<p class=\"has-text-color wp-block-paragraph\" style=\"color: rgb(0, 0, 0)\">On each card, I like to add a header to announce to the user the purpose of the card. Add a container, two columns, and two text boxes<\/p>\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/automatethemundane.com\/wp-content\/uploads\/2024\/12\/image-40.png\" alt=\"\"\/><\/figure>\n\n\n<p class=\"has-text-color wp-block-paragraph\" style=\"color: rgb(0, 0, 0)\">Set the container style to emphasis. <\/p>\n\n\n<p class=\"has-text-color wp-block-paragraph\" style=\"color: rgb(0, 0, 0)\">Within the first text box add the following text<\/p>\n\n\n<pre class=\"wp-block-code\"><code>&quot; &#x1f4c6; Daily Task Reminder &quot; &amp; Text(Now(),DateTimeFormat.ShortDate)<\/code><\/pre>\n\n\n<p class=\"wp-block-paragraph\">&nbsp;<\/p>\n\n\n<p class=\"has-text-color wp-block-paragraph\" style=\"color: rgb(0, 0, 0)\">Within the second text box add the following <\/p>\n\n\n<pre class=\"wp-block-code\"><code>&quot;&#x1f514;&quot;<\/code><\/pre>\n\n\n<p class=\"wp-block-paragraph\">&nbsp;<\/p>\n\n\n<p class=\"has-text-color wp-block-paragraph\" style=\"color: rgb(0, 0, 0)\">&nbsp;<\/p>\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/automatethemundane.com\/wp-content\/uploads\/2024\/12\/image-41.png\" alt=\"\"\/><\/figure>\n\n\n<p class=\"has-text-color wp-block-paragraph\" style=\"color: rgb(0, 0, 0)\">&nbsp;<\/p>\n\n\n<p class=\"has-background wp-block-paragraph\" style=\"background-color: rgb(241, 241, 239)\">&#x1f4a1; I find the use of emojis within cards to be extremely useful. I have done images in the past, but find emojis work \u201cbetter\u201d<\/p>\n\n\n<p class=\"has-text-color wp-block-paragraph\" style=\"color: rgb(0, 0, 0)\">Below the container is a column set with three columns. Each column contains two text fields and a button set with one button. <\/p>\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/automatethemundane.com\/wp-content\/uploads\/2024\/12\/image-42.png\" alt=\"\"\/><\/figure>\n\n\n<ol class=\"wp-block-list\">\n<li>Past Due Column\n<ol class=\"wp-block-list\">\n<li>Style - attention<\/li>\n\n\n<li>Width - Stretch<\/li>\n\n\n<li>Header Text\n<pre class=\"wp-block-code\"><code>&quot;Past Due&quot;<\/code><\/pre>\n\n\n<p class=\"wp-block-paragraph\">&nbsp;<\/p>\n<\/li>\n\n\n<li>Value Text Box\n<pre class=\"wp-block-code\"><code>CountRows(Filter(colPlannerHasDates,PastDue = true))<\/code><\/pre>\n\n\n<p class=\"wp-block-paragraph\">&nbsp;<\/p>\n<\/li>\n\n\n<li>Button Set\n<ol class=\"wp-block-list\">\n<li>Button Verb\n<pre class=\"wp-block-code\"><code>Navigate(hasdates);Set(varSelection, &quot;past&quot;)<\/code><\/pre>\n\n\n<p class=\"wp-block-paragraph\">&nbsp;<\/p>\n<\/li>\n\n\n<li>Title\n<pre class=\"wp-block-code\"><code>&quot;View&quot;<\/code><\/pre>\n\n\n<p class=\"wp-block-paragraph\">&nbsp;<\/p>\n<\/li>\n<\/ol>\n<\/li>\n<\/ol>\n<\/li>\n\n\n\n<li>Today Column\n<ol class=\"wp-block-list\">\n<li>Style - warning<\/li>\n\n\n<li>Width - Stretch<\/li>\n\n\n<li>Header Text\n<pre class=\"wp-block-code\"><code>&quot;Due Today&quot;<\/code><\/pre>\n\n\n<p class=\"wp-block-paragraph\">&nbsp;<\/p>\n<\/li>\n\n\n<li>Value Text Box\n<pre class=\"wp-block-code\"><code>CountRows(Filter(colPlannerHasDates,PastDue = false))<\/code><\/pre>\n\n\n<p class=\"wp-block-paragraph\">&nbsp;<\/p>\n<\/li>\n\n\n<li>Button Set\n<ol class=\"wp-block-list\">\n<li>Button Verb\n<pre class=\"wp-block-code\"><code>Navigate(hasdates);Set(varSelection, &quot;today&quot;)<\/code><\/pre>\n\n\n<p class=\"wp-block-paragraph\">&nbsp;<\/p>\n<\/li>\n\n\n<li>Title\n<pre class=\"wp-block-code\"><code>&quot;View&quot;<\/code><\/pre>\n\n\n<p class=\"wp-block-paragraph\">&nbsp;<\/p>\n<\/li>\n<\/ol>\n<\/li>\n<\/ol>\n<\/li>\n\n\n\n<li>No Dates Column\n<ol class=\"wp-block-list\">\n<li>Style - accent<\/li>\n\n\n<li>Width - Stretch<\/li>\n\n\n<li>Header Text\n<pre class=\"wp-block-code\"><code>&quot;Missing Dates&quot;<\/code><\/pre>\n\n\n<p class=\"wp-block-paragraph\">&nbsp;<\/p>\n<\/li>\n\n\n<li>Value Text Box\n<pre class=\"wp-block-code\"><code>CountRows(colPlannerNoDates)<\/code><\/pre>\n\n\n<p class=\"wp-block-paragraph\">&nbsp;<\/p>\n<\/li>\n\n\n<li>Button Set\n<ol class=\"wp-block-list\">\n<li>Button Verb\n<pre class=\"wp-block-code\"><code>Navigate(missingDates)<\/code><\/pre>\n\n\n<p class=\"wp-block-paragraph\">&nbsp;<\/p>\n<\/li>\n\n\n<li>Title\n<pre class=\"wp-block-code\"><code>&quot;View&quot;<\/code><\/pre>\n\n\n<p class=\"wp-block-paragraph\">&nbsp;<\/p>\n<\/li>\n<\/ol>\n<\/li>\n<\/ol>\n<\/li>\n<\/ol>\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/automatethemundane.com\/wp-content\/uploads\/2024\/12\/image-43.png\" alt=\"\"\/><\/figure>\n\n\n<h3 class=\"wp-block-heading\">Has Dates<\/h3>\n\n\n<p class=\"has-text-color wp-block-paragraph\" style=\"color: rgb(0, 0, 0)\">The has dates page will follow the same format as the first; the container at the top and the columns and the text. <\/p>\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/automatethemundane.com\/wp-content\/uploads\/2024\/12\/image-44.png\" alt=\"\"\/><\/figure>\n\n\n<p class=\"has-text-color wp-block-paragraph\" style=\"color: rgb(0, 0, 0)\">The header text will be as follows <\/p>\n\n\n<pre class=\"wp-block-code\"><code>&quot; &#x1f4c6; Daily Task Reminder - &quot; &amp; If(varSelection = &quot;today&quot;, &quot;Due Today&quot;,&quot;Past Due&quot;)<\/code><\/pre>\n\n\n<p class=\"wp-block-paragraph\">&nbsp;<\/p>\n\n\n<p class=\"has-text-color wp-block-paragraph\" style=\"color: rgb(0, 0, 0)\">The header icon will be <\/p>\n\n\n<pre class=\"wp-block-code\"><code>&quot;&#x1f554;&quot;<\/code><\/pre>\n\n\n<p class=\"wp-block-paragraph\">&nbsp;<\/p>\n\n\n<p class=\"has-text-color wp-block-paragraph\" style=\"color: rgb(0, 0, 0)\">&nbsp;<\/p>\n\n\n<p class=\"has-text-color wp-block-paragraph\" style=\"color: rgb(0, 0, 0)\">To view the actual data, a table is added. Within the table three columns and two rows are used. <\/p>\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/automatethemundane.com\/wp-content\/uploads\/2024\/12\/image-45.png\" alt=\"\"\/><\/figure>\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/automatethemundane.com\/wp-content\/uploads\/2024\/12\/image-46.png\" alt=\"\"\/><\/figure>\n\n\n<p class=\"has-text-color wp-block-paragraph\" style=\"color: rgb(0, 0, 0)\">Each row will contain a text box. The first row will serve as the header for the table. For the second row set the data as follows.<\/p>\n\n\n<pre class=\"wp-block-code\"><code>If(varSelection= &quot;today&quot;, Filter(colPlannerHasDates,PastDue = false),Filter(colPlannerHasDates,PastDue = true))<\/code><\/pre>\n\n\n<p class=\"wp-block-paragraph\">&nbsp;<\/p>\n\n\n<p class=\"has-text-color wp-block-paragraph\" style=\"color: rgb(0, 0, 0)\">This will create a row for each item in the collection when data is present. <\/p>\n\n\n<p class=\"has-text-color wp-block-paragraph\" style=\"color: rgb(0, 0, 0)\">To display the data simply use PowerFX in each text box<\/p>\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-8f761849 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<pre class=\"wp-block-code\"><code>ThisItem.PlanName<\/code><\/pre>\n\n\n<p class=\"wp-block-paragraph\">&nbsp;<\/p>\n\n<\/div>\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<pre class=\"wp-block-code\"><code>ThisItem.TaskName<\/code><\/pre>\n\n\n<p class=\"wp-block-paragraph\">&nbsp;<\/p>\n\n<\/div>\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<pre class=\"wp-block-code\"><code>ThisItem.DueDate<\/code><\/pre>\n\n\n<p class=\"wp-block-paragraph\">&nbsp;<\/p>\n\n<\/div>\n\n<\/div>\n\n\n<p class=\"has-text-color wp-block-paragraph\" style=\"color: rgb(0, 0, 0)\">Finally, in the Actions section, add a single button that will return the user to the main screen. <\/p>\n\n\n<pre class=\"wp-block-code\"><code>Navigate(main);Set(varSelection,&quot;&quot;)<\/code><\/pre>\n\n\n<p class=\"wp-block-paragraph\">&nbsp;<\/p>\n\n\n<h3 class=\"wp-block-heading\">Missing Dates<\/h3>\n\n\n<p class=\"has-text-color wp-block-paragraph\" style=\"color: rgb(0, 0, 0)\">The missing dates page will follow the same style as the has dates page. However, there will be no date column added to the table. <\/p>\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/automatethemundane.com\/wp-content\/uploads\/2024\/12\/image-47.png\" alt=\"\"\/><\/figure>\n\n\n<p class=\"has-text-color wp-block-paragraph\" style=\"color: rgb(0, 0, 0)\">The data for the second row will be the collection with no dates<\/p>\n\n\n<pre class=\"wp-block-code\"><code>colPlannerNoDates<\/code><\/pre>\n\n\n<p class=\"wp-block-paragraph\">&nbsp;<\/p>\n\n\n<p class=\"has-text-color wp-block-paragraph\" style=\"color: rgb(0, 0, 0)\">&nbsp;<\/p>\n\n\n<h1 class=\"wp-block-heading\">Power Automate Flow<\/h1>\n\n\n<p class=\"has-text-color wp-block-paragraph\" style=\"color: rgb(0, 0, 0)\">This flow will trigger everyday and uses the Lists my tasks from the Planner Connector<\/p>\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/automatethemundane.com\/wp-content\/uploads\/2024\/12\/image-48.png\" alt=\"\"\/><\/figure>\n\n\n<p class=\"has-text-color wp-block-paragraph\" style=\"color: rgb(0, 0, 0)\">Then to ensure that we only get tasks that are in progress or not started add a filter array.<\/p>\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/automatethemundane.com\/wp-content\/uploads\/2024\/12\/image-49.png\" alt=\"\"\/><\/figure>\n\n\n<p class=\"has-text-color wp-block-paragraph\" style=\"color: rgb(0, 0, 0)\">&nbsp;<\/p>\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/automatethemundane.com\/wp-content\/uploads\/2024\/12\/image-50.png\" alt=\"\"\/><\/figure>\n\n\n<pre class=\"wp-block-code\"><code>@not(notequals(@{item()?[&#039;percentComplete&#039;]},&quot;100&quot;))<\/code><\/pre>\n\n\n<p class=\"wp-block-paragraph\">&nbsp;<\/p>\n\n\n<p class=\"has-text-color wp-block-paragraph\" style=\"color: rgb(0, 0, 0)\">&nbsp;<\/p>\n\n\n<p class=\"has-text-color wp-block-paragraph\" style=\"color: rgb(0, 0, 0)\">Two array variables are then created <\/p>\n\n\n<p class=\"has-text-color wp-block-paragraph\" style=\"color: rgb(0, 0, 0)\">&nbsp;<\/p>\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/automatethemundane.com\/wp-content\/uploads\/2024\/12\/image-51.png\" alt=\"\"\/><\/figure>\n\n\n<p class=\"has-text-color wp-block-paragraph\" style=\"color: rgb(0, 0, 0)\">Then for each loop will be added using the body of the filter array<\/p>\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/automatethemundane.com\/wp-content\/uploads\/2024\/12\/image-52.png\" alt=\"\"\/><\/figure>\n\n\n<p class=\"has-text-color wp-block-paragraph\" style=\"color: rgb(0, 0, 0)\">The first step within the loop will be to reach out and get the plan name using the graph endpoint<\/p>\n\n\n<p class=\"has-background wp-block-paragraph\" style=\"background-color: rgb(241, 241, 239)\">&#x1f4a1; This has to be done because when listing \u201cMy Tasks\u201d, only the ID of the plan is given and not the name. <\/p>\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/automatethemundane.com\/wp-content\/uploads\/2024\/12\/image-53.png\" alt=\"\"\/><\/figure>\n\n\n<p class=\"has-text-color wp-block-paragraph\" style=\"color: rgb(0, 0, 0)\">&nbsp;<\/p>\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/automatethemundane.com\/wp-content\/uploads\/2024\/12\/image-54.png\" alt=\"\"\/><\/figure>\n\n\n<p class=\"has-text-color wp-block-paragraph\" style=\"color: rgb(0, 0, 0)\">Then a condition that check for missing dates is added\n\n<\/p>\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/automatethemundane.com\/wp-content\/uploads\/2024\/12\/image-55.png\" alt=\"\"\/><\/figure>\n\n\n<p class=\"has-text-color wp-block-paragraph\" style=\"color: rgb(0, 0, 0)\">&nbsp;<\/p>\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/automatethemundane.com\/wp-content\/uploads\/2024\/12\/image-56.png\" alt=\"\"\/><\/figure>\n\n\n<p class=\"has-text-color wp-block-paragraph\" style=\"color: rgb(0, 0, 0)\">If the condition is false the array varMissingDatesTasks is appended<\/p>\n\n\n<p class=\"has-text-color wp-block-paragraph\" style=\"color: rgb(0, 0, 0)\">&nbsp;<\/p>\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/automatethemundane.com\/wp-content\/uploads\/2024\/12\/image-57.png\" alt=\"\"\/><\/figure>\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/automatethemundane.com\/wp-content\/uploads\/2024\/12\/image-58.png\" alt=\"\"\/><\/figure>\n\n\n<p class=\"has-text-color wp-block-paragraph\" style=\"color: rgb(0, 0, 0)\">If it is true, a condition will be added to check if it is past due. <\/p>\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/automatethemundane.com\/wp-content\/uploads\/2024\/12\/image-59.png\" alt=\"\"\/><\/figure>\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/automatethemundane.com\/wp-content\/uploads\/2024\/12\/image-60.png\" alt=\"\"\/><\/figure>\n\n\n<p class=\"has-text-color wp-block-paragraph\" style=\"color: rgb(0, 0, 0)\">If true the array variable varTasksHasDates will be appended to<\/p>\n\n\n<p class=\"has-text-color wp-block-paragraph\" style=\"color: rgb(0, 0, 0)\">&nbsp;<\/p>\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/automatethemundane.com\/wp-content\/uploads\/2024\/12\/image-61.png\" alt=\"\"\/><\/figure>\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/automatethemundane.com\/wp-content\/uploads\/2024\/12\/image-62.png\" alt=\"\"\/><\/figure>\n\n\n<pre class=\"wp-block-code\"><code>string(formatDateTime(item()?[&#039;dueDateTime&#039;], &#039;yyyy-MM-dd&#039;))<\/code><\/pre>\n\n\n<p class=\"wp-block-paragraph\">&nbsp;<\/p>\n\n\n<p class=\"has-text-color wp-block-paragraph\" style=\"color: rgb(0, 0, 0)\">&nbsp;<\/p>\n\n\n<p class=\"has-text-color wp-block-paragraph\" style=\"color: rgb(0, 0, 0)\">If it is false, a third and final condition will be added to check if the date of the task is today. <\/p>\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/automatethemundane.com\/wp-content\/uploads\/2024\/12\/image-63.png\" alt=\"\"\/><\/figure>\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/automatethemundane.com\/wp-content\/uploads\/2024\/12\/image-64.png\" alt=\"\"\/><\/figure>\n\n\n<p class=\"has-text-color wp-block-paragraph\" style=\"color: rgb(0, 0, 0)\">Then the array varTasksHasDates will be appended again except the Past Due Column will be false. <\/p>\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/automatethemundane.com\/wp-content\/uploads\/2024\/12\/image-65.png\" alt=\"\"\/><\/figure>\n\n\n<p class=\"has-text-color wp-block-paragraph\" style=\"color: rgb(0, 0, 0)\">&nbsp;<\/p>\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/automatethemundane.com\/wp-content\/uploads\/2024\/12\/image-66.png\" alt=\"\"\/><\/figure>\n\n\n<p class=\"has-text-color wp-block-paragraph\" style=\"color: rgb(0, 0, 0)\">After the loop, a generate card action is added. In the action, the card created earlier is selected and the two arrays are added as inputs. <\/p>\n\n\n<p class=\"has-text-color wp-block-paragraph\" style=\"color: rgb(0, 0, 0)\">&nbsp;<\/p>\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/automatethemundane.com\/wp-content\/uploads\/2024\/12\/image-67.png\" alt=\"\"\/><\/figure>\n\n\n<p class=\"has-text-color wp-block-paragraph\" style=\"color: rgb(0, 0, 0)\">&nbsp;<\/p>\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/automatethemundane.com\/wp-content\/uploads\/2024\/12\/image-68.png\" alt=\"\"\/><\/figure>\n\n\n<p class=\"has-text-color wp-block-paragraph\" style=\"color: rgb(0, 0, 0)\">Then a final action is added that will post the card to the user in a chat<\/p>\n\n\n<p class=\"has-text-color wp-block-paragraph\" style=\"color: rgb(0, 0, 0)\">&nbsp;<\/p>\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/automatethemundane.com\/wp-content\/uploads\/2024\/12\/image-69.png\" alt=\"\"\/><\/figure>\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/automatethemundane.com\/wp-content\/uploads\/2024\/12\/image-70.png\" alt=\"\"\/><\/figure>\n\n\n<p class=\"has-text-color wp-block-paragraph\" style=\"color: rgb(0, 0, 0)\">&nbsp;<\/p>\n\n\n<p class=\"has-text-color wp-block-paragraph\" style=\"color: rgb(0, 0, 0)\">&nbsp;<\/p>\n\n","protected":false},"excerpt":{"rendered":"<p>I really like to use cards when sending notifications to users Adaptive Cards, however, making complex cards can sometimes be unwieldy with a large card. Additionally, ensuring user output from a card is complex at times. This is where cards for power apps Cards for Power Apps overview &#8211; Power Apps | Microsoft Learn comes [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":1383,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[51,53,30,52],"tags":[],"class_list":["post-1398","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-cards","category-planner","category-power-automate","category-solutions","entry","has-media"],"jetpack_featured_media_url":"https:\/\/automatethemundane.com\/wp-content\/uploads\/2024\/12\/photo-1532630174493-69e1fe9fead2-scaled.jpg","_links":{"self":[{"href":"https:\/\/automatethemundane.com\/index.php\/wp-json\/wp\/v2\/posts\/1398","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/automatethemundane.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/automatethemundane.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/automatethemundane.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/automatethemundane.com\/index.php\/wp-json\/wp\/v2\/comments?post=1398"}],"version-history":[{"count":0,"href":"https:\/\/automatethemundane.com\/index.php\/wp-json\/wp\/v2\/posts\/1398\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/automatethemundane.com\/index.php\/wp-json\/wp\/v2\/media\/1383"}],"wp:attachment":[{"href":"https:\/\/automatethemundane.com\/index.php\/wp-json\/wp\/v2\/media?parent=1398"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/automatethemundane.com\/index.php\/wp-json\/wp\/v2\/categories?post=1398"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/automatethemundane.com\/index.php\/wp-json\/wp\/v2\/tags?post=1398"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}