cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
AVTS
Post Patron
Post Patron

HTML Code in Power Apps

I am trying to display the data from table. Below is the working code. but what i want is to display only today created data from Database.

 

"<h3>Email</h3>" &
"<strong> Manage Inventory </strong>" &
"<table width='100%' border='1' cellpadding='5' style='border:1px solid black; border-collapse:collapse'>" &
     "<tr style='background-color:#efefef'>
         <th>Material Number</th> <th> Material Desc </th> <th> Qty </th><th> BBD </th><th> Today </th>
     </tr>
     <tr>" &
    
         Concat(make,
            
             "<td>" & Materialno & " </td>
              <td>" & Materialdesc & " </td>
              <td>" & Qty & " </td>
              <td>" & BBD & " </td>","</tr><tr>") &
    
              
"</table>"
1 ACCEPTED SOLUTION

Accepted Solutions

Hi @AVTS :

If Dailyinventory is a SP list,then 'Create On' include time.The code should be:

 

"<h3>Email</h3>" &
"<strong> Manage Inventory </strong>" &
"<table width='100%' border='1' cellpadding='5' style='border:1px solid black; border-collapse:collapse'>" &
     "<tr style='background-color:#efefef'>
         <th>Material Number</th> <th> Material Desc </th> <th> Qty </th><th> BBD </th><th> Today </th>
     </tr>
     <tr>" &
    
         Concat(Filter(Make,Text('Create On',DateTimeFormat.LongDate)=Text(Today(),DateTimeFormat.LongDate)),
            
             "<td>" & Materialno & " </td>
              <td>" & Materialdesc & " </td>
              <td>" & Qty & " </td>
              <td>" & BBD & " </td>","</tr><tr>") &
    
              
"</table>"

 

Best Regards,

Bof

View solution in original post

5 REPLIES 5
v-bofeng-msft
Community Support
Community Support

Hi @AVTS :

I assume there is a data table:

 

ClearCollect(
   Make,
   {Materialno:"Materialno1",Materialdesc:"Materialdesc1",Qty:"Qty1",BBD:"BBD1",CreatedDate:Date(2021,5,4)},
   {Materialno:"Materialno2",Materialdesc:"Materialdesc2",Qty:"Qty2",BBD:"BBD2",CreatedDate:Date(2021,5,4)},
   {Materialno:"Materialno3",Materialdesc:"Materialdesc3",Qty:"Qty3",BBD:"BBD3",CreatedDate:Date(2021,5,3)}
)

 

And then the formula should be:

 

"<h3>Email</h3>" &
"<strong> Manage Inventory </strong>" &
"<table width='100%' border='1' cellpadding='5' style='border:1px solid black; border-collapse:collapse'>" &
"<tr style='background-color:#efefef'>
<th>Material Number</th> <th> Material Desc </th> <th> Qty </th><th> BBD </th><th> Today </th>
</tr>
<tr>" &
Concat(Filter(Make,CreatedDate=Today()),
"<td>" & Materialno & " </td>
<td>" & Materialdesc & " </td>
<td>" & Qty & " </td>
<td>" & BBD & " </td>","</tr><tr>") &
"</table>"

1.PNG

 

Best Regards,

Bof

 

Not Working.....

Hi @AVTS :

It worked well on my side.

1.PNG

If you need further help, please provide detailed information.For example:the data structure of your data source? How do you filter records whose creation date is the current date? What is the data type of the column? Does it include time?You said it doesn't work, what specific requirements are not met, can you describe it in detail?

Best Regards,

Bof

Thanks for your response.  Is this due to short date ? i have tried with following . but no luck .

 

AVTS_0-1620112218299.png

 

Hi @AVTS :

If Dailyinventory is a SP list,then 'Create On' include time.The code should be:

 

"<h3>Email</h3>" &
"<strong> Manage Inventory </strong>" &
"<table width='100%' border='1' cellpadding='5' style='border:1px solid black; border-collapse:collapse'>" &
     "<tr style='background-color:#efefef'>
         <th>Material Number</th> <th> Material Desc </th> <th> Qty </th><th> BBD </th><th> Today </th>
     </tr>
     <tr>" &
    
         Concat(Filter(Make,Text('Create On',DateTimeFormat.LongDate)=Text(Today(),DateTimeFormat.LongDate)),
            
             "<td>" & Materialno & " </td>
              <td>" & Materialdesc & " </td>
              <td>" & Qty & " </td>
              <td>" & BBD & " </td>","</tr><tr>") &
    
              
"</table>"

 

Best Regards,

Bof

View solution in original post

Helpful resources

Announcements
2022 Release Wave 1 760x460.png

2022 Release Wave 1 Plan

Power Platform release plan for the 2022 release wave 1 describes all new features releasing from April 2022 through September 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

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