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

SQL GetRows (V2) only add fieldname in output if not null

I have a step in my flow that get data from SQL, but if one of the fields has a null value it is not listed in the output.

How to make sure all fields is listed although value is null?

 

Here an example:

 

SQL:

TableTest

Field1Field2
James123
Tom 
Bob456

 

SQL GetRows (V2) output (Please note Field2 is missing for Tom):

 

{
"@odata.context": "https://flow-apim-europe-001-westeurope-01.azure-apim.net/apim/sql/shared-sql-1e2f566b-6cb5-4e6e-852...",
"value": [
{
"@odata.etag": "",
"ItemInternalId": "e2e81457-c67f-444c-9a98-b4fb77932128",
"Field1": "James",
"Field2": 123
},
{
"@odata.etag": "",
"ItemInternalId": "80ff542a-35ca-44d8-be5c-2e6264b51998",
"Field1": "Tom"
}
{
"@odata.etag": "",
"ItemInternalId": "80ff542a-35ca-44d8-be5c-2e6264b51998",
"Field1": "Bob",
"Field2": 456
}
]
}

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support
Community Support

Hi @JBille ,

 

It is the expected behavior in Microsoft flow currently if the column in null and there is no any way for this issue if the column is null.

I suggest that you could enter the string "Null" or "0" in the column that is null if you want the column would also appears in the output of the Get rows action.

 

Best Regards,

Alice

 

Community Support Team _ Alice Zhang
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

2 REPLIES 2
Community Support
Community Support

Hi @JBille ,

 

It is the expected behavior in Microsoft flow currently if the column in null and there is no any way for this issue if the column is null.

I suggest that you could enter the string "Null" or "0" in the column that is null if you want the column would also appears in the output of the Get rows action.

 

Best Regards,

Alice

 

Community Support Team _ Alice Zhang
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

Thanks for your reply Alice.

In my case I need to keep it as a integer value so a "Null" string value would not go and neither a 0 is that is an accepted value we use.
So as a work around I will use -1, and hope Microsoft will fix this in a future update 😀

Br Jens

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

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
Top Kudoed Authors
Users online (7,286)