cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Narmer86
Frequent Visitor

error when doing CONCAT with HTML

Hello all ,

I'm trying to do a Concat with HTML to produce an PDF with a report , the report is produced but the output is not correct the date/time column is not appearing correctly , code is below also below a screen shot of what is happing 

 

code :

 

"<!DOCTYPE html>
<html>
<head>
<style>
table{font-family:arial,san-serif;
border-collaps:collapse;
width:100%}
td,th{
border:1px solid #dddddd;
text-align:left;
padding:8px;
}
tr:nth-child(even)
{background-color:#dddddd;}
</style>
</head>
<body>

 

<h1> Appointments!</h1>
<table >

 

"&Concat(Gal_HTML.AllItems,"<tr><td >"& Title4.Text &"</td><td >"& Body2 & "</td><td >")&"

</Table>
</body>
</html>
"

 

Narmer86_0-1647415772998.png

 

1 ACCEPTED SOLUTION

Accepted Solutions
WarrenBelz
Super User
Super User

Hi @Narmer86 ,

Assuming Body2 is your date/time field, you could try this - what is your data source ? If Excel, dates are problematic at the best of times

"<body>
   <h1> Appointments!</h1>
   <table >" & 
   Concat(
      Gal_HTML.AllItems,
      "<tr><td >"& Title4.Text &"</td><td >"& Text(Body2,"dd/mm/yyyy hh:mm am/pm") & "</td></tr>"
   ) &
   "</Table>
</body>
</html>"

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Visit my blog Practical Power Apps

 

View solution in original post

3 REPLIES 3
WarrenBelz
Super User
Super User

Hi @Narmer86 ,

Assuming Body2 is your date/time field, you could try this - what is your data source ? If Excel, dates are problematic at the best of times

"<body>
   <h1> Appointments!</h1>
   <table >" & 
   Concat(
      Gal_HTML.AllItems,
      "<tr><td >"& Title4.Text &"</td><td >"& Text(Body2,"dd/mm/yyyy hh:mm am/pm") & "</td></tr>"
   ) &
   "</Table>
</body>
</html>"

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Visit my blog Practical Power Apps

 

WarrenBelz
Super User
Super User

Hi @Narmer86 ,

Just checking if you got the result you were looking for on this thread. Happy to help further if not.

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Visit my blog Practical Power Apps

Narmer86
Frequent Visitor

Thansk alot @WarrenBelz , sorry for the late response 

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (2,465)