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 »
  • Using CiviEvent (Moderator: Yashodha Chaku) »
  • Exporting State Abbreviation instead of ID?
Pages: [1]

Author Topic: Exporting State Abbreviation instead of ID?  (Read 1860 times)

nutbuster

  • Guest
Exporting State Abbreviation instead of ID?
April 11, 2008, 01:04:00 pm
Hi, when I go to export a list of participants for an event to excel/csv, everything exports fine, but the State is exported as the State ID, not the State abbreviation or state name, which is rather useless to a person viewing the spreadsheet.

Is there any way to modify it so it exports the state abbreviation instead?  What files/lines would I need to modify?

Thanks!

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Exporting State Abbreviation instead of ID?
April 11, 2008, 01:55:15 pm
Hmm - what version of CiviCRM are you running? I just did a quick test on our 2.0 demo - CiviEvent >> Find Participants >> Export - and the output CSV gave me State Abbreviations...

You can try this at...
http://drupal.demo.civicrm.org/civicrm/event/search?reset=1&force=1&event=1

and then click the Export action.
Protect your investment in CiviCRM by  becoming a Member!

nutbuster

  • Guest
Re: Exporting State Abbreviation instead of ID?
April 11, 2008, 01:58:26 pm
its the latest version, 2.02 i think? sorry i should have mentioned, its with joomla.  Its for the event registration section.  When I go to a particular event, and want to export a list of the participants/attendees that registered, the state field exports the state ID.

And I just tried it on the demo site you linked to, and that worked...perhaps its something w/ the joomla install of civicrm?
« Last Edit: April 11, 2008, 02:09:01 pm by nutbuster »

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Exporting State Abbreviation instead of ID?
April 11, 2008, 02:16:06 pm
What's the URL path you're going to for the export. I just tried on a 1.0.14 Joomla / CiviCRM 2.0.2 install - with these steps:

CiviEvent >> click "show" participants from the dashboard listing for an event
that takes me to http://<joomla_site>/administrator/index2.php?option=com_civicrm&task=civicrm/event/search&reset=1&force=1&event=1

and selected Export Participants from the 'more actions' drop-down.

Is that what you're doing?
Protect your investment in CiviCRM by  becoming a Member!

nutbuster

  • Guest
Re: Exporting State Abbreviation instead of ID?
April 11, 2008, 02:27:59 pm
This is what I did:

CiviEvent >> Then where it lists the events right on that page, I clicked the link "15 (show)" >> Selected export participants from the dropdown, selected the all records radio button >> clicked go >> clicked export participants

URL is http://<joomla_site>/administrator/index2.php?option=com_civicrm&task=civicrm/event/search&reset=1&force=1&event=5

nutbuster

  • Guest
Re: Exporting State Abbreviation instead of ID?
April 11, 2008, 11:02:22 pm
Hmm, does anyone know what file has the sql queries that export to the csv? Ive been hunting around and cant seem to find the right place to edit this so I could at least make a temporary fix.

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Exporting State Abbreviation instead of ID?
April 12, 2008, 01:53:46 am

All the query code is is: CRM/Contact/BAO/Query.php, CRM/Event/BAO/Query.php

the logic is fairly complicated, and the sql is stitched together across quite a few different functions

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviEvent (Moderator: Yashodha Chaku) »
  • Exporting State Abbreviation instead of ID?

This forum was archived on 2017-11-26.