cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
Highlighted
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.
Highlighted
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

Highlighted
Advocate I
Advocate I

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
Highlighted
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

Highlighted
Helper V
Helper V

Re: Use dynamic Content in Expressions?

@MW3 

 

I don't believe so.

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Top Solution Authors
Top Kudoed Authors
Users online (9,135)