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

Number columns in SharePoint decimal data type problems

Seems to be a problem with "number" columns in sharepoint, possibly due to regional settings

SharePoint list create item is the action I'm having problems with

 

Formatting error on the following input bodies:

1 using float() to provide a number:

"NOM_DIAM": 0.5,

"message": "Input string was not in a correct format."


This is strange, because if I use flow to get items from the same list the output representing the column looks like this:

"NOM_DIAM":0.5,

2 I also tried converting it to a string: 

"NOM_DIAM": "0.5",

"Input string was not in a correct format.

 

3 just for "fun" i wanted to see if there was some regional issue and replaced "." with ",".
(I have to use "," and get a "numbers only" error if try using ".", when inputting decimals in the sharepoint webui for the list):

"NOM_DIAM": "0,5",

"Input string was not in a correct format."

 

The column is a number column with 2 decimals in the settings for the column. What is the correct way to provide decimal values into sharepoint list item number columns using flow?  Is there a way to work around this besides changing the column into a text-column?

 

The regional setting for the sharepoint site is Norwegian, and I don't dare change this to english because this will create other issues. In any case, I don't see why I should need to do something like that, a value have nothing to do with formatting of that value does it? Wouldn't otherwise be the same as saying a word displayed in Times New Roman has a different meaning if it was Arial? 

 

Why can't sharepoint list just use traditional types instead? I guess they wanted to simplify, but right now I fail to see how it has become simple..  

1 ACCEPTED SOLUTION

Accepted Solutions
yashag2255
Dual Super User II
Dual Super User II

Hey @hjaf 

 

Can you please share a screenshot of the flow? I just created a number column in SharePoint with 2 decimal places and tested it out. It worked as expected for me:tems.PNG

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

View solution in original post

2 REPLIES 2
yashag2255
Dual Super User II
Dual Super User II

Hey @hjaf 

 

Can you please share a screenshot of the flow? I just created a number column in SharePoint with 2 decimal places and tested it out. It worked as expected for me:tems.PNG

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

View solution in original post

This seems to be caused by wrong data from another column, I missed it because there were so many fields being put into the item. All of the source items that had decimal-numbers happened to also have another field containing invalid characters in an integer/number column. Once I started to reproduce the error by building a new flow from scratch inputting values manually i found it. The error is a bit generic and not very helpful, stating that the input STRING is misformatted when the only input allowed is a float() or int(), also the errors don´t specify which of the 30+ columns that causes the error.

 

Anyway, thanks to you I found the issue because I wanted to create a similar flow that you provided screenshots from 😄 I guess the best way to go about when encountering stuff like this is to debug by making new flows and go through the elimination process 🙂

Helpful resources

Announcements
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!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

Top Solution Authors
Users online (74,725)