cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Use dynamic Content in Expressions?

Hello,


i want use dynamic Content in Expressions.


I have the Received Time from e-mail and i want to use the Exppression "formatDateTime". But i dont know, how i can declare the dynamic content "Received Time" in the expression like formatDateTime([Received Time], MM-YYYY).

 

I want to export emails into onedrive for business an the name of the emails should look like this: "Subject-YYYY-MM". So when i use the dynamic content "Received Time", i get a timestamp like this 2017-12-20T10:00:00:0000Z. So i want to format the timestamp 🙂


Thanks for help!

5 REPLIES 5
Community Support
Community Support

Re: Use dynamic Content in Expressions?

Hi MS_ycmh1992,

 

Please try to add the following code in a Compose action, then you would get the date time formatted as “yyyy-MM”.

formatDateTime(triggerBody()?['DateTimeReceived'],'yyyy-MM')

3.PNG

Please have a try with it and feel free post back if you need more help.

 

More details about formatDateTime function, please see it at here:
https://docs.microsoft.com/en-us/azure/logic-apps/logic-apps-workflow-definition-language

 

Best regards,
Mabel Mao

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Bangar
New Member

Re: Use dynamic Content in Expressions?

Yes , it worked for me. 

 

any idea on how to get the triggerBody() all attributes . 

 

Regards,

Bangar Raju

jfthuong
Regular Visitor

Re: Use dynamic Content in Expressions?

Aren't they visible in "Dynamic Content"?

 

What you can do is:

  • Go to "Expression"
  • Start entering your function
  • Click on "Dynamic Content"
  • Scroll and click on the attribute you need: it will add the value automatically in the expression
MW3
Regular Visitor

Re: Use dynamic Content in Expressions?

Is there any way to copy the 'triggerBody()?['Provider']' when it pop up by putting mouse on it

kdavis91 Helper III
Helper III

Re: Use dynamic Content in Expressions?

@MW3 

 

I don't believe so.

Helpful resources

Announcements
MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Automate Community!

firstImage

Now Live: Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Community Summit North America

The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Users online (6,260)