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

How do I create an html table from json?

I know I have to submit it to html table as a query  but I can't seem to get it to work correctly. 

My app first gets rows of managers emails

then it performs an apply to each for each row and :

  1. validates managers email is correct format
  2. runs a stored procedure that returns a table in the following format:
    1. {
        "OutputParameters": {},
        "ResultSets": {
          "Table1": [
            {
              "MANAGERMAIL": "dclark@xxxxxx.com",
              "USEREMAIL": "dclark@xxxxxx.com",
              "EMPID": 50666,
              "HOURSSUMMED": 8,
              "APPROVED": "N",
              "TIMEPERIOD": "2019-06-30 - 2019-07-06",
              "PTOHOURS": 0,
              "WEEKID": 809
            },
            {
              "MANAGERMAIL": "dclark@xxxxxx.com",
              "USEREMAIL": "lthompson@xxxxxx.com",
              "EMPID": 21666,
              "HOURSSUMMED": 40,
              "APPROVED": "N",
              "TIMEPERIOD": "2019-06-30 - 2019-07-06",
              "PTOHOURS": 4,
              "WEEKID": 809
            }
          ]
        }
      }
  3. I then parse JSON which gives me this
    1. {
        "Table1": [
          {
            "MANAGERMAIL": "dclark@xxxxxx.com",
            "USEREMAIL": "dclark@xxxxxx.com",
            "EMPID": 50666,
            "HOURSSUMMED": 8,
            "APPROVED": "N",
            "TIMEPERIOD": "2019-06-30 - 2019-07-06",
            "PTOHOURS": 0,
            "WEEKID": 809
          },
          {
            "MANAGERMAIL": "dclark@xxxxxx.com",
            "USEREMAIL": "lthompson@xxxxxx.com",
            "EMPID": 21666,
            "HOURSSUMMED": 40,
            "APPROVED": "N",
            "TIMEPERIOD": "2019-06-30 - 2019-07-06",
            "PTOHOURS": 4,
            "WEEKID": 809
          }
        ]
      }
      I've tried to compose an array from it and then create a html table but it fails.

Any suggestions would be very appreciated.

 

Thanks,managers to html table.PNG

4 REPLIES 4
Dual Super User
Dual Super User

Re: How do I create an html table from json?

Hi @SPOFLOW 

 

Please see the screenshot below:das.PNG

You can use the output from the Parse JSON action and make the settings as shown. 

 

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

SPOFLOW
Level: Powered On

Re: How do I create an html table from json?

Thanks,  I tried what you suggested but stil got the error:

managers to html table2.PNG

 

This is what the flow looks like now;

managers to html table3.PNG

Community Support Team
Community Support Team

Re: How do I create an html table from json?

Hi @SPOFLOW ,

 

Please check whether ResultSets output from Execute stored procedure action contains Table1 property.

11.PNG

If not, Create HTML table references a Source that does not exist, and this error occurs.

I observed that the configuration in Execute stored procedure action is dynamically changed, so the returned JSON Data does not necessarily have the same properties.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Community Support Team
Community Support Team

Re: How do I create an html table from json?

Hi @SPOFLOW ,

 

Any updates?

Please check this similar thread and see if it helps:

https://powerusers.microsoft.com/t5/Using-Flows/Stored-Procedure-Table1-is-of-type-Null/td-p/317851

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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 (Last 30 Days)
Users online (4,918)