>when I try to pass this value it doesn't pass.
That is not very informative.
Are you sure the parameter is of type Char, not Number?
Do you get an error?
Is the length of the parameter correct?
Can you show us your code?
You can use a Global variable to pass values between Forms like this: :Global.FieldName
use this global variable (:Global.FieldName) in the sending and receiving forms directly without declaring it
My Header Form coding as follows.
When I press the button to move to the lines the following code executes
PASSING FORM CODING;
pl PARAMLIST := GET_PARAMETER_LIST('PL_AT');
IF NOT ID_NULL(pl) THEN
pl := CREATE_PARAMETER_LIST('PL_AT');
RECEIVING FORM CODING;
Written on WHEN_NEW_FORM_INSTANCE
IF :PARAMETER.P_AT IS NULL THEN
Created PARAMETER as P_AT, Data Type CHAR, MAX LENGTH 30
How did you check that the value isn't passed correctly? I only ask because you build the default_where in a wrong way, you're missing the quotes as you parameter is a character-parameter.
I checked by entering values to the Header Form. If I enter a number (Ex 0001,123, etc) it passes to the Lines form field,
but If I enter a Character value (For Ex. ABC/0124) It doesn't pass to the lines and it gives an error message saying ORA-00904: 'ABC': invalid identifier
Thank you for your reply.
But I have used parameter before with numbers. But I want to make sure why it is not working with Characters and what is the mistake that I'm doing.
So it's as i said. You didn't actually check the parameter-value, and ORA-00904 indicates even more that the parameter is passed correctly. Your setting of the default-where is wrong.
It results in
which is wrong. The result should be
So your code should be either
SET_BLOCK_PROPERTY('NZK_HWSTATIC_INFO',DEFAULT_WHERE,'HWSI_ASSET_TAG ='''||:parameter.p_at || '''');
Perfect, the second option works fine. Thank you for your support
The second option worked perfectly. Could you please clarify the reason of adding two single quotes before the parameter and four single quotes (''||:parameter.p_at || '''') after the parameter?
1 person found this helpful
If you want to use a quote inside a string literal you have to put two quotes in it. So with the four quotes, the first is the start of the string the second and third indicate one quote and the fourth is the end of the string.