<font size=2 face="sans-serif">I am having a problem with my code and
I cannot figure out why it is doing what it is doing. I have this sub:</font>
<br>
<br><font size=2 face="sans-serif">sub list :Local {</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; my
($self, $c, $page) = @_;</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; $page
= $c-&gt;req-&gt;param('page') || 1;</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; my
$rs = $c-&gt;model('ORANGES::Account')-&gt;search({}, { </font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; join =&gt; 'progress',</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; '+select' =&gt; ['progress.percent_complete'],</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; '+as' =&gt; ['progress.percent_complete'],</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; join =&gt; 'compliance',</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; '+select' =&gt; ['compliance.percent_compliant'],</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; '+as' =&gt; ['compliance.percent_compliant'],</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; join =&gt; 'department_id',</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; '+select' =&gt; ['department_id.department_id'],</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; '+as' =&gt; ['department_id.department_id'],</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; join =&gt; 'metrics',</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; '+select' =&gt; ['metrics.num_servers','metrics.num_subsystems'],</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; '+as' =&gt; ['metrics.num_servers','metrics.num_subsystems'],
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; order_by =&gt; 'account_code',</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; rows =&gt; 15,</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; page =&gt; $page,</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;});</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; $c-&gt;stash(accounts
=&gt; $rs);</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; $c-&gt;stash(pager
=&gt; $rs-&gt;pager());</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; $c-&gt;stash-&gt;{'template'}=&gt;'accountview/list';</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; </font>
<br><font size=2 face="sans-serif">}</font>
<br><font size=2 face="sans-serif">Which I have tried in several different
ways to fix this problem, but none have worked so far. In my template file
all my fields come up with the valyes expected, except, I am trying to
use the account_id field value as part of a uri to take the user to a details
page for the row. Where I am expecting a uri such as 'http://127.0.0.1:3000/accountdetails/detail/170'
</font>
<br><font size=2 face="sans-serif">I instead get a uri like this:</font>
<br>
<br><a href="http://127.0.0.1:3000/accountdetails/detail/dbms::Model::ORANGES::Account=HASH%280x5496460%29"><font size=2 face="sans-serif">http://127.0.0.1:3000/accountdetails/detail/dbms::Model::ORANGES::Account=HASH%280x5496460%29</font></a>
<br>
<br><font size=2 face="sans-serif">This used to work when I was using a
view as the basis for my list page. </font>
<br>
<br><font size=2 face="sans-serif">When I run the page I can see in the
sub-queries that it runs that it has the &quot;account_id&quot; value as
it uses it, but when I try to access it in my template I get the hash ref.
None of the other fields do this. </font>
<br>
<br><font size=2 face="sans-serif">one of the sub queries using the account_id
value:</font>
<br><font size=2 face="sans-serif">SELECT me.account_id, me.account_code,
me.percent_compliant FROM HCDB_TEST.COMPLIANCE me WHERE ( me.account_id
= ? ): '321'<br>
</font>
<br>
<br><font size=2 face="sans-serif">My template that cretaes the uri:</font>
<br>
<br><font size=2 face="sans-serif">&lt;td&gt;&lt;a href=&quot;[% c.uri_for('/accountdetails/detail/')
%][% account.account_id %]&quot;&gt;[% account.account_code %]&lt;/a&gt;&lt;/td&gt;</font>
<br>
<br><font size=2 face="Arial">If someone could point me in the right direction,
Ive been fighting this for days.</font>
<br>
<br>