cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JBille
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
v-alzhan-msft
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
v-alzhan-msft
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
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!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Users online (1,743)