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) »
  • Developer Discussion »
  • APIs and Hooks (Moderator: Donald Lobo) »
  • How to filter by ID on country or relationship or...
Pages: [1]

Author Topic: How to filter by ID on country or relationship or...  (Read 2629 times)

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
How to filter by ID on country or relationship or...
October 19, 2008, 03:45:32 pm
Hi,

Found a way (playing with the rest interface) to filter by relationship and country (eg finding all the people in france working for TTTP

return[current_employer]=1&relation_type_id=4_a_b&relation_target_name=TTTP&country=france

Is there a way to be able to use an id for the country and the employee (relationship target) instead of the name ?

X+


-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

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: How to filter by ID on country or relationship or...
October 19, 2008, 04:18:47 pm

did u try sending in the country id for france (1076)? if that does not work, does sending country_id=1076 work?

a code change will be required to send an id for the employee. if u get an irc i can let u know what/where to change. might be better to add a new parameter called employee_target_id=XXX for that case

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) »
  • Developer Discussion »
  • APIs and Hooks (Moderator: Donald Lobo) »
  • How to filter by ID on country or relationship or...

This forum was archived on 2017-11-26.