Skip to main content

Calculations and maths in variables

  • April 26, 2024
  • 1 reply
  • 2019 views

Dave_Curtis

When creating variables, it would be really useful to be able to include maths and text when defining a variable, which are kept up-to-date based on current values.

E.g.
With a shopping basket, I have the following variable
• Subtotal# (numeric)
Into which I add the value of each product selected in the basket.

From this value I would like to calculate
• VAT# (numeric) = Subtotal * 20%, truncated to 2 decimal places

And then display these variables in a currency
• Subtotal£ (String) = “£” + Subtotal#
• VAT£ (String) = “£” + VAT#
• Total£ (# String) = “£” + Subtotal#+VAT#

This way, I could just add/remove the product costs from Subtotal#, and use the strings for display in the prototype.

This topic has been closed for comments

1 reply

dvaliao
Figmate
  • Community Support
  • 4661 replies
  • September 12, 2024

3 posts were merged into an existing topic: Calculation formula within variable input

8 votes have been moved. 3 votes could not be moved because their users already voted in the other topic.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings