Jump to content
Server Maintenance This Week. ×

Text to Number


This topic is 3970 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Is there a way to place a comma in the Capacity line? Thanks!

 

TextSize (TextStyleAdd ( Clients::Name; Uppercase + Bold); 18 ) & TextSize ( TextStyleAdd (" ("& TypeDay &")"; Uppercase); 18) & ¶ &
TextSize ( TextStyleAdd ( Print_CityCSState;Uppercase ); 14) &¶ &
TextSize ( TextStyleAdd ( Venue; Uppercase); 14) & ¶ &
TextSize ( If (not IsEmpty ( Capacity ); "Capacity: " & GetAsNumber ( Capacity );If (not IsEmpty ( Venue ); "Capacity: Unknown"; "")); 12)

 

post-102845-0-77101100-1371688430_thumb.

Link to comment
Share on other sites

Replace

 

TextSize ( If (not IsEmpty ( Capacity ); "Capacity: " & GetAsNumber ( Capacity );If (not IsEmpty ( Venue ); "Capacity: Unknown"; "")); 12)

 

with

 

TextSize ( If (not IsEmpty ( Capacity ); "Capacity: " & GetAsNumber ( Capacity ) & "," ;If (not IsEmpty ( Venue ); "Capacity: Unknown"; "")); 12)

Link to comment
Share on other sites

You could add a custom function such as formattedNumber() to do this for you.  This custom function can be found at

http://www.briandunning.com/cf/451

 

Then your calculation becomes: 

 

TextSize (TextStyleAdd ( Clients::Name; Uppercase + Bold); 18 ) & TextSize ( TextStyleAdd (" ("& TypeDay &")"; Uppercase); 18) & ¶ &
TextSize ( TextStyleAdd ( Print_CityCSState;Uppercase ); 14) &¶ &
TextSize ( TextStyleAdd ( Venue; Uppercase); 14) & ¶ &
TextSize ( If (not IsEmpty ( Capacity ); "Capacity: " & formattedNumber(Capacity;",";""); If (not IsEmpty ( Venue ); "Capacity: Unknown"; "")); 12)

Link to comment
Share on other sites

This topic is 3970 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.