cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Registration error in adding a flow how response a json

Hi I hope some could help me 

im getting this error when i try to add a flow to powerapps

juan_urena_0-1598906527269.png

I use the http response conector to return a json 

juan_urena_2-1598906617379.png

this is the schema, cannot find anything wrong,someone knows what may be causing the error?

 

{
    "type": "object",
    "properties": {
        "Table1": {
            "type": "array",
            "items": {
                "type": "object",
                "properties": {
                    "Contrato": {
                        "type": "string"
                    },
                    "TipoContrato": {
                        "type": "integer"
                    },
                    "TipoProveedor": {
                        "type": "string"
                    },
                    "IdProveedor": {
                        "type": "integer"
                    },
                    "Cliente": {
                        "type": "integer"
                    },
                    "Grupo": {
                        "type": "string"
                    },
                    "FechaInicio": {
                        "type": "string"
                    },
                    "FechaFin": {
                        "type": "string"
                    },
                    "Observacion": {
                        "type": "string"
                    },
                    "NoMeses": {
                        "type": "integer"
                    },
                    "Status": {
                        "type": "string"
                    },
                    "FechaEntrega": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "idAbogado": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "Id": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "Nombre": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "Correo": {
                        "type": [
                            "string",
                            "null"
                        ]
                    }
                },
                "required": [
                    "Contrato",
                    "TipoContrato",
                    "TipoProveedor",
                    "IdProveedor",
                    "Cliente",
                    "Grupo",
                    "FechaInicio",
                    "FechaFin",
                    "Observacion",
                    "NoMeses",
                    "Status",
                    "FechaEntrega",
                    "idAbogado",
                    "Id",
                    "Nombre",
                    "Correo"
                ]
            }
        }
    }
}

I add the this  because some fields can be null

 

"Id": {
    "type": [
        "string",
        "null"
    ]
}

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Anonymous
Not applicable

also I forgot to mention that I have a "parse json" before the http response , i guess that parse json cannot handle nulls because i deleted and then it works

View solution in original post

3 REPLIES 3
Pstork1
Dual Super User
Dual Super User

You need to try to parse out Table1 from the JSON and only send that back, with the appropriate Schema.  Assuming this is a SQL result there should be a dynamic content variable called Results Table1.  That's what you want to return, not Body.  I see you are returning Results set, but you want Results Set Table1.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
Anonymous
Not applicable

@Pstork1 The "Resultsets" was right, i have another flows and that works, y receibe a json "Table1" in powerapps.

making test i delete all the 

 

 

"type": [
    "string",
    "null"
]

 

 

 

and now i can add to powerapps but i get another errorerror apps.png

Anonymous
Not applicable

also I forgot to mention that I have a "parse json" before the http response , i guess that parse json cannot handle nulls because i deleted and then it works

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Users online (2,816)