Have a question about CiviCRM? Get it answered quickly at the new CiviCRM Stack Exchange Q+A siteThis forum was archived on 25 November 2017. Learn more.How to get involved.What to do if you think you've found a bug.
OK, have added the file, however it's not done, and I agree with Eileen that we should try to get it right from the start.-Specifying what you want returned could use some love. I don't really like the format 'return.my_group:some_field'. Since you're specifying the group, why not just leave it at that? Why would you ever not want every field in a group returned? * 'custom_some_group:my_field => 'myinfo', // you can use group_name:field_name instead of ID * 'custom_some_big_group:my_other_field:8 => 'myinfo', // updates record ID 8 in my_other_field in multi-valued some_big_group
What would be the benefit over custom_xxx ? Just a different syntax or to better handle multiple value or?
Been confirmed that the field name (well label but as one generates the other...) is already checked to be unique. Ie. we can drop the "my_group:some_field" and go directly "some_field (well probably "custom_some_field")
array( 0 => array( 'my_single_field' => 'updating the value', 'my_other_single_from_another_group' => '20110608', 'my_checkboxes_from_a_single_group' => array('foo', 'bar', 'baz'), 'my_multi_field' => 'inserting a value', ), 55 => array( 'my_multi_field' => 'updating value 55', ), '-1' => array( 'my_multi_field' => 'inserting another new value', ),);
[0] => array( 'my_single_field' => 'updating the value', 'my_other_single_from_another_group' => '2011-06-08', 'my_checkboxes_from_a_single_group' => array('foo' => 'Foo's Value', 'bar' => 'Bar's Value', 'baz' => 'Value for Baz'),)[55] => array( 'my_multi_field' => 'updating value 55')[56] => array( 'my_multi_field' => 'inserting a value')[57] => array( 'my_multi_field' => 'inserting another new value')
array( 'set' => 'set_A', 'entity_id' => 123, 'my_single_field' => 'updating the value'), 'my_multi_field' => 'inserting a value') );
array( 'set' => 'set_A', 'id' => 42, 'my_single_field' => 'updating the value'), 'my_multi_field' => 'inserting a value') );
array(array ( 'id'=> 42, 'entity_id' => 123, 'entity_table' => 'civicrm_contact', // I think we should abstract and put the entity name 'my_single_field' => 'updating the value'), 'my_second_field' => 'inserting a value') ));
array( 42 = > array ( 'id'=> 42, 'entity_id' => 123, 'entity_table' => 'civicrm_contact', // I think we should abstract and put the entity name 'my_single_field' => 'updating the value'), 'my_second_field' => 'inserting a value') ));
array(array ( //not sure there is an id entity_id=> 123, 'my_single_field' => 'updating the value'), 'my_second_field' => 'inserting a value') ));
array( array ( id =>42, entity_id=> 123, 'my_single_field' => 'updating the value'), 'my_second_field' => 'inserting a value') ), array ( entity_id=> 123, id => 13, 'my_single_field' => 'bla'), 'my_second_field' => 'bla') ));
array( id =>42,// still not sure it makes sense for a mono value entity_id=> 123, 'my_single_field' => 'updating the value'), 'my_second_field' => 'inserting a value'));
A couple of notes from IRC - Xavier's example would be id indexed by the id in the custom table. His example relies on only getting one group @ a time - hence, no conflicts.
To my mind as long as we add entity_id & entity_table to Coleman's example the 3 proposed would work within the API structure.