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

Replace All Empty Values with Null Values

I'm importing data from Excel into SQL Server through Power Automate. The excel table has many properties such as amount or date that have congruent columns in the SQL Server table. However, any values that are empty in Excel are replaced with an empty string ('') instead of a NULL value. The prior can't be passed into SQL Server even if "Allow Nulls" is checked because they aren't null. How would I go about checking every property in the Excel sheet if it's empty and set it to null if so without creating a condition for each property?

2 REPLIES 2
eric-cheng
Solution Sage
Solution Sage

Hi @Zap1798 ,

 

Are you open to using expressions?  Still need to have one for each value but less clumsy  than conditions.

 

Screenshot_20210907-231320_Chrome.jpg

--------------------------------------------------------------------------
If I have answered your question, please mark my post as a solution
If you have found my response helpful, please give it a thumbs up

Connect on LinkedIn

Zap1798
Frequent Visitor

Thanks for the info! You set me on the right path to find the answer! Using a combination of the if function and the empty function to check if the value is empty then set it to null if needed worked out perfectly. Thanks!

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Users online (5,855)