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 Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Regex on Contribution ID
Pages: [1]

Author Topic: Regex on Contribution ID  (Read 798 times)

aspagarino

  • I post occasionally
  • **
  • Posts: 89
  • Karma: 10
  • San Diego Joomla
    • California Center for Sustainable Energy
  • CiviCRM version: CiviCRM 4.3
  • CMS version: Drupal 7
Regex on Contribution ID
October 17, 2013, 12:51:39 pm
Cannot make a simple regex for contribution ID work ???

I know that is not common to search for contribution or contact ID but I was wondering if it is possible or not using regex

I am trying to pull a specific number of contributions with search builder so it should be as simple as regex (98|100|103) on the expression box, this however does not work on my install (4.3) or in the demo site (4.4)... it gives an expression error. Works fine on postal codes but not on ID fields.

Is this intentional?

Thanks

Andres

Open Source is Green

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: Regex on Contribution ID
October 17, 2013, 01:41:21 pm

does something like: 98,100,103 work?

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

aspagarino

  • I post occasionally
  • **
  • Posts: 89
  • Karma: 10
  • San Diego Joomla
    • California Center for Sustainable Energy
  • CiviCRM version: CiviCRM 4.3
  • CMS version: Drupal 7
Re: Regex on Contribution ID
October 17, 2013, 01:50:52 pm
Nope... I have not found any REGEX expression that works on it
Andres

Open Source is Green

Coleman Watts

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 2346
  • Karma: 183
  • CiviCRM version: The Bleeding Edge
  • CMS version: Various
Re: Regex on Contribution ID
October 17, 2013, 07:16:17 pm
Yes the search code still has quite a bit of technical debt, so not all fields support the full range of operators, unfortunately.
Out of curiosity, did you try lobo's suggestion without the regex (e.g. using the '=' operator)?
Try asking your question on the new CiviCRM help site.

aspagarino

  • I post occasionally
  • **
  • Posts: 89
  • Karma: 10
  • San Diego Joomla
    • California Center for Sustainable Energy
  • CiviCRM version: CiviCRM 4.3
  • CMS version: Drupal 7
Re: Regex on Contribution ID
October 18, 2013, 10:06:43 am
Thanks Coleman and Lobo... It doesn't work either with using = as the operator... Of course I can have our Civicrm program administrators adding the OR statemens but it would be nice to have the regex working so that they can put it on one line.
Andres

Open Source is Green

aspagarino

  • I post occasionally
  • **
  • Posts: 89
  • Karma: 10
  • San Diego Joomla
    • California Center for Sustainable Energy
  • CiviCRM version: CiviCRM 4.3
  • CMS version: Drupal 7
Re: Regex on Contribution ID
October 25, 2013, 05:20:42 pm
I cannot figure it out... confirmed that contribution or contact ID does not work for REGEX searches... any other field works well.

Should I file a bug for this issue?
Andres

Open Source is Green

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: Regex on Contribution ID
October 26, 2013, 02:10:13 pm

hey andres:

This is more a feature request. Wanna help patch it? we can help u get started on irc

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

aspagarino

  • I post occasionally
  • **
  • Posts: 89
  • Karma: 10
  • San Diego Joomla
    • California Center for Sustainable Energy
  • CiviCRM version: CiviCRM 4.3
  • CMS version: Drupal 7
Re: Regex on Contribution ID
October 28, 2013, 08:55:18 am
I would love to  give it a try... need to get some guidance for sure
Andres

Open Source is Green

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Regex on Contribution ID

This forum was archived on 2017-11-26.