Showing results for 
Search instead for 
Did you mean: 
New Member

error handling - additional details

I have an SPO list with about 50 number fields. This is shared globally and there are some regions that use a comma for a separator and other that us a decimal. all users are force to enter numbers based on the setting of the site locale. Anyone outside the locale must reformat their input or it is rejected. Using power automate, and replicating the number fields, and making them text, now users can enter data in their regional locale and power automate will take that text and convert it to a float and write it to the number field.

Converting the original number fields to text will not work because there are external connections to these fields and I am not sure of the impact to the data or users. The owner did not want that risk. as long as users enter their numbers in the following format "1.2" or "1,2" there are no issues and works perfectly. That is the problem, because it is a text field they can enter anything they want. In the field settings I added custom validation that will check for special characters, but there is not way to add alpha to this formula because of the length of the formula. in power automate I added scope (try, catch, finally) an it handles the errors quite well.

The problem is the error details are lacking. The flow will bark on the the first input that is not a float, but I have no way of knowing which field without scanning all 50 fields. I would like to be able to send a message to the user that contains the column name and their input that failed, but I can't seem to figure out a solution. I thought about creating variables, that would mean 50 variables. I thought about trying the same logic that I use to convert the text to a float, but I am not sure what I am missing, it still errors. the following is my logic:

convert to float: if(not(equals(outputs('Get_item')?['body/OData__PalmiticAcid'],null)),float(replace(outputs('Get_item')?['body/OData__PalmiticAcid'],',','.')),null)   this will error if not a float, when it write to the number field.


try to get if error: if(not(equals(outputs('Get_item')?['body/OData__PalmiticAcid'],null)), if(not(float(replace(outputs('Get_item')?['body/OData__PalmiticAcid'],',','.'))),false,true), null)


this second one just fails. is there a way I can get the field details or the field that errors?


Helpful resources

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

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

Users online (61,124)