Forum Discussion
dMoney
4 months agoActive Member
Storing Percentags
Whats the best pracctices for storing percentages against a user's profile. Eg. I have a use case where I want to store the interest rate applied to a customer's loan on their profile. Is it best p...
rayelkho
4 months agoPractitioner III
Adding to the comments above, it comes down to this:
Do you need it as an iteger or a string? Storing as an integer will let you use filters like "More than" and "Less than". It also lets you use math in liquid. As a string, you would be able to just display the content and segmentation would be more challenging, you'd need to use regex.
Integer: 0.005
String: 0.5%
Related Content
- 2 years ago