Set_block_property Default Where [message #506768] |
Wed, 11 May 2011 03:51 |
kame
Messages: 69 Registered: July 2009
|
Member |
|
|
I need some information regarding
SET_BLOCK_PROPERTY , DEFAULT_WHERE
How it works
I am using this code
SET_BLOCK_PROPERTY('bank_recon',
DEFAULT_WHERE, 'v_bankcode= ''' || :button.bankcode || ''' and ' || 'v_chq= ''' || :button.chq_no || '''');
but when I add one another condition its not working.
SET_BLOCK_PROPERTY('bank_recon',
DEFAULT_WHERE, 'v_bankcode= ''' || :button.bankcode || ''' and ' || 'v_chq= ''' || :button.chq_no ||
''' and ' || 'recon is null'||
'''');
Please guide me and inform me how it is work... how to use ' '
|
|
|
Re: Set_block_property Default Where [message #506769 is a reply to message #506768] |
Wed, 11 May 2011 04:08 |
cookiemonster
Messages: 13963 Registered: September 2008 Location: Rainy Manchester
|
Senior Member |
|
|
As always the standard method of debugging dynamic sql (as this is dynamic sql) should be used.
Assign the value you're passing to set_block_property for the where clause to a variable. Use the message built-in to display the variable (or assign it to a datablock item if you want to be able to copy and paste it).
The problem should become obvious.
|
|
|
|
Re: Set_block_property Default Where [message #507039 is a reply to message #506768] |
Thu, 12 May 2011 05:13 |
jademad
Messages: 8 Registered: May 2011 Location: Bahrain
|
Junior Member |
|
|
kame wrote on Wed, 11 May 2011 11:51I need some information regarding
SET_BLOCK_PROPERTY , DEFAULT_WHERE
How it works
Please guide me and inform me how it is work... how to use ' '
as u know that u can add a where condition to filter any SQL result, u can use where property related to the datablock in the form to set a condition to filter these records that may displayed by using 'WHERE Property'.
Also at the runtime you can set a Where condition for a block using the built-in 'Set_block_Property' as follows:
Set_block_Property ('Block_name',default_where,'the condition')
eg: on scott schema on employee form:
Set_block_Property ('Employee',default_where,'dept_no=30');
in case that u want to remove the condition to retrieve all records you have to reset the Where property as follows:
[code]
Set_block_Property ('Employee',default_where,'');
I hope that was clear to u
|
|
|
|