johnhul50
19th March 2013, 13:25
Good Afternoon,

We are in BaaN 5c.
In the before.program i have on the main table tcmcs052

query.extend.where("tcmcs052.dsca like "".*TEXTI.*""")

This works very well.

How can i have the same result when i want to put .*TEXTI.* in a variable?

Thank You

John

mark_h
19th March 2013, 14:16
Always search the forum - this thread (http://www.baanboard.com/baanboard/showthread.php?t=27861&highlight=like+query+extend) has some examples on how you can build your query.extend.

johnhul50
26th March 2013, 08:41
Good Morning,

Thank you for your reply Mark.
But the problem persists.

Main Table is tcmcs052 (Projects in BaaN 5c)
Field tcmcs052.dsca with domain tcdsca
Variable card2 with domain tcdsca
the value of card2 is .*TEXTIL.*
Can you tell me how to code in the
before.program:
query.extend.where("tcmcs052.dsca like :card2") ??
or
query.extension="tcmcs052.dsca like :card2" ??

I tried quite some coding but none of them work.

Kind Regards

John

JaapJD
26th March 2013, 08:52
You can do this:

query.extend.where("tcmcs052.dsca like """ & card2 & """")

johnhul50
26th March 2013, 09:31
Thank you for your reply Jaap

i get


: Error: '&' not expected.

now in

query.extend.where("tcmcs052.dsca like """ & card2 & """")

Kind Regards

John

JaapJD
26th March 2013, 10:14
For me this compiles correctly.

johnhul50
26th March 2013, 10:44
Good Morning Jaap,

You were right, it compiles correctly and it works!!

Thank You very much

John