From: Sofia R. <so...@so...> - 2017-09-13 22:43:55
|
I think I know why nothing is happening. I think I need to change the select query using hook_chado_node_sync_select_query <http://api.tripal.info/api/tripal/tripal_core%21api%21tripal_core.chado_nodes.api.inc/function/hook_chado_node_sync_select_query/2.x>(). This is probably a stupid nubie php/drupal question, but how can I access the form results in this hook? I know that they should be in $form_state. Can I add $form_state as an argument for the hook? Just to explain, just incase I want to do this for the wrong reasons, In the sync form I have organism_id and cv_id being selected. I want to use the selected results in the query to select only the cvterms that have been associated with a feature that has the selected organism_id and has the selected cv_id . function tripal_expression_cvterm_chado_node_sync_select_query <http://api.tripal.info/api/tripal/tripal_core%21api%21tripal_core.chado_nodes.api.inc/function/hook_chado_node_sync_select_query/2.x>($query, &$form_state) { ..blah blah blah... return $query; } Thanks, Sofia On Wed, Sep 13, 2017 at 4:00 PM, Sofia Robb <so...@so...> wrote: > Hi All, > > I have a general question, and didn't know if this was the right place to > still send my questions. > > I created a new module using the tripal_example as a template. (i did not > use all of it, just what I thought I needed). I get my sync form and it is > populated as expected. I am super excited about this since I had to alter > the filter queries. > > My issue is that when I select Sync, nothing seems to happen. The page > looks like it might be doing something, then comes back with the default > settings. My records were not added to the node table. I checked the drupal > log file, nothing there. Is there something simple I am missing? Is there > something I can do next to help me track down what is or what is not > happening? > > Thanks! > Sofia > > > |