Skip to main content

Convert Number Variable To String Variable (and convert variable groups)

  • May 9, 2024
  • 4 replies
  • 633 views

Jim_Knox

When setting up variable groups for modes, you may need all the same structure (all be it with renamed variable names) I find my self copying a group of number variables then using the same structurce want to apply strings to them (example h1, h1, h3), what would realy help is the ability to convert a group of variables from number to string and back again if need be.


4 replies

Gayani_S
Figmate
  • Community Support
  • 2389 replies
  • May 10, 2024

Hey @Jim_Knox, thanks for your valuable feedback! I’ve passed this along to the team for consideration.

Community members can leave their feedback on this and upvote this, please also don’t forget to upvote your post. This helps us roadmap future updates.

Thanks,
Gayani


Jim_Knox
  • Author
  • Active Member
  • 31 replies
  • May 13, 2024

Since this post, ive found a better hierarchy for organising variable collections, although I still think converting a string to number is vialuable and vice versa


Gaute Fleisje
  • New Member
  • 1 reply
  • October 15, 2025

Indeed! There should be a ‘eval’-function or something to evaluate the number, and use it as a string in components that needs a string value! Like if you alter numbers with math, and need to show new results. (Most (all?) our corporate components doesn’t support numbers as variables for fields)
It would also be VERY useful with local variables, as opposed to global variables, that could be used inside a component, and have different values in different instances of the component. This would make it possible to use the same component several times and fill and alter those instances with different content. 


MNCreations
  • New Participant
  • 6 replies
  • October 21, 2025

The general interoperability of numbers and strings should be improved in Figma, but this suggestion would be a great stop-gap that is almost certainly easier to implement. It instantly makes working with variables way more useful as string variables can be left untouched while number variables get modified by triggers. Of course, notation of number variables should be introduced as a version of a number variable or something, so there can be commas for thousands separators.