cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
AVTS
Helper V
Helper V

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
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (1,976)