I’ve got a Bootstrap 4 progress bar on the page which I want to show a calculated percentage using two fields in the database. I can’t seem to get it to work, though. What’s the correct syntax?
Some more info… I have two fields - one with a current value, one with a target value. My calculation is (current/target)*100 so I have a percentage.
The value field in Wappler doesn’t have the lightning button so I’m putting the code in myself but it’s not working!
Quick follow on question. My maths has produced a number with lots of decimal places. That’s fine for the width value but not for what’s displayed so I’d like to round it to the nearest whole number. What’s the best way to achieve that?
Thanks again. Because I have a calculation, the formatter didn’t give me what I needed but it did point me in the right direction. I’ve added .round(“0”) to it and it’s working perfectly.