Home » Developer & Programmer » Forms » Go Block on forms
Go Block on forms [message #147392] Thu, 17 November 2005 08:36 Go to next message
Sharaf
Messages: 62
Registered: September 2005
Location: U.K
Member
Please I have multiple Modules each with multiple data blocks.

Please on the click of a button, i want to call a new form and

to go to a particular datablock but not the first data block in

the module.

Please is this possible.

Cheers
Re: Go Block on forms [message #147401 is a reply to message #147392] Thu, 17 November 2005 08:56 Go to previous messageGo to next message
Maaher
Messages: 7065
Registered: December 2001
Senior Member
Warning: this comes from memory, I've got no Forms installed.

1. In the calling Form, use the NEW_FORM built-in in the WHEN-BUTTON-PRESSED trigger of your push-button.

2. In the called Form, use the WHEN-NEW-FORM-INSTANCE trigger, use the GO_BLOCK trigger.

MHE
Re: Go Block on forms [message #147427 is a reply to message #147392] Thu, 17 November 2005 09:59 Go to previous messageGo to next message
kiran
Messages: 503
Registered: July 2000
Senior Member
Quote:

GO_BLOCK trigger


Just correcting a typo.

GO_BLOCK is a Built-in function not a trigger.

--Kiran.
Re: Go Block on forms [message #147438 is a reply to message #147401] Thu, 17 November 2005 10:34 Go to previous messageGo to next message
Sharaf
Messages: 62
Registered: September 2005
Location: U.K
Member
Thanks for the post
please this is the scenerio.

i have a module with two data block.

when the form compiles it loads the first block which is the

splash screen , ater 5 seconds it loads the second block which

is the login screen, but if the loggin fails, I want to reload that same data block but without reloading the whole form, because i tried it and it start from the splash canvas again and i dont want that.

Re: Go Block on forms [message #147443 is a reply to message #147392] Thu, 17 November 2005 10:50 Go to previous messageGo to next message
kiran
Messages: 503
Registered: July 2000
Senior Member
Quote:

is the login screen, but if the loggin fails, I want to reload that same data block but without reloading the whole form, because i tried it and it start from the splash canvas again and i dont want that.


Can you post that code where you are validating the login.

--Kiran.
Re: Go Block on forms [message #147445 is a reply to message #147443] Thu, 17 November 2005 10:54 Go to previous messageGo to next message
Sharaf
Messages: 62
Registered: September 2005
Location: U.K
Member
thanks here is the code.

this code is attached to the loggin button on the login module, which contains the splash canvas and the login datablock

declare
user_id varchar2(20);
pass varchar2(20);
u_level varchar2(20);

cursor u_login is
select username, passwords, userlevel from userlogin where username=:u_name and passwords=:p_word;

begin
open u_login;
loop
fetch u_login into user_id, pass, u_level;
if u_login%notfound
then
message('Username or Password Invalid Please try again!');
call_form('J:\My Music\My Playlists\New Folder\LOGIN');
elsif u_level ='admin' then
call_form('J:\My Music\My Playlists\New Folder\ADMIN');
else
call_form('J:\My Music\My Playlists\New Folder\USER');
end if;
end loop;
end;
Re: Go Block on forms [message #147531 is a reply to message #147445] Fri, 18 November 2005 02:05 Go to previous messageGo to next message
Maaher
Messages: 7065
Registered: December 2001
Senior Member
I'd say: use Oracle's REAL user authentication. If the login fails, you stay where you are. If the login passes, you can evaluate the USER and direct him to the correct screen. One application owner, several application users. It makes auditing and access control a lot easier IMO.

But in your case, the form containing the code, is it the J:\My Music\My Playlists\New Folder\LOGIN' form? If so, don't call it again but use a RAISE FORM_TRIGGER_FAILURE (not sure about it's exact name) and the processing will stop.

MHE
Re: Go Block on forms [message #147614 is a reply to message #147531] Fri, 18 November 2005 09:38 Go to previous messageGo to next message
Sharaf
Messages: 62
Registered: September 2005
Location: U.K
Member
Yes I tried raising the form trigger error, fine the page did not reload and I want a pop up to come up and say user name or password incorrect, but it is just showing at the bottom of the form.

and when it does that, it does not clear the password and username, but after logging fails can i still remain on that page and then clear the username and password fields.

cheers
Re: Go Block on forms [message #149776 is a reply to message #147614] Sun, 04 December 2005 22:59 Go to previous message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Do it in two parts. Get the user logged in and THEN worry about which form to call. Don't mix the two together.

Search this forum for 'login'. This problem has been solved previously. Also search for 'logon_screen' and 'Get_Connect_Info'.

David
Previous Topic: can i make the table in the database that i open my application i insert the record it
Next Topic: extra columns added to table, not able to insert in form
Goto Forum:
  


Current Time: Fri Sep 20 03:35:27 CDT 2024