cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper I
Helper I

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
Highlighted
Dual Super User III
Dual Super User III

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!

Highlighted
Helper I
Helper I

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

Highlighted
Community Support
Community Support

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.
Highlighted
Community Support
Community Support

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
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Top Solution Authors
Users online (5,758)