Gossamer Forum
Home : Products : DBMan SQL : Discussion :

Simple data pull... how?

Quote Reply
Simple data pull... how?
Ok... I've got a simple search results listing like this in the environment:

results $VAR = [
{
'Username' => '000000',
'ReviewID' => '47',
'hidden' => '<input type=hidden name="1-ReviewID" value="47">',
'ClaimID' => '11',
'timestamp' => '%©'
}
];

I want to pull the value 47 (in this instance) and use it in a global template. How do I do that? Here is what I have now but it pulls up a NULL value.

sub {
#--------------------------------------------------------------------
my $tags = GT::Template->tags;
my $reviewid = $tags->{results}->{ReviewID};
return $reviewid;
}

Shouldn't this work? How is the correct way of doing it?
Quote Reply
Re: [LanceWilson2] Simple data pull... how? In reply to
I actually like it when I reply to my own postings. Blush It means I am learning something. So I discovered that as long as my tags are within the "search loop" I can access them with the standard <%ReviewerID%> convention. As soon as you get out of the loop you cannot do it that way. So I was doing all of my debugging and function calls outside of the loop. As soon as I moved everything up everything worked just fine. Same is true with the "hidden" tag and the "row-col" tag used in searches/deletions.

I hope my mistakes help others out there!