Visualize Adaptive Card for Teams user action within a Cloud Flow | Experimental Feature

Microsoft Teams’ connector for Cloud Flows (Power Automate), and if you are looking to use Adaptive Cards for Microsoft Teams from the connector. There are chances that you’ll see some options to post an Adaptive Cards to Teams.

I’m exclusively covering a Teams’ connector’s Action called as Post an Adaptive Card to a Teams user and wait for a response.

But, you also have an improved Adaptive Cards Action in the Microsoft Teams’ connector that let’s you save the progress of the Card in the Flow itself!

Also, I found this effective for only 1 Action from the Microsoft Team’s Adaptive Card related actions. Not others.

Adaptive Card to Teams User – Regular

So, if you see the below –

With the above Adaptive Card, you’ll need to work in https://adaptivecards.io/ and paste the Card payload here and then save it. Also, you can’t visualize it within the Flow step itself.

Turn on Experimental Features for Flow

  1. Look for the Gear icon in Settings and look for All Power Automate Settings


  2. If the Experimental Features show below is turned Off, please turn it on.

Adaptive Card with Experimental Features On

  1. Now, if you select the same Action from the Power Automate step

  2. You’ll see the Step Action having the below details.


  3. Once you click on Create Adaptive Card, you’ll see the Designer itself in the Flow Steps which you can create the Card on the fly within the Flow and save the same as well.


    Hope this helps!!

Here are some more Power Automate posts you might want to look at –

  1. FormatDateTime function in a Flow | Power Automate
  2. Formatting Approvals’ Details in Cloud Flows | Power Automate
  3. Trigger Conditions not working in a Cloud Flow? Here’s Why | Power Automate Quick Tip
  4. Read OptionSet Labels from CDS/Dataverse Triggers or Action Steps in a Flow | Power Automate
  5. Save Adaptive Cards work using VS Code Extension – Adaptive Cards Studio | Quick Tip
  6. Adaptive Cards for Outlook Actionable Messages using Power Automate | Power Platform
  7. Parallel Branching in Cloud Flows – Isolate Response dependent Step Actions in parallel branches | Quick Tip
  8. Using outputs() function and JSON Parse to read data from missing dynamic value in a Flow | Power Automate
  9. Using triggerBody() / triggerOutput() to read CDS trigger metadata attributes in a Flow | Power Automate
  10. Call HTTP Request from a Canvas Power App using Flow and get back Response | Power Automate

Thank you!!

Advertisement

Multi-select Items from Gallery and adding/removing them from Collections | Power Platform

Now, let’s say you want to be able to select a few Gallery Items and the same should be populated to a Gallery and even from Collection as well.

You can use this scenario if you want to create a Collection of some GUIDs/Account Names and then take separate action on it or handle it in some other context.

Add Check box in a Gallery

Let’s take a simple example-

  1. I added a Check Box in a simple Gallery list.


  2. Align as per your preference. It also comes with a Default “Option” label which you can remove.


  3. Now, there are 2 properties which you can use to add to a Collection and remove from the same collection.
    Let’s look at the first one – OnCheck


  4. Under OnCheck function, I’ll add the current item to the Collection (A new collection will be created if not already created)
    Blue denotes function used to create a Collection. Collect() function – Microsoft Documentation on the Collect() function – https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-clear-collect-clearcollect?WT.mc_id=DX-MVP-5003911
    Green arrow denotes the name of the Collection I’m creating.
    Red arrow denotes the current Item from the Gallery control and the Account Name field which I want to populate in my collection.
    This will add the Account Name of the record to the Collection once the Check box is checked.


  5. Under OnUncheck function, I’ll add the formula to remove the current Item from the Collection.
    Blue denotes the function used to remove a value from the Collection. Microsoft Documentation of the same is here – https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-remove-removeif?WT.mc_id=DX-MVP-5003911
    Green arrow denotes the name of the Collection from which I have to remove the value.
    Red arrow denotes the current Item which I had added to the Collection when the Box was checked. It’ll use the same reference.
    This will Remove the Account Name which was added to the Collection when the checkbox was checked.


    For simplicity, I’m taking Account Names to show in the Collection, you can create a structure in Collection and map Item values as per your needs.

Changes in Collection (Using Data table to visualize)

Just to show/visualize how the Collection will look when I interact with the Check boxes on the Gallery, I’ve added a Data table to keep the demonstration simple.



And populate the Items with the Collection’s Value. Because all the Account Names we added to Collection while marking Check box as Checked will fall under .Value

Working

As you select and unselect items from the Gallery, they are added to and removed from the Collection which is seen in the Data Table below.

Hope this helps!!

Here are some more Canvas Power Apps related posts you might want to check out –

  1. Setting Correct Default Mode for Forms in a Canvas App | [Quick Tip]
  2. Implement character length validation in a Canvas Power App | Power Platform
  3. Rating Control to represent data from Dataverse in a Canvas Power App | Power Platform
  4. Clear a field value & Reset Form in a Canvas Power App [Quick Tip]
  5. Get Dynamics 365 field metadata in a Canvas App using DataSourceInfo function | Common Data Service
  6. Debug Published Canvas Power App with other users using Monitor | Power Platform
  7. Download a File from a Canvas Power App using a button | Power Platform
  8. AddColumns() function to dynamically add columns to a Data table in Canvas Power App | SharePoint List
  9. Logged In User details in a Canvas Power App
  10. Dependent OptionSets in a Canvas Power App for 1:N related CDS entities | Power Platform
  11. Implement real-time search in Gallery of CDS records in a Canvas Power App | Power Platform
  12. Implementing Exit app, Logout and Confirm Exit features in a Canvas Power App

    Thank you!

FormatDateTime function in a Flow | Power Automate

DateTime fields from Dataverse / Common Data Service (Current Environment) are retrieved in full Date and Time format. And in common applications, you are required to only retrieve the Date and not the Time. Or even Format the Date Time in a certain way.

Let’s look at how to format DateTime in a Flow which appears as below

Let’s look at a simple example by trying to format a Created On date field.

FormatDateTime function

  1. Let’s a take a variable of type String to store our formatted Date. Now, in the variable, go for Functions and look for FormatDateTime function.


  2. Now, it asks for 2 parameters – TimeStamp and Format.

  3. Since I’m picking the field from the trigger itself, I’ll use the below formula to pick from triggerBody().

    In case you want to also learn how to use triggerBody(), triggerOutputs() or outputs(), you can refer below posts –
    1. Using triggerBody() / triggerOutput() to read CDS trigger metadata attributes in a Flow | Power Automate
    2. Using outputs() function and JSON Parse to read data from missing dynamic value in a Flow | Power Automate

  4. In the second parameter, put the format of the date in single quotations as shown below –


    You can follow this official Microsoft documentation – https://docs.microsoft.com/en-gb/dotnet/standard/base-types/custom-date-and-time-format-strings?WT.mc_id=DX-MVP-5003911

  5. And your Date Format is set. When you run the Flow, you’ll get the formatted date.


    Hope this was quick and helpful!

Here are some more Power Automate / Flow posts you might like to check –

  1. Formatting Approvals’ Details in Cloud Flows | Power Automate
  2. Number Formatting in a Flow | Power Automate
  3. Parallel Branching in Cloud Flows – Isolate Response dependent Step Actions in parallel branches | Quick Tip
  4. Trigger Conditions not working in a Cloud Flow? Here’s Why | Power Automate Quick Tip
  5. InvalidWorkflowTriggerName or InvalidWorkflowRunActionName error in saving Cloud Flows | Power Automate Quick Tip
  6. Read OptionSet Labels from CDS/Dataverse Triggers or Action Steps in a Flow | Power Automate
  7. Run As context in CDS (Current Environment) Flow Trigger | Power Automate
  8. Setting Lookup in a Flow CDS Connector: Classic vs. Current Environment connector | Power Automate Quick Tip
  9. Make On-Demand Flow to show up in Dynamics 365 | Power Automate
  10. Task Completion reminder using Flow Bot in Microsoft Teams | Power Automate

Thank you!!

Use Rich-Text Control for Multiple Lines of Text in Dynamics 365 CE | Quick Tip

With the addition of the Rich Text Control, your Multiple Lines of Text field can make a lot more sense than before.

Standard Control

Your usual control for Multiple Lines of Text looks like this

Rich Text Control

Now, you can turn this into a Rich Text Editor
Here’s how you do it –

  1. Go to the Multiple Lines of Text field, in this case, Description field.
    select the inner control and click on Properties


  2. Now, look for Controls tab and click on Add Control as shown below

  3. Look for Rich Text Editor Control

  4. Make sure you select the new Control on all formats (or wherever you want to apply)

  5. Once you apply changes and publish, the new Control will be available for you to use.


Hope this was useful. Here are some more Dynamic 365 posts which you might want to check –

  1. Ribbon button visibility based on a field value in Dynamics 365 | Ribbon Workbench
  2. Get GUID of the current View in Dynamics 365 CRM JS from ribbon button | Ribbon Workbench
  3. Make On-Demand Flow to show up in Dynamics 365 | Power Automate
  4. Find deprecated JS code used in your Dynamics 365 environment | Dynamics 365 v9 JS Validator tool | XrmToolBox
  5. Remove ‘This Email has been blocked due to potentially harmful content.’ message in Dynamics 365 Emails | OrgDbSettings utility
  6. Track and Set Regarding are disabled for Appointments in Dynamics 365 App For Outlook message | Demystified
  7. Mailbox Alerts Hide/Show behavior in Dynamics 365 CRM
  8. Dynamics 365 App For Outlook missing on SiteMap in CRM? Use shortcut link [Quick Tip]
  9. Pass Execution Context to JS Script function as a parameter from a Ribbon button in Dynamics 365 | Ribbon Workbench
  10. Find Created On date of solution components in Solution Layers | Dynamics 365 [Quick Tip]

Thank you!

Ribbon button visibility based on a field value in Dynamics 365 | Ribbon Workbench

Most times, requirement is as simple as being able to show or hide a ribbon button based on a value of the field on the record.

Scenario

Let’s consider this scenario, a button on Lead entity called as “Evaluate” exists. It should be only visible if the Lead Source (OptionSet) is set to Partner.


And the button should be hidden if the condition is not satisfied.

Enable Rule based on Value

Now, let’s see how we achieve this –

  1. In Ribbon Workbench, in your Command which is tied to the button, you need to add a Display Rule.

  2. In the Display Rule, you’ll need to select ValueRule.

  3. In the value Rule, you’ll need to specify the field name and the value to consider.
    So here, the field I want to consider is “leadsourcecode” i.e. “Lead Source” field on the Lead entity and 4 is the value of the Partner option.


  4. and finally make sure your Display Rule is correctly tied to the Command on the button (And yes, the Command should also be tied to the Button itself.)

  5. And finally Publish your changes.

Execution

Now, when the Lead has value as Partner, the button will be visible

And when the value is something else, it will be hidden once the record is saved.

Note: In this case if your condition is based on multiple values, consider adding more Display Rules and patch them together using OrRule as one Rule will cater to only 1 value.

Hope this helps!

Here are some more Ribbon Workbench related posts you might want to check out –

  1. Get GUID of the current View in Dynamics 365 CRM JS from ribbon button | Ribbon Workbench
  2. Pass Execution Context to JS Script function as a parameter from a Ribbon button in Dynamics 365 | Ribbon Workbench
  3. Pass selected rows’ GUIDs to ribbon button in D365 | Ribbon Workbench
  4. Debug Ribbon button customization using Command Checker in Dynamics 365 CE Unified Interface
  5. Show Ribbon button only on record selection in Dynamics CRM
  6. Hide Custom Ribbon Button [Easy Way] – Ribbon Workbench
  7. Enable Flow button on D365 Ribbon
  8. [SOLVED] Navigating URL from Ribbon’s custom button in Dynamics for Phones app
  9. Create a New Record button for Activity Type entity using Ribbon Workbench: D365
  10. D365 Ribbon Button shortcut to open a Document in SharePoint Online

Thank you!!

Formatting Approvals’ Details in Cloud Flows | Power Automate

Now, not always Approvals details/description should appear as plain text. In order to enrich the Details of an Approval Adaptive Cards (which you can send as part of standard Approvals provided by Cloud Flows / Power Automate)
In this post, I’ll be looking at an example to format Details for a “Start and wait for an approval” Action step in Power Automate / Cloud Flow


You can enrich the Details so that they appear easy to read and are more meaningful.

Scenario

Let’s say I receive the below Approval with the Details mentioned as below.

And the Details section as you see appears bland without formatting. Let’s format the same using some Markdown examples.

Markdown Support for Details in Approvals in Cloud Flows

  1. If you select Approvals and notice the Details field, you’ll see a watermark saying that Markdown is supported.

  2. Markdown is a light-weight markup language for formatted text. MS Docs Official Link for all Markdown usage: https://docs.microsoft.com/en-us/power-automate/approvals-markdown-support?WT.mc_id=DX-MVP-5003911
  3. Let’s look at how the below plain text can be enriched using Markdown

  4. Now, understanding how Markdown is used from the documentation provided above, you can format the details as below –

  5. And the formatted Details section looks more meaningful and appealing.

Hope this helps!

Here are some more Power Automate / Cloud Flows posts you might want to look at –

  1. Trigger Conditions not working in a Cloud Flow? Here’s Why | Power Automate Quick Tip
  2. Read OptionSet Labels from CDS/Dataverse Triggers or Action Steps in a Flow | Power Automate
  3. Parallel Branching in Cloud Flows – Isolate Response dependent Step Actions in parallel branches | Quick Tip
  4. InvalidWorkflowTriggerName or InvalidWorkflowRunActionName error in saving Cloud Flows | Power Automate Quick Tip
  5. Using outputs() function and JSON Parse to read data from missing dynamic value in a Flow | Power Automate
  6. Create a Team, add Members in Microsoft Teams upon Project and Team Members creation in PSA / Project Operations | Power Automate
  7. Adaptive Cards for Outlook Actionable Messages using Power Automate | Power Platform
  8. Make On-Demand Flow to show up in Dynamics 365 | Power Automate
  9. Run As context in CDS (Current Environment) Flow Trigger | Power Automate
  10. Call HTTP Request from a Canvas Power App using Flow and get back Response | Power Automate

Thank you !!