Tip #1388: Check if someone is out

I’m creating an approval flow with Power Automate, and if the approval email gets an out-of-office response, I want to route the approval to somebody else

Reader

That’s a really good idea–say the manager is on a two-week vacation at the time the approval comes in, you don’t want to wait until she comes back before the request can be approved.

But relying on getting an email back is not very dependable. I would recommend checking for that condition before you send the approval request.

The Office 365 Outlook connector for Power Automate lets you check for automatic responses via the Get mail tips for a mailbox (V2) action. Using the Get mail tips action you can identify if automatic replies are turned on or if the mailbox is full.

So in the approval flow, before the approval step you could get the mail tips for the approver’s inbox, and then conditionally send the approval request to the manager or her alternate.

Note automatic replies is an array, so you will need to use a formula like the following in your condition.

body('Get_Auto_Response')['value'][0]['automaticReplies']?['message']

Replace “Get_Auto_Response” with whatever the name of your get mail tips step is.

Tip #1387: Power Apps Form submitted but data not saved

The following tip is from Triasha Jalui. (Got a tip? Email it to jar@crmtipoftheday.com)

You create a Power Apps canvas app, add a form, bind it with the Common Data Service entity. On the form you add all the necessary fields. Now you want to save the form/record. You use the SubmitForm function in the OnSelect property of a Button or Icon to save or update the form but some of the fields value is not saved while the record is created or updated.

SubmitForm validates some of the behavior while submitting the record. Sometimes the Update property on the Card for the field is blank. If that happens, the field value is not saved or updated in CDS. Make sure the Update property on the fields Card is set while developing the Canvas App.

Tip #1386: I miss the green bar

If you use the new solution import process at make.powerapps.com, you might miss the old green bar that told you how far the import had proceeded.

The good news is, while the green bar is gone, the underlying data that fed the bar is still there. You can query the importjob entity to see how much of the import is complete.

<fetch top="50" >
  <entity name="importjob" >
    <attribute name="solutionname" />
    <attribute name="progress" />
    <attribute name="startedon" />
    <attribute name="completedon" />
    <attribute name="modifiedon" />
    <attribute name="importcontext" />
    <attribute name="operationcontext" />
    <attribute name="modifiedby" />
    <attribute name="solutionid" />
    <attribute name="importjobid" />
    <attribute name="createdon" />
    <attribute name="organizationid" />
    <attribute name="createdby" />
    <attribute name="data" />
    <attribute name="name" />
    <order attribute="createdon" descending="true" />
  </entity>
</fetch>

Run this query with the XrmToolBox and refresh until the import finishes.

Thanks to Ivan Kurtev for the suggestion.

Cover photo by Anshu A on Unsplash

Tip #1385: Can not see environment

The administrator gave me a role in a Power Platform/Dynamics 365 environment, but I cannot see that environment in the environment selector from make.powerapps.com or the Power Platform Admin Center.

Lots of people lately

So if you cannot reach an environment after being granted access to it, I’ve discovered the following seemingly fool-proof method of making that environment available:

  1. Have the admin go to make.powerapps.com, select the environment, and create and save any canvas app (even a totally blank one).
  2. Have the admin share the app in step 1 with you.
  3. Open the app from the share email you receive.
  4. You should now see the environment from all maker and admin portals.

Tip #1384: Inline Code in Power Automate

I finally found some courage to publish a video tip of my own. Why now? Because the topic is just too good to simply write it down. You have to see it! What is it? It’s JavaScript code inside Power Automate – yes, we can!

Watch this video to learn how to build the simplest possible Azure Function that will bring inline code execution to your flows! The possibilities are endless – regular expressions, recursive functions, math operations, and much more.

WATCH VIDEO

Tip #1383: Fire and forget flows

When you fire up a child workflow in classic workflow, it’s always asynchronous. Fire and forget. Sometimes it’s what you need, sometimes you want to insist on child finishing their greens before the dessert, so to speak.

Power Automate, on the other hand, always wants the result when you call a child flow and nags you about it:

But what if you don’t want to wait? What if you want start a child flow but really don’t care about the result?

Output action (either Respond to a PowerApp or flow or Response) is usually the last one in the child flow, kind of a return statement. But it does not have to be – you can include this action as one of the first steps in the child flow. You can even add the output in case you need to tell your parent something like “I’m going to get some milk, back in 3 days”.

The child will execute that respond action and move onto the subsequent steps as if nothing has happened. Everyone’s happy.

Cover image Fire and forget missile / CC BY-SA

Tip #1382: Build a bot with Power Virtual Agents in less than 10 minutes

I always wanted to have a boat. But you know what they say: there are two happy days in the life of every boat owner – the day they bought the boat and the day they sold it. Ah, you meant BOT? Oops… Well, same story, as it turned out, kind of “meet the creator” moment.

In this video, Derik will walk you through the process of creating a chat boat bot with Power Virtual Agents.

Watch the video

Tip #1381: Fixed reference entity in Power Automate

Need to reference a fixed record, for example, Accounts Payables, or SARS-CoV-2? Challenge with fixed records is that we have no idea what the record identifier is, how to reliably search for the record and how to pass it as a parameter between environments.

Why not to use a fixed guid and create that entity when needed?

  1. Goto https://www.guidgenerator.com/ or any other guid generator of your choice.
  2. Generate a new guid. Don’t worry about duplicate detection. You have not seen that guid before, trust me.
  3. Get the record you’re after using that guid
    • restrict the attributes to what you need; if checking for the record presence and nothing else, put in just the primary key entitynameid.
  4. Create that record if failed
    • configure create action to run on fail
    • set record id to that guid you’ve created earlier
  5. Now you can safely use the reference in lookups etc.

Something like this:

Cover photo by Thorn Yang from Pexels

Tip #1379: App People vs. Flow People

The wand picks the wizard

Nick Doelman

Too tired to read? Why wouldn’t you listen instead – t.j.

It’s been my observation that with a few notable exceptions, people in the Power Platform community primarily focus on Power Apps or on Power Automate. Lots of people will use both, but generally people are more “app people” or “flow people.”

I don’t have a strong preference between the two, and I regularly use and enjoy both platforms, but I’ve had conversations with people in the community that say something along the following lines:

Flow Person: “I love Power Automate, but Power Apps (canvas apps) are confusing.”

Apps Person: “I can write canvas apps all day long but you need to be a developer to use Power Automate.”

I’ve also noticed that if you suggest a flow solution in the Power Apps forum or an app solution in the Power Automate forum at powerusers.microsoft.com, people will give you funny looks.

Intrigued by this phenomenon, I interviewed some of my friends in the Business Applications community to see what they thought was behind this divide. Why does one tool seem accessible and easy to some while difficult to others?

Continue reading