Plsql code for button.....
i have a page which contain fields term_id,*term_desc*,*term_condition*
and some buttons Add,*delete* and save..
Actually no data in the table..
when i press Add button the term_id should get increment by '1' .
where i have to wite the below coding in Edit Add button?
can i put the coding in Conditional Item Display condition type PLSQL?
declare
a number;
begin
select max(nvl(term_id,0))+1 into a from term_creation;
*:P5_TERM_ID*:=a;
end;
Edited by: skud on Mar 5, 2011 2:05 AM
You can submit the page with a request say "MY_REQUEST" and run a conditional PLSQL block(request equal to MY_REQUEST) and add the PLSQL code there.
If you want to do it without submitting page
<li>Apex Version 4 : Add an id to button (button attributes, id ="MY_BUTTON" ) and add a Dynamic Action fired on click of DOM element : MY_BUTTON , event type would be PLSQL and write your PLSQL code there(add required page items to be submitted in the field)
<li>Apex 3.x and 2.x(works iwth apex 4 too), create an ondemand PLSQL process, call the process from a javascript function(add the item values to session using the ajax request handle) and call the javascript function from the button click( action type: redircet to URL , javascript:function_name(parameter1,parameter2) )
Similar Messages
-
How to find function code for buttons on toolbar in oops alv
Hi experts,
I want to remove some buttons from toolbar in oops alv, i know the procedure like get function code and pass the value in a table and pass that table to IT_TOOLBAR_EXCLUDING of
method set_table_for_first_display but I WANT TO KNOW HOW TO FIND FUNCTION CODE FOR BUTTONS ON TOOLBAR IN OOPS ALVHi Prakash,
-->First you have to set the pf status in your alv program by,
{FORM pf_status USING rt_extab TYPE slis_t_extab.
SET PF-STATUS 'FIRST'.
ENDFORM. "PF_STATUS}
-->Pass this Subroutine name in the Function module, Reuse_alv_grid_display's parameters i.e,
i_callback_pf_status_set = 'PF_STATUS'}
*-->Then doble click on that pf status,
From the menu bar, select Extras->Adjust Template->List Viewer,
This will give you the existing statndard gui status of the program*
->Then catch that function codes in the User command Parameter of the Function module Reuse.. i.e,
i_callback_user_command = 'COMM'
And make a subroutine of the name 'COMM'i.e,
FORM comm USING ucomm LIKE sy-ucomm selfield TYPE slis_selfield.
DATA: okcode TYPE sy-ucomm.
okcode = ucomm.
CASE okcode.
WHEN 'REF'.
CALL FUNCTION 'POPUP_TO_INFORM'
EXPORTING
titel = 'MANSI'
txt1 = 'CREATED BY'
txt2 = SY-UNAME
TXT3 = ' '
TXT4 = ' '
endcase.
Hope it helps you
Regrds
Mansi -
How to create plsql code for a snowflake cube
hi everybody!
do anyone know how to create plsql code for a snowflake tiype dimension to create
a cube?how to map the atributes, or if there are any exceptional atributes which I can use like in a temporal dimension?
thank you
waiting for any answerThe DBMS_AWM package provides stored procedures for creating an analytic workspace cube from a star schema. Is it posible to create a cube from a snoflake schema?
-
How to explicitely write PLSQL code for "Help - Display Error"? [SOLVED]
I'm using menu DEFAULT&SMARTBAR and I'd like to write command in PLSQL code for "Help - Display Error" to display error. Has anyone any idea how to do this? I can not find syntaks in form help for this.
Message was edited by:
marussigDisplay_Error;
-
Code for button located inside the MC
I decided to rearange my flash site and now things don't work.
I used to have an image collage where all the images were buttons and each image was located on the stage ( which made a stage with 10+ loose images)
I made each image a button. Below is a code example for one of the images named "icysophistication_app_btn". The previously working code for it was:
icysophistication_app_btn.addEventListener(MouseEvent.CLICK, onClick_IcySophisticationPopUp);
function onClick_IcySophisticationPopUp(event:MouseEvent) :void {
gotoAndPlay("icysophistication");
Then I decided to unite all the images into one mc called "imgscollage_buttons_mc" (because later on I want to build another collage and have them sliding on the screen with tweener engine)
imgscollage_buttons_mc.icysophistication_app_btn.addEventListener(MouseEvent.CLICK, onClick_IcySophisticationPopUp);
function onClick_IcySophisticationPopUp(event:MouseEvent) :void {
gotoAndPlay("icysophistication");
I am guessing I have to put something before - gotoAndPlay("icysophistication");
but can't figure out what.
Please suggestyour original code was on the main timeline and it was the main timeline that contained the frame labeled "icysophistication"?
your new code is still on the main timeline and the main timeline still has that frame label? -
Help with writing code for button
Hi!
Can someone help me with the code for a button that sends my menu back to 0?
This is the code current code, and I've created a button called sistapilen that I want to insert where the regular button "arrow" is not visible. I want sistapilen to navigate me back to 0. (Or if I can get "arrow" to do it and delete "sistapilen").
/Jen
// File downloaded from www.riacodes.com
import com.greensock.*;
var arrayX :Array = [0,-800,-1600,-2400,-3200,-4000,-4800];
var currentIndex:Number=6;
left_mc.addEventListener(MouseEvent.CLICK,navigate);
right_mc.addEventListener(MouseEvent.CLICK,navigate);
left_mc.buttonMode = true;
right_mc.buttonMode = true;
checkArrows();
function navigate(e:MouseEvent):void{
if(e.currentTarget == left_mc) currentIndex --;
else currentIndex ++;
checkArrows();
TweenLite.to(content_mc,.5 ,{x:arrayX[currentIndex]});
function checkArrows():void{
if(currentIndex == 0) left_mc.visible=false;
else if (currentIndex == arrayX.length - 1) right_mc.visible = false;
else{
left_mc.visible = true;
right_mc.visible= true;Add a listemer for whichever other button you plan to use...
sistapilen.addEventListener(MouseEvent.CLICK,navigate);
And try changing your navigate function as follows...
function navigate(e:MouseEvent):void{
if(e.currentTarget == left_mc) {
currentIndex--;
} else if(e.currentTarget == right_mc){
currentIndex ++;
} else {
currentIndex = 0;
checkArrows();
TweenLite.to(content_mc,.5 ,{x:arrayX[currentIndex]}); -
Suggest plsql code for form security during runtime
Hi
I made a project using forms 6I . I created 4 forms in all. I created a Menu item too like create,insert, delete,modify records, reports print etc. Now What I want is if user want to enter a particular form he should select appropriate menu item from the menu But what I my exact need is if user attempt to enter a form a small popup dialogue box should be displayed in the middle of the screen and asks for a password . So I want a pl&sql function or procedure which creates a default password and match the same when the user enterered the same in popup dialogue box and allow or reject the user request. Please suggest me a full DETAILED PL/SQL CODE FOR THIS PURPOSE. OR ANY FORM 6I FEATURE.
thanks in advance
prasanth as.The dialog box is part of the ftandard Forms functionality. What you need to do is set up the user account with the password set to EXPIRED and no grace logins. The Admin Guide tells you how to do this.
Cheers, APC -
Generated Code for Button Bar - Not Working
Hi all,
I'm working with LightSwitch 2013 (Visual Studio 2013 Update 4), and I noticed that when I view my HTML5 client in Internet Explorer 11 and switch between tabs (in the HTML5 client), the buttons become barely visible (like they were disabled, but they're
still enabled). Is there a quick fix for this, like regenerating the javascript that was generated to do this?
Thanks,
Gareth
Edit: Here's a picture of what I mean. The button looks disabled, but is actually enabled. Any buttons that are disabled just show up as even less visible. Also, if I switch between tabs enough times, it'll fix the issue and look enabled again. Any advice
would be greatly appreciated. Thanks!Have you added the button to the command bar for each tab or only the first tab?
If you want 'Add OS' available in more than one tab then you need to add buttons to all relevant tabs, but wire up to the same command and event handler in code behind.
Dave
Dave Baker | AIDE for LightSwitch | Xpert360 blog | twitter : @xpert360 | Xpert360 website | Opinions are my own. For better forums, remember to mark posts as helpful/answer. -
Code for button is affecting the entire movie
The following code is on the timeline and the button
instance, cancelMC, is also on the same timeline in a different
layer and appears 4 times throughout the timeline. I've asked this
question (worded differently) at kirupa and the post has gone
ignored for some reason - maybe the title is too long or something.
The code tells the button, onRelease, to "gotoAndStop(1)" however,
if you click anywhere on the interface it does that. This is what
would have happened if I had put on the timeline
"this.gotoAndStop(1)." But I did not type that as you can see:
with(cancelMC){
onRollOver = function(){
this.ExplainMC.gotoAndStop("cancel");
onRollOut = function(){
this.ExplainMC.gotoAndStop("void");
onRelease = onReleaseOutside = function(){
_root.searchPanelMC.mainMenuMC.gotoAndStop(1);
this.gotoAndStop("user");
Notice it says "this.cancelMC"? That is the button. Someone
please help with this - I am at a loss and have tried everything to
make it work.your original code was on the main timeline and it was the main timeline that contained the frame labeled "icysophistication"?
your new code is still on the main timeline and the main timeline still has that frame label? -
Hello Folks ,
Iv'e Created a new screen using BDT technology and added a button inside screen .
how can i handle the function code within this screen in a way that i won't have system messeage "Unknown function code XXX" while clicking on this button.
tanks in advance.
Herzel .Hi,
You need to implement for your button a function module for the BDT event FCODE. You can have a look at the fms *_BUPA_EVENT_FCODE, to get an idea on how to implement it.
Thanks and warm regards,
Smita. -
PLSQL Code for Substracting / Reducing Quantity
Hi All
I have two tables Cash and Product. Cash table has cash related sales in it. Product has product information in it.
End user selects the products and specifying their quantity in cash form then saves it. The quantity must be reduced or deducted form product table before the next cash sale is booked in cash so it will reflect the actual stock or quantity of product.
My question is how to know the end user has selected which product and it's quantity?
What would be the code?
Best Regards
Thunder2777Hi,
If you don't already have one, add a quantity_in_stock column to the product table, with a check constraint that guarantees this column is greater than or equal to 0.
Add a trigger to the cash table, to change product.quantity_in_stock when any change is made to the cash table, somehting like this untested example:
CREATE OR REPLACE TRIGGER cash_bdiu
BEFORE DELETE OR INSERT OR UPDATE
ON cash
FOR EACH ROW
DECLARE
net_amt NUMBER := NVL (:NEW.quantity;, 0);
BEGIN
IF :OLD.quantity != 0
THEN -- Add back old quantity
IF :OLD.product != :NEW.product
THEN -- undo previous transaction
UPDATE procuct
SET quantity_in_stock := quantity_in_stock + :OLD.quantity
WHERE product_id = :OLD.product_id;
ELSE -- combine with normal update below
net_amt := net_amt - :OLD.quantity;
END IF;
END IF;
IF net_amt != 0
THEN
UPDATE product
SET quantity_in_stock := quantity_in_stock - net_quantity
WHERE product_id = :NEW.product_id;
END IF;
END;Most of the complexity is due to handling situation like:
(a) a row is deleted
(b) a row is updated with a different quantity
(c) a row is updated with a different product_id (and perhaps a different quantity)
We want to avoid doing two UPDATES on the same row of product in the same call to this trigger. That's why I used the local variable net_amount. -
Im making a game where you have to push certain buttons in
the correct order so it moves you to the next stage...
I have everything ready to go, graphics, buttons, etc....and
I know how to add sound to everything...but I dont know what code I
would enter so that when I play buttons A, C, D it moves to a new
page.
Can anyone direct me in the right direction?hmm...Im not quite sure what you mean...do you have an
example? Lets say I dont have any function applied to my button
right now.
I can press the button, but nothing currently happens. How
would I store the correct sequence in an array? Im a little new at
this. I would greatly appreciate the help. Even if you could point
out a tutorial that would help me with this.
my buttons are:
btnA
btnB
btnC
btnD
btnA.onRelease=function(); should I start with that? not sure
what the function would be though -
Action three code for button re-appearing
I am creating a video and I need a play button to appear anytime someone hits the pause or stop button on the skin. Is this possible and if so does anyone have a sample code I could use. I am a super novice. I would also be ok with the entire preview movie clip appearing... as long as I can click it to play. Thanks!
if you're using an flvplayback component with instance name flv, use:
import fl.video.VideoEvent;
flv.addEventListener(VideoEvent.STATE_CHANGE, changeF);
function changeF(e:VideoEvent){
if(e.state=="paused"||e.state=="stopped"){
playBtn.visible=true; -
Executing javascript code for button click
in my application i have report page where i am displaying table data when i click a button it selects first row and returns it using htp.prn() now i m getting that record in jvascript now i want to execute this java script code when the button is clicked i tried using onClick attribute but it didn't work can anyone tell me how to do it?
Hi,
I think this is related to Application express, right ?
You could post your question in Application Express forum
Oracle Application Express (APEX)
Also please give more detail about your issue. Post e.g. code (pl/sql & javascript) you try to use.
Also if you setup sample about your problem to http://apex.oracle.com will help others to help you.
Help us to help you =)
Br, Jari -
How to register a custom plsql code
Hi
i have wrritten a custom plsql code for my Overtime entries validation for payroll processing.
Can any body tell me how to register it in application.
Secondly i want to get the output file generated by report submission on my desktop.i want to know where the report output files for HR and payroll are stored so that i can get them through FTP.
Regardsif you want to integrate your plsql into a fast formula, please download the fast formula guide from metalink. Or ask your functional payroll consultant.
All reports and processes in Oracle Apps are handled via concurrent programs and requests. When a concurrent request is finished, click on the output button, and depending from the filetype, your browser will take action.
All concurrent output is also stored on the concurrent server. Ask your apps dba where she mapped the concurrent output directory. But i do not see why you should need this.
Maybe you are looking for
-
Urgent regarding Display fields in ALV End of Page
Hi, I am displaying the output using ALV List Display. Output of the report is displayed in different pages based on a particular delivery address. I have to display some of the fields (Delivery address) of the final internal table in the end of page
-
Hello! Ive plugged my Ipod into my laptop with Itunes open and it normally syncs automatically, when i came to do it today it wont sync and when i try to do it from the file menu the sync option is greyed out. Itunes wont even show my Ipod on the lef
-
Why do I get question marks on iphoto instead of the photos?
Why do I get question marks on iphoto instead of the photos?
-
I need to treat some of the variables as constants as they depend on environment. In Java I used to handle these constants by putting them in property files, reading them in when application starts and put them in cache. How can I handle these type o
-
Setting the defualt view at Runtime
Hi I am having a scenario in which i have two views Say 'Approve' and 'Reject'. During execution i will send a parameter through URL. Based on the Parameter suppose if the parameter value is 'approve' then Approve View should be showned and if the ur