cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
hjaf
Advocate V
Advocate V

Cannot evaluate empty float fields

Sharepoint get items gives me a set of items I use select to create an array to compare against another array that is similar to a excel-sheet. 

 

one of the fields ("Size") in both SharePoint and Excel are decimal, and sharepoint assigns this to the "number" datatype(whatever datatype that is). The field is not required in SharePoint and neither should it be. I use various expressions like  "if(empty(item()['field']), '', item()['field'])" to make sure that each item in the array corresponds with the one I will use to compare and merge with from excel. 

 

This seems to be working just fine on empty strings and numbers(integers) etc, but does not seem to be the case for float. I can't use empty(), it fails with "cannot be evaluated because property 'Size' doesn't exist, available properties are ..."

I'd rather use Select and get the same result with a map, but as a workaround, I have to loop through every item and add them to an array use branching:  I evaluate the optional float value in a compose and add two subsequent actions on success I do an append to array variable with the float field, on failure I do the same where the field is replaced with 'null'. This is the only field that I have this issue with, and there are multiple fields with blank strings but the property is still available. I have experienced similar issues when all the items in the get items have a blank value in a field, this is not the case here. 

I realize I don't have to do the expression but rather just ref the compose, anyway, that is besides the point.I realize I don't have to do the expression but rather just ref the compose, anyway, that is besides the point.

 

Is is there something wrong with the float value or "number" types in general?

Is there a better way to deal with inconsistently non-existent properties, it would be a lot cleaner to use Select instead. 

0 REPLIES 0

Helpful resources

Announcements
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (2,055)