I think that this is correct (without ":") :
rsu.address_id = name_in('order.address_id'
Main Topics
Browse All TopicsI am using Oracle 11.3.00 with Oracle 8i
I am adding code into custom.pll to load a value into an Oracle built-in form
if (form_name = 'OEXOEMOE' and block_name = 'ORDER')
then
declare
......
CURSOR c_get_tax_status IS
select ATTRIBUTE1
from RA_SITE_USES_ALL rsu
where rsu.address_id = := name_in('order.address_id'
.......
when I compile, I have the following error,
ERROR 103 at line 511, column 25
Encountered the symbol "=" when expecting one of the following:
"(" "-" "+" "all" "mod" "null" <an identifier>
<a double-quoted string> <a bind variable> <a number>
<a single-quoted SQL string> "any" "avg" "count" "max"
"min" "prior" "some" "sql" "stddev" "sum" "variance"
Replacing "=" with "(".
ERROR 103 at line 511, column 56
Encountered the symbol ";" when expecting one of the following:
"." "(" ")" "," "*" "%" "&" "|" "=" "-" "+" "<" "/" ">"
"in" "mod" "not" "rem" ".." "an exponent (**)"
"<> or != or ~=" ">=" "<=" <> "and" "or" "like" "between"
"is null" "is not" "||"
) was inserted before ";" to continue.
Closing library CUSTOM...
FRM-30312:Failed to compile the library.
When I comment out this line
-- rsu.address_id = := name_in('order.address_id'
even I use this line
rsu.address_id = := order.address_id;
still doesn't work, same error.
it pass
I think maybe something wrong with this line. Can you tell?
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
you can try :
select ATTRIBUTE1
from RA_SITE_USES_ALL rsu
where rsu.address_id = name_in('order.address_id'
--> := is the assignment operator , it should be used here.
or try
select ATTRIBUTE1
from RA_SITE_USES_ALL rsu
where rsu.address_id = :order.address_id
--> we are using to :blockname.field_name to get the contents , i mean we are not using name_in function here...
When I use this line
rsu.address_id := name_in('order.address_id'
I have this error
Compiling library CUSTOM...
Invalidating Package Spec CUSTOM......
Invalidating Package Body CUSTOM......
Compiling Package Spec CUSTOM......
Compiling Package Body CUSTOM......
ERROR 103 at line 516, column 24
Encountered the symbol "=" when expecting one of the following:
"." "(" "*" "%" "&" "=" "-" "+" ";" "<" "/" ">" "for" "in"
"mod" "not" "rem" "an exponent (**)" "<> or != or ~=" ">="
"<=" <> "and" "or" "like" "between" "group" "having"
"intersect" "minus" "order" "union" "where" "connect"
"is null" etc.
Replacing "=" with ".".
Closing library CUSTOM...
FRM-30312:Failed to compile the library.
When I use this line
rsu.address_id = name_in('order.address_id'
I have this error
Compiling library CUSTOM...
Invalidating Package Spec CUSTOM......
Invalidating Package Body CUSTOM......
Compiling Package Spec CUSTOM......
Compiling Package Body CUSTOM......
ERROR 231 at line 516, column 26
function 'NAME_IN' may not be used in SQL
ERROR 0 at line 514, column 2
SQL Statement ignored
ERROR 320 at line 0, column 0
the declaration of the type of this expression is incomplete or malformed
ERROR 0 at line 549, column 9
SQL Statement ignored
Closing library CUSTOM...
FRM-30312:Failed to compile the library.
When I use this line
:rsu.address_id := name_in('order.address_id'
I have this error
Compiling Package Body CUSTOM......
ERROR 49 at line 516, column 8
bad bind variable ''
ERROR 103 at line 516, column 9
Encountered the symbol "RSU" when expecting one of the following:
"." "(" "*" "%" "&" "=" "-" "+" ";" "<" "/" ">" "for" "in"
"mod" "not" "rem" "an exponent (**)" "<> or != or ~=" ">="
"<=" <> "and" "or" "like" "between" "group" "having"
"intersect" "minus" "order" "union" "where" "connect"
"is null" etc.
Resuming parse at line 516, column 54.
ERROR 103 at line 562, column 5
Encountered the symbol "IF" when expecting one of the following:
a PL/SQL variable or double-quoted string
a function name (an identifier or operator symbol)
an operator symbol
an optional designator
a key word
Resuming parse at line 562, column 7.
Closing library CUSTOM...
FRM-30312:Failed to compile the library.
When I use this line
rsu.address_id = :order.address_id;
I have this error
Compiling library CUSTOM...
Invalidating Package Spec CUSTOM......
Invalidating Package Body CUSTOM......
Compiling Package Spec CUSTOM......
Compiling Package Body CUSTOM......
ERROR 49 at line 516, column 26
bad bind variable ''
ERROR 103 at line 516, column 32
Encountered the symbol "." when expecting one of the following:
"by"
Replacing "." with "by".
Closing library CUSTOM...
FRM-30312:Failed to compile the library.
All not working
In a pll you can't refer directly to the blocks in a form.
You have to use the name_in.
I didn't know the name_in could not be used in sql .
So try to avoid it:
CURSOR c_get_tax_status (p_address_id number) IS
select ATTRIBUTE1
from RA_SITE_USES_ALL rsu
where rsu.address_id = p_address_id;
change your
OPEN c_get_tax_status;
to
OPEN c_get_tax_status(name_in('
.......
Ok, I modify my query, it passed. However, it cannot pass the value to the form. It's supposed to have a value but it's nothing, I put
message(p_tax_status);
and nothing shown up
how to debug this? Is it possible to have message and value shown up in the command prompt?, instead popped up with the application.
Here is what I test. I input message here
if (p_tax_status is not null ) then
message('inside if');
Copy( p_tax_status,'order.Attrib
else
message('else here');
null;
end if;
After I assign a value to
select rsu.ATTRIBUTE1
from RA_SITE_USES_ALL rsu
where rsu.LOCATION=985290 --p_ship_to_location
and rsu.SITE_USE_CODE='SHIP_TO
message inside if popped up, a value copy to the field on the form
If I use rsu.LOCATION=p_ship_to_loc
message else here popped up, there is no value assigned to copy to the field on the form
I think statement Copy( p_tax_status,'order.Attrib
This ticket is 200 points now
I develop something like this
fnd_message.set_string(' name_in = ' || name_in( 'order.ship_to_location') );
or
message ( name_in( 'order.ship_to_location') );
all got complier error like
ERROR 103 at line 534, column 8
Encountered the symbol "=" when expecting one of the following:
"constant" "exception" <an identifier>
<a double-quoted string> "table"
Replacing "=" with "constant".
Closing library CUSTOM...
FRM-30312:Failed to compile the library.
try....
if (form_name = 'OEXOEMOE' and block_name = 'ORDER'
and name_in('SYSTEM.RECORD_STA
then
declare
p_tax_status varchar2(100);
CURSOR c_get_tax_status (p_ship_to_location number) IS
select rsu.ATTRIBUTE1
from RA_SITE_USES_ALL rsu
where rsu.LOCATION=p_ship_to_loc
and rsu.SITE_USE_CODE='SHIP_TO
begin
--open c_get_tax_status;
-- adding a message here....
message ( 'my message is :' || name_in( 'order.ship_to_location') );
OPEN c_get_tax_status(name_in('
fetch c_get_tax_status into p_tax_status;
close c_get_tax_status;
if (p_tax_status is not null ) then
Copy( p_tax_status,'order.Attrib
else
null;
end if;
end;
end if;
Open in New WindowSelect All
I add more message like below
message ( 'order.ship_to_location before fetch is :' || name_in( 'order.ship_to_location') );
--open c_get_tax_status;
OPEN c_get_tax_status(name_in('
fetch c_get_tax_status into p_tax_status;
close c_get_tax_status;
message ( 'order.ship_to_location is after fetch :' || name_in( 'order.ship_to_location') );
message ( 'p_tax_status is :' || p_tax_status );
When I open the form, the messages popped up. I don't see any values assigned. When I query the form, I don't see values assigned. When I put rsu.LOCATION=985290, I can see p_tax_status is:NON_TAXABLE but there are nothing for order.ship_to_location is before fetch : or order.ship_to_location is after fetch :
Hi, I got a major progress finally and I can copy a flexifled value from one form to other now. The only problem is
each time I open the form, I did not make any changes and just view a record, then close it. it pops up a message
"Do you want to save the changes you have made" Yes, No, Cancel
If select Yes, the last_updated_date and user_id will be updated automatically
If select No, I can exit the form.
If I click on a record to pop up another related form, then close it. I have this message popped up as attached file.
I add more code to it, but it still have this message shown up. How to fix it
I want to get rid of these message. But, I don't know how??
Hi flow01 and nav_kum_v,
Both of you code hit the point. But, I just choose the wrong ID. Now I choose the right block id and create a stored procedure for the sql and pass/return the values back to it.also, I add this line
and name_in('SYSTEM.RECORD_STA
It work!
Attached is the whole code for you to take a look.
I again increase 50 points to this request. Now the ticket is
Message FRM-40400 is only informative, so you can suppress it by setting :system.message_level to a higher value:
Cause: Save complete. Action: No action is necessary. Level: 5 Type: Informative
So in the beginning of your code use this:
:system.message_level:='10
Also you can read "Working with Forms Runtime Messages" in the on-line help.
Do you mean putting this line before declare?
....
:system.message_level:='10
declare
....
I got a complier error
ERROR 49 at line 507, column 2
bad bind variable ''
ERROR 103 at line 507, column 3
Encountered the symbol "SYSTEM" when expecting one of the following:
":=" "." "(" "%" ";" "indicator"
. was inserted before "SYSTEM" to continue.
Closing library CUSTOM...
FRM-30312:Failed to compile the library.
Ok, I am able to get rid of one message like I attached image shown after I put
if p_tax_status is not null then
copy( p_tax_status, 'order.attribute14' );
copy( '10' , 'System.Message_Level' );
end if;
But, after I close each form, I still have this following message asked, even I don't change anything
"Do you want to save the changes you have made" Yes, No, Cancel
according to http://www.orafaq.com/foru
if name_in('SYSTEM.RECORD_STA
COMMIT;
END IF;
When I open the form and find a record, it has this message popped up as attached image. I click on OK but it never give me to close the form anymore
Is it about this message " "Do you want to save the changes you have made" Yes, No, Cancel " ? If it is so, then it means that in your form there is at least one record with status NEW or UPDATE. Do you want to change records in this form ? If yes then the message is right. If no then you ought to see post-query triggers and if there are any assignments then put
set_record_property(:syste
at the end of code.
To your quick question about copy( ' ', 'order.attribute14' ) - this is all right. If you use this statement and the item is not empty then there is another problem.
This is non-customized form, I cannot see/change post-query trigger. I am modifying custom.pll to copy a flexfield from customer form to another flexfield on order form. That probably ask me if saved. The answer is no. How can do set_record_property(:syste
I increase 50 points for this since this is additional question, but in the same project and related
copy( ' ', 'order.attribute14' ) seems not working. But when I assign a value to '', it works - copy( 'N/A ', 'order.attribute14' )
My question is if I can make it invisible when order.attribute14 = N/A. Sounds I need some formatting line. Here is the code
if (p_tax_status is not null and p_ship_to_location is not null) then
copy( p_tax_status, 'order.attribute14' );
elsif (p_tax_status is null and p_ship_to_location is not null) then
copy( 'N/A', 'order.attribute14' );
if (name_in('order.attribute1
name_in('order.attribute14
end if;
My formatting part for N/A is not working, any advice?
I tried copy( null, 'order.attribute14' );--> doesn't work
then I tried name_in('order.attribute14
I have this error when I complie
ERROR 220 at line 532, column 3
simple name required in this context
ERROR 0 at line 532, column 3
Statement ignored
Closing library CUSTOM...
FRM-30312:Failed to compile the library.
seems other people have the similar problem, but no solution
http://oracle.ittoolbox.co
Null value is not copied to descriptive flex field through CUSTOM.pll
"How can do set_record_property(:syste
if (p_tax_status is not null and p_ship_to_location is not null) then
copy( p_tax_status, 'order.attribute14' );
elsif (p_tax_status is null and p_ship_to_location is not null) then
copy( 'N/A', 'order.attribute14' );
if (name_in('order.attribute1
name_in('order.attribute14
end if;
end if;
set_record_property(:syste
2) you can try this with NULL value:
v_null:=null;
copy(NAME_IN(v_null), 'order.attribute14' );
By the way: is order.attribute14 an required item or not ? Because if it is the required item then I think that copying NULL value will be unsuccessfull.
1). I have complie error
ERROR 103 at line 551, column 24
Encountered the symbol "SYSTEM" when expecting one of the following:
"." "(" ")" "," "*" "%" "&" "|" "=" "-" "+" "<" "/" ">"
"in" "mod" "not" "rem" ".." "an exponent (**)"
"<> or != or ~=" ">=" "<=" <> "and" "or" "like" "between"
"is null" "is not" "||" "indicator"
. was inserted before "SYSTEM" to continue.
ERROR 103 at line 551, column 47
Encountered the symbol "SYSTEM" when expecting one of the following:
"." "(" ")" "," "*" "%" "&" "|" "=" "-" "+" "<" "/" ">"
"in" "mod" "not" "rem" ".." "an exponent (**)"
"<> or != or ~=" ">=" "<=" <> "and" "or" "like" "between"
"is null" "is not" "||" "indicator"
. was inserted before "SYSTEM" to continue.
Closing library CUSTOM...
FRM-30312:Failed to compile the library.
It seems these either lines
name_in('order.attribute14
or
set_record_property(:syste
cannot be accepted. After I comment out them, it pass
2). I have this error popped after I query a record on the form
FRM-40738:Argument 1 to builtin Name_IN canot not be null
3) I have turned off order.attribute14 required
This is completly wrong
name_in('order.attribute14
my_variable:=name_in('orde
But in the library (pll) you must use COPY, if you want to set order.attribute14 to ''
COPY('',name_in('order.att
2)
set_record_property(:syste
I have forgotten to write that in pll you must use instead of system variables - these are known in form - some variables from your library or directly
set_record_property('1','m
"1). I have complie error ...
name_in('order.attribute14
or
set_record_property(:syste
cannot be accepted."
=>
set_record_property(:syste
I have forgotten to write that in pll you must use instead of system variables - these are known in form - some variables from your library or directly
set_record_property('1','o
if the name of block is order. But I think that in the custom.pll there are some variables pointed to triggered block and record.
"After I comment out them, it pass
2). I have this error popped after I query a record on the form
FRM-40738:Argument 1 to builtin Name_IN canot not be null"
This is completly wrong
name_in('order.attribute14
It ought to be like this:
my_variable:=name_in('orde
But in the library (pll) you must use COPY, if you want to set order.attribute14 to ' '
COPY(' ',name_in('order.attribute
still doesn't work.still cannot copy a null or display a null value to order.attribute14
Here is my code
....
my_variable VARCHAR2(100);
...
my_variable:=name_in('orde
if (p_tax_status is not null and p_ship_to_location is not null) then
copy( p_tax_status, 'order.attribute14' );
copy( '10' , 'System.Message_Level' );
elsif (p_tax_status is null and p_ship_to_location is not null) then
copy( 'N/A', 'order.attribute14' );
if (name_in('order.attribute1
name_in('order.attribute14
COPY(my_variable, name_in('order.attribute14
end if;*/
end if;
set_record_property('1','o
Hi everyone,
Let's forget the point how to fix copy a null value to a flexfield.I think it's a bug in Oracle form and it's not fixable. I have found a way to get around it. I use N/A to represent null, not use null. It works fine and my team is OK with it.
Now, let's focus on this problem. I still have this message "Do you want to save the changes you have made" Yes, No, Cancel " ? bother me when I close the form.
How to get rid of this message when I close the form
IF name_in('SYSTEM.RECORD_STA
and event_name = 'WHEN-VALIDATE-RECORD'
then
EXIT_FORM(NO_COMMIT, NO_VALIDATE);
end if;
If I put the following code, it will come another message "close form" yes, no, cancel and the tool message bar will come up
frm-40737:illegal restricted procedure exit_form in when-validate-record trigger
So, how to fix this problem - get rid of message
"Do you want to save the changes you have made" Yes, No, Cancel " ?
or
frm-40737:illegal restricted procedure exit_form in when-validate-record trigger
Your problem is caused by changing the status of record from QUERY to CHANGED. I think that it is done by your new added code
...
copy( p_tax_status, 'order.attribute14' );
...
Here you change the value of item attribute14 in block order.
If you don't want to save changes then you must change the status of record programmatically from changed to query by this statement:
set_record_property('1','o
This statement you can put at the end of your new code.
This part of code is incorrect
IF name_in('SYSTEM.RECORD_STA
and event_name = 'WHEN-VALIDATE-RECORD'
then
EXIT_FORM(NO_COMMIT, NO_VALIDATE);
end if;
so put it away.
Still doesn't work
I use your line set_record_property('1','o
When I open the form and query a record like customer_number, I cannot input the whole number such as 667654, the field only shown one digit in a second, I cannot query this record by query->enter. I don't understand what '1' used for. You mentioned in your previous mail "these are known in form - some variables from your library or directly.." what doesn't mean?
Then I use the following code,
Set_Record_Property (NAME_IN ('SYSTEM.TRIGGER_RECORD'),
NAME_IN ('SYSTEM.TRIGGER_BLOCK'),
STATUS,
QUERY_STATUS);
It has the same problem as i use '1' line you gave me.
The I use
IF name_in('SYSTEM.RECORD_STA
event_name = 'WHEN-VALIDATE-RECORD' then
Set_Record_Property (NAME_IN ('SYSTEM.TRIGGER_RECORD'),
NAME_IN ('SYSTEM.TRIGGER_BLOCK'),
STATUS,
QUERY_STATUS);
END IF;
It works and the asking save message is gone. But the problem is when I want to change an existing record and save it, it cannot allow me to do that and come up with the error as attached. When I hit Ok, still cannot save.
What I want is when I don't change anything and just view the data and close the form, no asking save. But if I update an existing record and either go action-> or directly close the form, will ask me if wanting to save the record.
I guess I need to switch around the mode changed->query->new...But I cannot overcome this error message or asking save message popped up even I don't change anything.
'1' means record number -> see SET_RECORD_PTOPERTY built-in in the on-line help. But I see that you have resolved problem by using NAME_IN:
Set_Record_Property (NAME_IN ('SYSTEM.TRIGGER_RECORD'),
NAME_IN ('SYSTEM.TRIGGER_BLOCK'),
STATUS,
QUERY_STATUS);
To FRM-40654 (from the Forms help):
Cause: Another user has updated this record since you performed a query and has changed at least one field in the record. Your actions have not changed the record in memory.
Action: You can update or delete this record now only if another user has restored the field values back to the way they were when you performed the query. Otherwise, you must re-query to fetch and display the new record into the form before you can update or delete it.
Level: 20
Type: Error
It is difficult to say what you can do.
Where is this code ?
IF name_in('SYSTEM.RECORD_STA
event_name = 'WHEN-VALIDATE-RECORD' then
Set_Record_Property (NAME_IN ('SYSTEM.TRIGGER_RECORD'),
NAME_IN ('SYSTEM.TRIGGER_BLOCK'),
STATUS,
QUERY_STATUS);
END IF;
I think that if it is coming during WHEN-VALIDATE-RECORD trigger is firing then it is the problem (FRM-40654 error).
All you can do is debug your form.
this code is located in custom.pll.
Yes, you are right. it's coming during WHEN-VALIDATE-RECORD trigger is firing then it is the problem (FRM-40654 error).
Debug my form? this is difficult
The form is not custom form and it's built-in form and how can I debug the form? Do you have other solution to get rid of "Do you want to save the changes you have made" Yes, No, Cancel " ? but at the same time, I can update/change a existing record?
Yes, it is true. But if you change the item's value then it is changed item.
I ask you
"Where is this code called from ?
IF name_in('SYSTEM.RECORD_STA
event_name = 'WHEN-VALIDATE-RECORD' then
Set_Record_Property (NAME_IN ('SYSTEM.TRIGGER_RECORD'),
NAME_IN ('SYSTEM.TRIGGER_BLOCK'),
STATUS,
QUERY_STATUS);
END IF;
"
I know that it is located in custom.pll.
When and where you use your new code ?
The best you can do is calling your code in when-new-form-instance trigger after execute_query or in a post-query trigger.You have to remove
event_name = 'WHEN-VALIDATE-RECORD'
from the condition.
Ok, after I put the following code, without using this
Set_Record_Property (NAME_IN ('SYSTEM.TRIGGER_RECORD'),
NAME_IN ('SYSTEM.TRIGGER_BLOCK'),
STATUS,
QUERY_STATUS);
everything seems working now.
if (p_tax_status is not null and p_ship_to_location is not null
and name_in('SYSTEM.RECORD_STA
and event_name = 'WHEN-VALIDATE-RECORD' ) then
copy( p_tax_status, 'order.attribute14' );
elsif (p_tax_status is null and p_ship_to_location is not null
and name_in('SYSTEM.RECORD_STA
and event_name = 'WHEN-VALIDATE-RECORD' ) then
copy('N/A', 'order.attribute14');
end if;
So, I will wait for few days for testing and will close this ticket with points for every one.
Business Accounts
Answer for Membership
by: pratikroyPosted on 2009-09-07 at 21:40:25ID: 25278646
The line "rsu.address_id = := order.address_id; " has to = signs, one with : and other without :. That is probably your problem (perhaps a typo).
) ;
Try this:
rsu.address_id := name_in('order.address_id'