find visual_attribute item [message #648860] |
Sat, 05 March 2016 03:20 |
yeahia
Messages: 22 Registered: June 2010 Location: Bangladesh
|
Junior Member |
|
|
hi,
i want to use find_va function so that if the visual attribute exists or not.
i use it like this:
declare
rl_id varchar2(100);
begin
rl_id:=find_va('LOV_ITEM');
IF Id_Null((rl_id) THEN
SET_ITEM_INSTANCE_PROPERTY(item_name,current_record,visual_attribute,'LOV_ITEM')
END IF;
END;
while i compile then en error shows:
expression is of wrong type
statement ignored.
question:
what will be the datatype of rl_id
or how it will be solved
thanks
|
|
|
Re: find visual_attribute item [message #648869 is a reply to message #648860] |
Sat, 05 March 2016 10:32 |
|
Littlefoot
Messages: 21823 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
FIND_VA built-in searches for the visual attributes of an item in a given block and returns the value of that attribute as a text string.
ID_NULL returns a Boolean value that indicates whether the object ID is available.
You pass VARCHAR2 to ID_NULL, and it expects an object ID instead.
Therefore, I guess that simple
if rl_id is null then
set_item_instance_property ...
end if; might solve the problem.
[Updated on: Sat, 05 March 2016 10:33] Report message to a moderator
|
|
|
Re: find visual_attribute item [message #648875 is a reply to message #648869] |
Sat, 05 March 2016 23:15 |
yeahia
Messages: 22 Registered: June 2010 Location: Bangladesh
|
Junior Member |
|
|
Thanks for your prompt suggestion. but when i want to complie it gives below error:
declare
rl_id varchar2(100);
begin
rl_id:=find_va('LOV_ITEM');
IF rl_id is null THEN
SET_ITEM_INSTANCE_PROPERTY(item_name,current_record,visual_attribute,'LOV_ITEM')
END IF;
END;
WHEN COMPILE IT SHOWS:
Error 382 at line 13, column 12
expression is of wrong type
Error 0 at line 13, column 5
Statement ignored
The cursor blinks in find_va('LOV_ITEM').
Thanks in advance for solving.
|
|
|
|
|