cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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
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
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
PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Top Solution Authors
Users online (6,513)