Home » Developer & Programmer » Forms » user could not do same post (forms 6i)
user could not do same post [message #340361] |
Tue, 12 August 2008 08:29 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
sajidrazmi
Messages: 47 Registered: August 2008 Location: oman
|
Member |
|
|
Hi dear All Gurus
i need one solution.
i have three block in in block i have got data and i need
when if user want record post so user click the recod after that he click the button after that record post another block
i have written this query it works but i need if record post then user could not do same post
i have written these code if there is any modification please do it.
DECLARE
THE_BUTTON_PRESSED VARCHAR2(30);
MY_CURRENT_VALUE VARCHAR(30);
CUR_BLK VARCHAR2(80) := :SYSTEM.CURSOR_BLOCK;
CUR_REC NUMBER;
BLK_ID BLOCK;
BEGIN
BLK_ID:= FinD_BLOCK( CUR_BLK);
CUR_REC := GET_BLOCK_PROPERTY( BLK_ID ,CURRENT_RECORD);
MY_CURRENT_VALUE:=:BLK_TAS_TEMP.TAS_TEMP_EMP_CODE;
GO_BLOCK('BLK_TAS_TEMP');
SET_ITEM_INSTANCE_PROPERTY('BLK_TAS_TEMP.TAS_TEMP_EMP_CODE', CURRENT_RECORD ,VISUAL_ATTRIBUTE ,'CUR_ROW');
SET_ITEM_INSTANCE_PROPERTY('BLK_TAS_TEMP.TAS_TEMP_EMP_NAME', CURRENT_RECORD ,VISUAL_ATTRIBUTE ,'CUR_ROW');
SET_ITEM_INSTANCE_PROPERTY('BLK_TAS_TEMP.TAS_TEMP_MORNING_IN', CURRENT_RECORD ,VISUAL_ATTRIBUTE ,'CUR_ROW');
SET_ITEM_INSTANCE_PROPERTY('BLK_TAS_TEMP.TAS_TEMP_LUNCH_OUT', CURRENT_RECORD ,VISUAL_ATTRIBUTE ,'CUR_ROW');
SET_ITEM_INSTANCE_PROPERTY('BLK_TAS_TEMP.TAS_TEMP_TOT_MORNING', CURRENT_RECORD ,VISUAL_ATTRIBUTE ,'CUR_ROW');
SET_ITEM_INSTANCE_PROPERTY('BLK_TAS_TEMP.TAS_TEMP_POST_LUNCH_IN', CURRENT_RECORD ,VISUAL_ATTRIBUTE ,'CUR_ROW');
SET_ITEM_INSTANCE_PROPERTY('BLK_TAS_TEMP.TAS_TEMP_EVENING_OUT', CURRENT_RECORD ,VISUAL_ATTRIBUTE ,'CUR_ROW');
SET_ITEM_INSTANCE_PROPERTY('BLK_TAS_TEMP.TAS_TEMP_TOT_EVENING', CURRENT_RECORD ,VISUAL_ATTRIBUTE ,'CUR_ROW');
SET_ITEM_INSTANCE_PROPERTY('BLK_TAS_TEMP.TAS_TEMP_TOT_HRS', CURRENT_RECORD ,VISUAL_ATTRIBUTE ,'CUR_ROW');
SET_ITEM_INSTANCE_PROPERTY('BLK_TAS_TEMP.TAS_TEMP_STATUS', CURRENT_RECORD ,VISUAL_ATTRIBUTE ,'CUR_ROW');
SET_ITEM_INSTANCE_PROPERTY('BLK_TAS_TEMP.TAS_TEMP_OT', CURRENT_RECORD ,VISUAL_ATTRIBUTE ,'CUR_ROW');
SET_ITEM_INSTANCE_PROPERTY('BLK_TAS_TEMP.TAS_TEMP_EMP_NAME', CURRENT_RECORD ,VISUAL_ATTRIBUTE ,'CUR_ROW');
SET_ITEM_INSTANCE_PROPERTY('BLK_TAS_TEMP.TAS_TEMP_REMARKS', CURRENT_RECORD ,VISUAL_ATTRIBUTE ,'CUR_ROW');
IF :BLK_TAS_TEMP.TAS_TEMP_EMP_CODE =:BLK_TAS_TEMP.TAS_TEMP_EMP_CODE THEN
MAKE_BLOCK_UPDATE_ALLOW('ASG_TAS');
GO_BLOCK('ASG_TAS');
LAST_RECORD;
NEXT_RECORD;
:ASG_TAS.TAS_EMP_CODE:=:BLK_TAS_TEMP.TAS_TEMP_EMP_CODE;
:ASG_TAS.TAS_EMP_NAME:=:BLK_TAS_TEMP.TAS_TEMP_EMP_NAME;
:ASG_TAS.TAS_MORNING_IN:=:BLK_TAS_TEMP.TAS_TEMP_MORNING_IN;
:ASG_TAS.TAS_LUNCH_OUT:=:BLK_TAS_TEMP.TAS_TEMP_LUNCH_OUT;
:ASG_TAS.TAS_TOT_MORNING:=:BLK_TAS_TEMP.TAS_TEMP_TOT_MORNING;
:ASG_TAS.TAS_POST_LUNCH_IN:=:BLK_TAS_TEMP.TAS_TEMP_POST_LUNCH_IN;
:ASG_TAS.TAS_EVENING_OUT:=:BLK_TAS_TEMP.TAS_TEMP_EVENING_OUT;
:ASG_TAS.TAS_TOT_EVENING:=:BLK_TAS_TEMP.TAS_TEMP_TOT_EVENING;
:ASG_TAS.TAS_TOT_HRS:=:BLK_TAS_TEMP.TAS_TEMP_TOT_HRS;
IF :BLK_PARA.RG_STATUS = 'P' THEN
:ASG_TAS.TAS_PSTATUS:='P';
END IF;
IF :BLK_PARA.RG_STATUS = 'A' THEN
:ASG_TAS.TAS_PSTATUS :='A';
END IF;
IF :BLK_PARA.RG_STATUS = 'L'THEN
:ASG_TAS.TAS_PSTATUS :='L';
END IF;
MAKE_BLOCK_QUERY_ONLY('ASG_TAS');
END IF;
END;
Thanks in advance
[EDITED by LF: added [code] tags]
[Updated on: Wed, 13 August 2008 00:27] by Moderator Report message to a moderator
|
|
|
|
|
Re: user could not do same post [message #340486 is a reply to message #340457] |
Wed, 13 August 2008 01:49 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
![](/forum/images/custom_avatars/72104.gif) |
Littlefoot
Messages: 21823 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
Please, read the OraFAQ Forum Guide.
It appears that you are quite impatient. Asking a question does not necessarily mean that you'll get the answer (although, you might consider yourself lucky as David (djmartin) will, eventually, see ALL questions asked in the Forms Forum.
However, you should understand that noone here owes you any kind of response. It is just a forum, where people try to help each other under certain conditions: - they have the knowledge,
- enough free time (nobody here is an employee of the OraFAQ; most of us have a regular job or study and can not / do not want to spend free time answering your (or anyone else's) questions,
- don't feel annoyed by constant "I am not getting any response" messages,
- etc.
If your problem requires urgent solution, please, call Oracle Support Service or hire a consultant. Here, on OraFAQ Forum, all you can do is to be patient.
As of your question: if you had read the Guide, you'd probably know that code should be properly formatted. Messy posts are difficult to read and some/many forum members simply skip such questions as they don't want to spend their (precious) free time trying to decipher what someone wants to say.
This time, I have added [code] tags to your message. Next time, please, do it yourself.
You have declared certain variables, but do not use them (for example, CUR_REC, THE_BUTTON_PRESSED). If you don't use them, remove them.
IF condition is always true; therefore, it is useless. Is that on purpose, or did you make a mistake?
IF :BLK_TAS_TEMP.TAS_TEMP_EMP_CODE =
:BLK_TAS_TEMP.TAS_TEMP_EMP_CODE
THEN
Quote: | i need if record post then user could not do same post
| I guess that it means that you should mark "BLK_TAS_TEMP" record as "posted" so that user couldn't "post" it again ("post", as far as I understood it, means "copy values from one block to another". Right?). You'd, of course, have to check whether the record is marked or not, and then copy it or not.
|
|
|
Re: user could not do same post [message #341434 is a reply to message #340361] |
Mon, 18 August 2008 19:56 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) |
![](/forum/images/custom_avatars/67467.jpg) |
djmartin
Messages: 10181 Registered: March 2005 Location: Surges Bay TAS Australia
|
Senior Member Account Moderator |
|
|
Concerning all your 'SET_ITEM_INSTANCE_PROPERTY' commands, why not use 'Current Record Visual Attribute Group' property at the block level?
You have a 'MAKE_BLOCK_UPDATE_ALLOW' procedure that permits access to a block, why don't you create a 'MAKE_ROW_UPDATE_NOT_ALLOW' and apply it to the record from which you are 'COMING'?
David
|
|
|
Goto Forum:
Current Time: Mon Feb 10 00:15:00 CST 2025
|