-
query_allowed, false(oracle forms)
why is it that when i issue this statement, all of those in query are lost? i mean lets say i have three lines:
LINE
SUBLINE
CLM_DOCS
when i have this statement on line and subline, it works fine but when it goes to clm_docs, no matter how i do it, all queries in clm_docs does not appear anymore. you see, what i need to do is that all records in clm_docs should not be queriable if it doesn't have anything on it. but instead of getting what i want (i tried "count" to count rows, and yes, it says 0 when it goes to records with nothing on them) what happens is that all records on clm_docs disappears (even if it is clear that there are records), all because of the code:
set_block_property('block', query_allowed, false);
what should i do to prevent this?
thanks a bunch...
-
wow...still no replies. but to those who may be having the same problem or needed condition of allowing query to records but not with records with null values, you should try this on your block level trigger. but the point with here is that instead of the code:
set_block_property('blockname', query_allowed, property_false);
to be used in not allowing some records(with nothing on them) to be queried, it is better if you would not allow the enter-query part to even start, thus with that snippet below. because with the problem I had with that code is that it remains on the "enter query" part, which prohibits other queriable records to show, thus, to be able to see those records, you need to have your cursor on that certain block and run F7 and F8 to have it shown. it is ok but the con with that is if you don't know all the records and don't have an idea which record should show, you are eventually stuck with nothing to even see in the first place.
Code:
DECLARE
rowcount number;
BEGIN
SELECT count(d.clm_doc_desc)
INTO rowcount
FROM clm_docs d
WHERE d.line_cd=:line.line_cd
AND d.subline_cd=:subline.subline_cd;
IF rowcount=0 then
IF :SYSTEM.MODE = 'ENTER-QUERY' THEN
message('no');
EXIT_FORM;
END IF;
END IF;
EXCEPTION
WHEN NO_DATA_FOUND THEN
null;
END;
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|