CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • How can I display integers right aligned and with thousands-seaprator?
Pages: [1]

Author Topic: How can I display integers right aligned and with thousands-seaprator?  (Read 1078 times)

Rob McCausland

  • I post occasionally
  • **
  • Posts: 33
  • Karma: 0
    • Community Media Database
  • CiviCRM version: 3.3.5
  • CMS version: Drupal 6.20
  • MySQL version: 5
  • PHP version: 5.2
How can I display integers right aligned and with thousands-seaprator?
October 10, 2010, 05:39:06 pm
Second question today from a newbie...

I'm developing a search profile for displaying organizations across a number of cities.  One search criteria I'm offering is those cities' population, and I'm including those populations in the results column.  I'd like to have them all appear in the results screen right-aligned, with thousands-separators (",") - rather than left-aligned and with no commas, which is how they're currently displaying.  How can I do that?  Again, searching brings me no immediate answers.  Thanks again for your assists. 

~ Rob

Erik Hommel

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1773
  • Karma: 59
    • EE-atWork
  • CiviCRM version: all sorts
  • CMS version: Drupal
  • MySQL version: Ubuntu's latest LTS version
  • PHP version: Ubuntu's latest LTS version
Re: How can I display integers right aligned and with thousands-seaprator?
October 11, 2010, 02:42:04 am
I am assuming your population is a custom field? You can set your thousands separator in settings/localization, I would assume that then also applies to the custom data with type 'Number'. Have you checked that?
Erik
Consultant/project manager at EEatWork and CiviCooP (http://www.civicoop.org/)

Rob McCausland

  • I post occasionally
  • **
  • Posts: 33
  • Karma: 0
    • Community Media Database
  • CiviCRM version: 3.3.5
  • CMS version: Drupal 6.20
  • MySQL version: 5
  • PHP version: 5.2
Re: How can I display integers right aligned and with thousands-seaprator?
October 11, 2010, 08:57:31 am
Thanks, Erik.  Yes, it is a custom field.  It appears the only strictly numeric standard fields (ie, not phone, fax, or postal code) are longitude & latitude - where thousands-separators and alignment wouldn't be issues.  I had thought the localization settings only applied to currency - and checking it just now, this seems to be true.  My already-set defaults on that page are "US$" for currency type, "," for thousands separator,  and "." for decimal.  I don't see any place where I can apply any of these setting to integers or numbers.  I also just tried creating a custom number type field; that field type as well does not display the thousands separator.

But thanks for the reply.

Erik Hommel

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1773
  • Karma: 59
    • EE-atWork
  • CiviCRM version: all sorts
  • CMS version: Drupal
  • MySQL version: Ubuntu's latest LTS version
  • PHP version: Ubuntu's latest LTS version
Re: How can I display integers right aligned and with thousands-seaprator?
October 11, 2010, 09:32:45 am
Hmmm that is a pity! What you could do is change the template on which your data is displayed? Are you familiar with that? And raise an issue?
Eri
Consultant/project manager at EEatWork and CiviCooP (http://www.civicoop.org/)

Rob McCausland

  • I post occasionally
  • **
  • Posts: 33
  • Karma: 0
    • Community Media Database
  • CiviCRM version: 3.3.5
  • CMS version: Drupal 6.20
  • MySQL version: 5
  • PHP version: 5.2
Re: How can I display integers right aligned and with thousands-seaprator?
October 11, 2010, 04:38:33 pm
Thanks again, Erik.  No, I don't know about editing templates yet.  I'll look into that.  Thanks.

~ Rob

Erik Hommel

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1773
  • Karma: 59
    • EE-atWork
  • CiviCRM version: all sorts
  • CMS version: Drupal
  • MySQL version: Ubuntu's latest LTS version
  • PHP version: Ubuntu's latest LTS version
Re: How can I display integers right aligned and with thousands-seaprator?
October 11, 2010, 10:31:38 pm
This is the place to start looking:
http://en.flossmanuals.net/CiviCRM/DevelopTemplates
Erik
Consultant/project manager at EEatWork and CiviCooP (http://www.civicoop.org/)

Rob McCausland

  • I post occasionally
  • **
  • Posts: 33
  • Karma: 0
    • Community Media Database
  • CiviCRM version: 3.3.5
  • CMS version: Drupal 6.20
  • MySQL version: 5
  • PHP version: 5.2
Re: How can I display integers right aligned and with thousands-seaprator?
October 12, 2010, 04:23:22 pm
Thanks for this - have read through it now - hope to have time to give it a try in a couple days ~

Erik Hommel

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1773
  • Karma: 59
    • EE-atWork
  • CiviCRM version: all sorts
  • CMS version: Drupal
  • MySQL version: Ubuntu's latest LTS version
  • PHP version: Ubuntu's latest LTS version
Re: How can I display integers right aligned and with thousands-seaprator?
October 13, 2010, 12:15:04 am
Good luck, if you need any help....you know where the forum is!  ;)
Consultant/project manager at EEatWork and CiviCooP (http://www.civicoop.org/)

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: How can I display integers right aligned and with thousands-seaprator?
October 13, 2010, 11:42:28 am
Not sure if this is helpful or not - but if you exposed your info via Views you would be able to control this through the Views UI - but that is a bit of a jump just to get around this issue  :P
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • How can I display integers right aligned and with thousands-seaprator?

This forum was archived on 2017-11-26.