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

Sort with JSON schema help

Dear community i am stuck again. 

 

I am reading out data from SQL, its a view that i have created that gives e some values. 

 

Here is my Json input 

 

[
  {
    "ResultSets": {
      "Table1": [
        {
          "Name": " prototype",
          "TidPunkt": "2020-11-29T00:00:00",
          "Conductivity": "0.4322977066040039",
          "Volume": "38900",
          "Alarm": ""
        },

 

I want to sort this in a create html table like this

Name TidPunkt Conductivity Volume

06572020-11-25T23:48:03Z10.526404857635498
06792020-11-25T11:11:54Z20.47801780700683594
06702020-11-20T23:22:16Z11.4046096801757812

 

But i get this 

 

{"Table1":[{"Name":"0657","TidPunkt":"2020-11-29T00:00:00","Conductivity":"1","Volume":"38900","Alarm":""}

 

My schema looks like this 

 

{
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "ResultSets": {
        "type": "object",
        "properties": {
          "Table1": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "Name": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "TidPunkt": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "Conductivity": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "Volume": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "Alarm": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "Name",
                "TidPunkt",
                "Conductivity",
                "Volume",
                "Alarm"
              ]
            }
          }
        }
      }
    }
  }
}

 

 

What do i do wrong? 

 

All the best

 

1 ACCEPTED SOLUTION

Accepted Solutions
v-litu-msft
Community Support
Community Support

Hi @Emil2,

 

After you get the output, you could put it into a Compose action:

{"Table1":[{"Name":"0657","TidPunkt":"2020-11-29T00:00:00","Conductivity":"1","Volume":"38900","Alarm":""}

  

Then use expression to get table 1, then put it into the Create HTML table action:
Screenshot 2020-12-01 132936.jpg

 

Run result:

Screenshot 2020-12-01 132851.jpg

 

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

View solution in original post

1 REPLY 1
v-litu-msft
Community Support
Community Support

Hi @Emil2,

 

After you get the output, you could put it into a Compose action:

{"Table1":[{"Name":"0657","TidPunkt":"2020-11-29T00:00:00","Conductivity":"1","Volume":"38900","Alarm":""}

  

Then use expression to get table 1, then put it into the Create HTML table action:
Screenshot 2020-12-01 132936.jpg

 

Run result:

Screenshot 2020-12-01 132851.jpg

 

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

View solution in original post

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

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.

Top Solution Authors
Users online (2,041)