<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2658.34">
<TITLE>Newbie Question</TITLE>
</HEAD>
<BODY>
<P><FONT COLOR="#000000" SIZE=2 FACE="Arial">Greetings, all. I am new to Drupal, working on my first module. I am having an issue that I can't seem to see where my issue is. Here is the flow:</FONT></P>
<P><FONT COLOR="#000000" SIZE=2 FACE="Arial">function alldotdev_advsearch_groups_form_submit($form_id, $form_values) {</FONT>
<BR> <FONT COLOR="#000000" SIZE=2 FACE="Arial">$op = $form_values['op'];</FONT>
<BR> <FONT COLOR="#000000" SIZE=2 FACE="Arial">$pagerrows = 50;</FONT>
</P>
<P> <FONT COLOR="#000000" SIZE=2 FACE="Arial">if ($op == t('Non-Standard Results')) {</FONT>
<BR> <FONT COLOR="#000000" SIZE=2 FACE="Arial">$query_field = t('nonstd');</FONT>
<BR> <FONT COLOR="#000000" SIZE=2 FACE="Arial">$query_value = $form_values['nonstd'];</FONT>
<BR> <FONT COLOR="#000000" SIZE=2 FACE="Arial">}</FONT>
<BR>
<BR> <FONT COLOR="#000000" SIZE=2 FACE="Arial">$query_string = $query_field . " = '" . $query_value . "'";</FONT>
<BR> <FONT COLOR="#000000" SIZE=2 FACE="Arial">return "AllDotDev/alldotdev_groups_display/" . $query_string . "/" . $pagerrows;</FONT>
<BR><FONT COLOR="#000000" SIZE=2 FACE="Arial">}</FONT>
<BR><FONT COLOR="#000000" SIZE=2 FACE="Arial">function alldotdev_groups_display($query_string = "", $pagerrows = '50') {</FONT>
<BR> <FONT COLOR="#000000" SIZE=2 FACE="Arial">$page_content = '';</FONT>
<BR> <FONT COLOR="#000000" SIZE=2 FACE="Arial">$header = alldotdev_wholeheader();</FONT>
<BR> <FONT COLOR="#000000" SIZE=2 FACE="Arial">$rows = alldotdev_groupsquery($query_string,$pagerrows);</FONT>
<BR>
<BR> <FONT COLOR="#000000" SIZE=2 FACE="Arial">$pager = theme('pager', NULL, $pagerrows, 0);</FONT>
<BR> <FONT COLOR="#000000" SIZE=2 FACE="Arial">if (count($rows) && !empty($pager)) {</FONT>
<BR> <FONT COLOR="#000000" SIZE=2 FACE="Arial">$rows[] = array(array('data' => $pager, 'colspan' => count($rows[0])));</FONT>
<BR> <FONT COLOR="#000000" SIZE=2 FACE="Arial">}</FONT>
<BR> <FONT COLOR="#000000" SIZE=2 FACE="Arial">if (count($rows)) {</FONT>
<BR> <FONT COLOR="#000000" SIZE=2 FACE="Arial">$page_content .= theme('table', $header, $rows);</FONT>
<BR> <FONT COLOR="#000000" SIZE=2 FACE="Arial">} </FONT>
<BR> <FONT COLOR="#000000" SIZE=2 FACE="Arial">else {</FONT>
<BR> <FONT COLOR="#000000" SIZE=2 FACE="Arial">$page_content .= "No devices meet the selection criteria";</FONT>
<BR> <FONT COLOR="#000000" SIZE=2 FACE="Arial">}</FONT>
<BR> <FONT COLOR="#000000" SIZE=2 FACE="Arial">print theme('page', $page_content);</FONT>
<BR><FONT COLOR="#000000" SIZE=2 FACE="Arial">}</FONT>
<BR><FONT COLOR="#000000" SIZE=2 FACE="Arial">function alldotdev_groupsquery($query_string, $pagerrows = 50) {</FONT>
<BR> <FONT COLOR="#000000" SIZE=2 FACE="Arial">$header = alldotdev_wholeheader();</FONT>
<BR> <FONT COLOR="#000000" SIZE=2 FACE="Arial">db_set_active('alldotdev');</FONT>
<BR> <FONT COLOR="#000000" SIZE=2 FACE="Arial">$alldotdev_alldbfields = array_keys(alldotdev_allfields());</FONT>
<BR> <FONT COLOR="#000000" SIZE=2 FACE="Arial">$fields = implode(",", $alldotdev_alldbfields);</FONT>
<BR> <FONT COLOR="#000000" SIZE=2 FACE="Arial">//$query = "SELECT " . $fields ." FROM devices WHERE " . $query_field . " = '" . $query_value . "'";</FONT>
<BR> <FONT COLOR="#000000" SIZE=2 FACE="Arial">$query = "SELECT " . $fields ." FROM devices WHERE " . $query_string;</FONT>
<BR> <FONT COLOR="#000000" SIZE=2 FACE="Arial">$query .= tablesort_sql($header);</FONT>
<BR> <FONT COLOR="#000000" SIZE=2 FACE="Arial">//drupal_set_message($query);</FONT>
<BR> <FONT COLOR="#000000" SIZE=2 FACE="Arial">$query_result = pager_query($query, $pagerrows, 0, NULL, $query_string);</FONT>
<BR> <FONT COLOR="#000000" SIZE=2 FACE="Arial">db_set_active('default');</FONT>
<BR> <FONT COLOR="#000000" SIZE=2 FACE="Arial">while ($record = db_fetch_object($query_result)) {</FONT>
<BR> <FONT COLOR="#000000" SIZE=2 FACE="Arial">$values = array();</FONT>
<BR> <FONT COLOR="#000000" SIZE=2 FACE="Arial">foreach ($alldotdev_alldbfields as $value) {</FONT>
<BR> <FONT COLOR="#000000" SIZE=2 FACE="Arial">$values[] = $record->$value;</FONT>
<BR> <FONT COLOR="#000000" SIZE=2 FACE="Arial">}</FONT>
<BR> <FONT COLOR="#000000" SIZE=2 FACE="Arial">$rows[] = $values;</FONT>
<BR> <FONT COLOR="#000000" SIZE=2 FACE="Arial">}</FONT>
<BR> <FONT COLOR="#000000" SIZE=2 FACE="Arial">return $rows;</FONT>
<BR><FONT COLOR="#000000" SIZE=2 FACE="Arial">}</FONT>
</P>
<P><FONT COLOR="#000000" SIZE=2 FACE="Arial">When I click one of the radio buttons for "nonstd" (which gives true or false), the application thinks about it for a second or two, then brings me back to the page that is listed in the menus as MENU_DEFAULT_LOCAL_TASK instead of the page that I am asking for in my functions (alldotdev_groups_display). I don't follow the Drupal flow (as of this point) enough to know where to look to fix this issue. Could someone please point me in a direction to get this issue resolved? Thank you kindly!</FONT></P>
<P><FONT COLOR="#000000" SIZE=2 FACE="Arial">Chris Ivey</FONT>
</P>
<P><FONT COLOR="#000000" SIZE=2 FACE="Arial">Affiliated Computer Services</FONT>
<BR><FONT COLOR="#000000" SIZE=2 FACE="Arial">Enterprise Management Integration Services</FONT>
<BR><FONT COLOR="#000000" SIZE=2 FACE="Arial">Infrastructure Management Senior Analyst</FONT>
</P>
<P><FONT COLOR="#000000" SIZE=2 FACE="Arial">chris.ivey@acs-inc.com</FONT>
</P>
<P><FONT COLOR="#000000" SIZE=2 FACE="Arial">"I have not failed, I have simply found 10,000 ways which do not work!" -- Thomas Edison</FONT>
<BR><FONT COLOR="#000000" SIZE=2 FACE="Arial">"When you find yourself in a hole, the best thing to do is stop digging!" -- Nick Stokes</FONT>
<BR><FONT COLOR="#000000" SIZE=2 FACE="Arial">"I reject your reality, and substitute my own!" -- Adam Savage</FONT>
</P>
</BODY>
</HTML>