Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Convert 1000 to 1,000

Community Beginner ,
Aug 10, 2022 Aug 10, 2022

Hi guys,

 

I guess this is very simple to do but I can't figure out how to do it...

I would need to set the 'Source Text' to a thousand separator (either "," or ".")

 

I know for removing decimals, this expression works fine:

Math.round()

 

My source text is linked to a 'Slider' all good until there, so if I write 1000, how can I make it to be shown 1,000 or 1.000?

 

 

Thank you! 

Liss

TOPICS
Expressions , FAQ , How to
366
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Aug 10, 2022 Aug 10, 2022

Try this:

s = effect("Slider Control")("Slider").value;
s.toLocaleString()
Translate
LEGEND ,
Aug 10, 2022 Aug 10, 2022

All you're ever going to need (the techiques, not necessarily the specific code, that is):

 

http://www.motionscript.com/design-guide/counter.html

 

Mylenium

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Aug 10, 2022 Aug 10, 2022

Hi!

 

Thank you for sending the link, but is too complex for what I need... I also have set the duration and timing with keyframes linked to few other numbers (so I can't really use the code, is not working without the "beginCount; endCount; dur"

 

I tried removing part of the code and make some adjustments but, for now, is not working.

Will keep trying, please if you know any other easier way to do it, I will be more than happy to try it!

 

 

Thanks again 🙂

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 10, 2022 Aug 10, 2022

Try this:

s = effect("Slider Control")("Slider").value;
s.toLocaleString()
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Aug 10, 2022 Aug 10, 2022
LATEST

That worked!

Awesome, thank you very much!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines