-
-
Notifications
You must be signed in to change notification settings - Fork 160
Description
Below is a sample of my code. I am able to pass in a parameter to set the initial search value for the search bar in a table. But I would like to be able to capture the search value the user entered so when I reload the page, I can set the initial_search_value to the user's search. Any ideas would be greatly appreciated.
P.S. I love SQLPage and I have been able to do just about everything I have wanted.
-- Display the section title
SELECT
'text' AS component,
'Account' AS title;
SELECT
'table' AS component,
'Links:' AS title,
'AcctNbr' AS markdown,
1 AS sort,
$MySearchParm AS initial_search_value,
$search AS search_value,
1 AS search;
select
'[' || a.acctnbr || '](' || 'testchange_account.sql?Sender=Main&AcctNbr=' || a.acctnbr || '&search=' || $search || ')' AS AcctNbr,
a.CompanyName, c.Email
from contacts c
left outer join accounts a
on (c.accountid = a.accountid)
where (email = sqlpage.cookie('Email') or sqlpage.cookie('Email') like '%@kevinreagan.com')
and a.companyname is not null
and a.companyname <> ''
and c.email is not null
and c.email <> ''
order by a.companyname