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

Replace null with double/number when creating SP list item

Users copy data into an excel file (table1) which triggers the flow to copy the data into a SP list.

 

For number fields, I want the SP list to have a 0 as a default value, but if the users leave a blank/null in the excel file, I get the below error. I tried figuring this out for two days, so now coming to you experts!  SP column is set to number with 2 decimal points. Excel table is set to number with 2 decimal points. It works great if the users populate excel with their own 0's.

 

 

1flow.JPG2flow.JPG

 

 

if(equals(items('Apply_to_each_2')?['Num'],null),FLOAT(0),items('Apply_to_each_2')?['Num'])

 

 

 

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Resolver II
Resolver II

Hi @Zed_Yer  Try using empty() instead of equals as it looks like it's this bit that is not matching. I think Excel returns nothing rathe than NULL. I had to do this before where dates weren't entered.

if(empty(items('Apply_to_each_2')?['Num']),FLOAT(0),items('Apply_to_each_2')?['Num'])

View solution in original post

2 REPLIES 2
Resolver II
Resolver II

Hi @Zed_Yer  Try using empty() instead of equals as it looks like it's this bit that is not matching. I think Excel returns nothing rathe than NULL. I had to do this before where dates weren't entered.

if(empty(items('Apply_to_each_2')?['Num']),FLOAT(0),items('Apply_to_each_2')?['Num'])

View solution in original post

Worked perfectly--Thank you.

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!

Users online (3,609)