Skip to main content

Hi everyone,



I’m having an issue that when I save an integer to a percent field, it appends 0.0% to the amount. Let’s say the value is 25 it’ll save as 250.0% anyone has an idea on why this is happening?



And also on the API docs, the percent field is the only one that displays no info.



I have attached screenshots of this.



This article may be of some help. Specifically:





The percent field type is a field type designed to hold numerical values formatted as percents. The values in a percent field are all represented as fractions of 100 with the percent sign; e.g. the number .75 in a percent field is represented as 75%.





It’s definitely unintended for the field type & description to be missing from the API docs though – thanks for flagging!


This article may be of some help. Specifically:





The percent field type is a field type designed to hold numerical values formatted as percents. The values in a percent field are all represented as fractions of 100 with the percent sign; e.g. the number .75 in a percent field is represented as 75%.





It’s definitely unintended for the field type & description to be missing from the API docs though – thanks for flagging!


I somehow missed that. I tried to divide the amount by 100 before but I realized that it was not float, so 25/100 would result in 0.



Your response did it for me. I was able to make it work. Thank you for that!


Reply