Is there a way to limit the number of characters shown in the display text function?
Appulocity
Member, PRO Posts: 46
For example if the integer attribute is '123456789', but I only want it to display '1234' how would I do that?
Thanks in advance.
Comments
Use the textSubStr() function. From the Cookbook:
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
floor((NUMBER/(pow(10,(textLength(NUMBER)-4)))))
@tatiang i think that only works if the attribute is a text attribute.
Adding prec() to the TextSubStr() works. This is because prec() will return as text.
File attached
(The example file shows the first 6 numbers of an integer attribute that has a value of 1234567890).
Mental Donkey Games
Website - Facebook - Twitter