MIMOURI
2nd October 2017, 18:17
Is there any possibility to filter results using as substring chain the content of a program variable?

for instance by using in a SELECT the statement

WHERE tiitm001.dsca LIKE %find%

any item containing in its description the chain "find" is displayed

But what if "find" is the value of a variable? Is there any way?

Thank you

mark_h
2nd October 2017, 18:29
Not exactly sure of the question - but you can use query.extension and build you a filter on a session. You can search on query.extension to get an idea of the possibilities.

MIMOURI
2nd October 2017, 19:06
Mark
I want to introduce a value in a screen field and use it to filter the records containing this value in every position of a key field of the table

mark_h
2nd October 2017, 20:30
Are you on 4c4 or LN? In 4c4 you have query.extension - I usually have a filter program that calls the session that will be filtered. In LN look at query.extend - in LN you can rebuild the queries.

rahul ingale
6th October 2017, 23:44
sql.var=sql.parse(
" Select tiitm001.cuno " &
" from tiitm001 " &
" where tiitm001.dsca like " & find)

where find is variable.