Solved

using inputbox in the form

Posted on 2014-03-03
17
869 Views
Last Modified: 2014-03-14
i have a tabular form ,
in post_text_item  will check a value if it is exist in the table
otherwise it will insert a record , but it require to receive one value from a user
here is my code

declare
	alert_button number;

begin
		if :V_STAT_D.RESRV is not null then
		if Empl_Exists(:v_emp.emp_no,:V_STAT_D.RESRV) = 0 then  (if record not exist)
alert_button:=show_alert('A_CONF');
if alert_button=alert_button1 then  -- alert asking user to confirm add new record
	-- here we need the form to receive one value from the user
	then insert into 

Open in new window


is there any way as ms access to send inputbox , the user type in , then use this value to insert into record ?
0
Comment
Question by:NiceMan331
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 9
  • 8
17 Comments
 
LVL 20

Expert Comment

by:flow01
ID: 39907156
The alerts of ORACLE forms don't have a input field.
You might consider building another form with a small canvass,  some push-buttons and a text item and mimick the behaviour of the msaccess inputbox.
Create a procedure (for example in a library that may be used also in other forms)  that calls the form and return the pressed button and and the value.
I suggest to user :global.variables to enable the communication between inputbox-form  and procedure.
0
 

Author Comment

by:NiceMan331
ID: 39907392
wellcome back my teacher , i missed u
long time i not hear any replay from u

I suggest to user :global.variables

could u guide me on how to use this global variable

Create a procedure (for example in a library that may be used also in other forms)
which library ? in this form ?
0
 
LVL 20

Accepted Solution

by:
flow01 earned 500 total points
ID: 39908166
For example
FORM F_INPUTBOX
when button pressed trigger on button1
    :global.inputbox_button := 'BUTTON1';
when button pressed trigger on button2
    :global.inputbox_button := 'BUTTON2';
    :global.inputbox_text  :=  :text_item;

in the form that uses it
PROCEDURE SHOW_INPUTBOX(p_button OUT VARCHAR2, p_text OUT VARCHAR2)
IS
BEGIN
   -- initialise the globals
   COPY(NULL,'GLOBAL.INPUTBOX_BUTTON');
   COPY(NULL,'GLOBAL.INPUTBOX_TEXT');
   CALL_FORM('F_INPUTBOX');
   -- use the globals
   p_button := NAME_IN('GLOBAL.INPUTBOX_BUTTON');
   p_text     := NAME_IN('GLOBAL.INPUTBOX_TEXT');
   -- remove the globals
   ERASE('GLOBAL.INPUTBOX_BUTTON');
   ERASE('GLOBAL.INPUTBOX_TEXT');
END;

you can put the procedure in the form you want to use it in, but you can also create a library (using the 'new' option you can use a form , a menu and a library) and put the procedure in it.

You can attach that library a form and that makes the procedure available to the form.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:NiceMan331
ID: 39911071
ok great ,
i did it  but for my bad luck , the fmx of inputbox box fail to open ,
inspit of the fmb opened
i just added one button and one text item , then the  code of global
:global.inputbox_text  :=  :text_item;
is it necessary to add also the button variables
when button pressed trigger on button1
    :global.inputbox_button := 'BUTTON1';
when button pressed trigger on button2
    :global.inputbox_button := 'BUTTON2';

second :
then i adjust the procedure like this

PROCEDURE SHOW_INPUTBOX( p_text OUT VARCHAR2)
IS
BEGIN
   -- initialise the globals
 
   COPY(NULL,'GLOBAL.INPUTBOX_TEXT');
   CALL_FORM('F_INPUTBOX');
   -- use the globals
 
   p_text     := NAME_IN('GLOBAL.INPUTBOX_TEXT');
   -- remove the globals
 
   ERASE('GLOBAL.INPUTBOX_TEXT');
END;

is it ok ? because i need only the value of the text , i dont have any other text
or i should add the missed codes of button ?

third
regarding calling the global , is it true like this :

declare

  m_name varchar2(70);
begin


SHOW_INPUTBOX(m_name);

       insert into person_cons(person_name)
values(m_name);
             
commit;


END;
0
 
LVL 20

Expert Comment

by:flow01
ID: 39911143
If you don't need the  button information,but  just the text  i think you are making the good modifications.
But I don't understand your problem :
the fmx of inputbox box fail to open , inspit of the fmb opened
Do you mean it works if you use the run-option in the form builder but not if  you call the form from another another form ?
0
 

Author Comment

by:NiceMan331
ID: 39912139
Yes , it run via form builder , but not run when calling it from another form , also I try to run it from form run time but not run also
0
 
LVL 20

Expert Comment

by:flow01
ID: 39913626
You are able to run other forms at runtime ?
0
 

Author Comment

by:NiceMan331
ID: 39914251
yes , i run many forms at runtime without any problem
0
 

Author Comment

by:NiceMan331
ID: 39914264
sorry
today i run it without any modification , it run
the code working very well now thanx
still one thing
when i call the inputbox form , how i can avoid showing the runtime standard form of oracle
0
 
LVL 20

Expert Comment

by:flow01
ID: 39914876
What do you mean by "runtime standard form" ?
If you mean that the form from where you call the imput-box is hidden if the inputbox-form is shown, then adjust the size of the window (and canvas) till it gets a real box the size you want.
0
 

Author Comment

by:NiceMan331
ID: 39914907
I already adjusted the canvas & window size to fit with my requirement , but still when calling the input box form , there is full size of oracle runtime form
0
 
LVL 20

Expert Comment

by:flow01
ID: 39914923
I will check settings for a simular form-type at work on monday.
If you want to experiment check  window-style (> dialog) and modal (>yes) of the windows properties.
Is that window also the window mentioned in the form-properties ?
0
 

Author Comment

by:NiceMan331
ID: 39914925
snapshot for the form
plz look the shoot , sorry for the teamviwer shot inside
Screenshot-2014-03-08-21.31.00.png
0
 
LVL 20

Expert Comment

by:flow01
ID: 39915182
What version of oracle forms you are using ?
If you use the inputbox calling it from another form is it a problem ?
0
 

Author Comment

by:NiceMan331
ID: 39915426
i'm using oracle forms 6i
actually this problem not exculsive to the inbut box form
the screen of the oracle form appearing with all my forms
0
 
LVL 20

Expert Comment

by:flow01
ID: 39919084
Forms 6i runtime:  I think I can't help you.  
In later versions you can define the size of the applet within the forms*.cfg configuration file, but even then we did use it with internet explorer so that  applet is shown in the standard browser window,
0
 

Author Comment

by:NiceMan331
ID: 39919706
ok
any how , you already answered my question , it is well now
shall i open new question for that subject ?
thanx
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Oracle dataguard 5 59
Huge BLOB data type in Oracle how to retrieve in vb.net and crystal reports 6 46
oracle sqlplus query delimiter 8 37
oracle query 3 26
Working with Network Access Control Lists in Oracle 11g (part 2) Part 1: http://www.e-e.com/A_8429.html Previously, I introduced the basics of network ACL's including how to create, delete and modify entries to allow and deny access.  For many…
Background In several of the companies I have worked for, I noticed that corporate reporting is off loaded from the production database and done mainly on a clone database which needs to be kept up to date daily by various means, be it a logical…
This video shows setup options and the basic steps and syntax for duplicating (cloning) a database from one instance to another. Examples are given for duplicating to the same machine and to different machines
Via a live example, show how to take different types of Oracle backups using RMAN.

756 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question