cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
StevenMoore
Level: Powered On

Formatting Output

I have three, what should be simple, questions on formatting output from a Get Files (Properties Only) action into an email body:

In the flow below:

  1. Formatting the date/time : I cannot find any way to use the date formatting functions on the value "Issue Date"
  2. Is there a method of inserting spaces between fields in the value column
  3. Is there a way of inserting spaces in the header column names

For both these last questions I have tried using _0020_ and %20 type formatting codes but these just show as typed

 

FlowImage.JPG

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: Formatting Output

Create a temporary  Compose. This is only so that you can go to expression, type item()?['Date'] and hit ok. Then click in the Compose box. Hit Ctrl-A followed by Ctrl-C then go to your HTML action and hit Ctrl-V and it will appear as a fucntion rather than text

View solution in original post

17 REPLIES 17
Super User
Super User

Re: Formatting Output

Hi @StevenMoore,

 

I foudn the same problem with the spaces. If you crteate a varibale called space and set it to a single space you can use this varibale to added spaces. Not great but at least it seems to work.

StevenMoore
Level: Powered On

Re: Formatting Output

Thanks for that one Pieter - that works, any idea on the date formatting?

Super User
Super User

Re: Formatting Output

This should work:

 

convertTimeZone(utcnow(),'UTC','W. Europe Standard Time','dd/MM/yyyy HH:mm')

StevenMoore
Level: Powered On

Re: Formatting Output

Tried that previously, see below, it's not so much the command it's how to get that command to work within the Create HTML Table action as it just puts this in as a string:

 

Capture2.JPG

 

Capture.JPG

Super User
Super User

Re: Formatting Output

I would use a string variable. Then use the above function and include the variable in your html action
StevenMoore
Level: Powered On

Re: Formatting Output

Pieter

I tried that, following on from your use of the SPACE chatracter, the same happens, there must be some delimiter that I can't find to allow this.

Super User
Super User

Re: Formatting Output

HI Steven,

 

I tried it via a select. I managed to get the dates formated in an array using the select. Bu the generate table seems to mess things up a bit.

 

But I got it to work at the end:

 

Dates.PNG

Super User
Super User

Re: Formatting Output

First you need to create a Select like this:

 

convertTimeZone(item()?['Created'],'UTC','W. Europe Standard Time','dd/MM/yyyy HH:mm')

 

SelectAction.PNGCreateHTMLWithDates.PNG

 

To get item()?['Date'] into that Value of the HTML action I crteate a compose where I added the expression then copied the fucntion value and pasted it into the HTML action. Painful but it worked.

StevenMoore
Level: Powered On

Re: Formatting Output

Pieter

Nearly there, I followed you right up to the point of getting the item into the HTML, I can't get an expression with the item, works perfectly to that point and I can see the reformatted dates in the flow run:

Capture.JPG

Super User
Super User

Re: Formatting Output

Create a temporary  Compose. This is only so that you can go to expression, type item()?['Date'] and hit ok. Then click in the Compose box. Hit Ctrl-A followed by Ctrl-C then go to your HTML action and hit Ctrl-V and it will appear as a fucntion rather than text

View solution in original post

julieann
Level 8

Re: Formatting Output

For inserting spaces in the header column, you can just type the name, e.g. Next Review, on any text editor then copy and paste it on the column header. It works for me.

BrandonHoward
Level: Powered On

d.Re: Formatting Output

Type it into the expression box, do not type it directly in the field.

wojcika
Level: Powered On

Re: Formatting Output

@Pieter_Veenstra could you describe how you created this space variable? 

wojcika
Level: Powered On

Re: Formatting Output

@Pieter_Veenstra could you describe how you created this space variable? 

Super User
Super User

Re: Formatting Output

@wojcika , you can initialize a varibale with an expression like this:

 

replace("X","X"," ")

wojcika
Level: Powered On

Re: Formatting Output

@Pieter_Veenstra Thank you so much for responding. I am still struggling a bit, this should be pretty straight forward but I am getting an invalid expression.

 

I basically want to add spaces after "Posted by:" 

Expression.png

Thoughts on this? Any insight would be super helpful. 

Super User
Super User

Re: Formatting Output

The replace doesn't seem to be right. 

 

in the space variable action can you put the expressions as 

 

concat("post by", "   ")

 

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

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

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 248 members 5,757 guests
Please welcome our newest community members: