Skip to content

Is there a way to capture the search value the user entered in a table search field #1146

@kevinr432

Description

@kevinr432

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions