How to create a sequence for a particular item in my form of apex

Hi friends,

I created a database application, a form that contains a report, and it works very well...

But in my form, I have a requirement... Here it is the existing fields in my form

issue no
created by
start date
status
priority
due date

Among these fields in my form, I need to create a 'sequence' for my 'number' field
So that whenever I opened the form 'number' should automatically generate as 1 for the first time, 2 for the second time and so on...

To do this, I created a sequence

CREATE SEQUENCES "ORDERS_SEQ."
MINVALUE 1
MAXVALUE 999999999999999999999999999
INCREMENT BY 1
START WITH 1000
NOCACHE
NOCYCLE;

But for validation where I need to write the query in the sequence for this particular item "issue no"..., I have no idea where to write the validation for the sequence query...


Please tell where I need to write wisely step... Please help me friends...

As my sequence validated here it is ask for item 'number '.

"select seq.issue_id.nextval in issue_no.

It comes to my posting above query if the query I mentioned is just... If not, let me know the validation query...


And also I need where to apply this step verification query...

Thanks in advance

Kind regards
Harry...

Harry,

Rik is on the right track. Here is a sample insert trigger: would need to replace you sequence ORDERS_SEQ with my las_log_seqsequence, how do you define or use timestamps is to you.

DROP TRIGGER LASDEV.BINS1_LAS_LOG_TBL;

CREATE OR REPLACE TRIGGER LASDEV."BINS1_LAS_LOG_TBL"
   BEFORE INSERT
   ON las_log_tbl
   FOR EACH ROW
BEGIN
   --
   -- Description: Insert log_seq, creation_dt, creation_id,
   --              lst_updt_dt and lst_updt_id.
   --
   -- Maintenance:
   --
   -- Date        Actor          Action
   -- ====        =====          ======
   -- 07-Sep-2010 J. Wells       Create.
   --
   :new.creation_id := nvl( v( 'app_user' ), user );
   :new.creation_dt := SYSDATE;
   :new.lst_updt_dt := :new.creation_dt;
   :new.lst_updt_id := :new.creation_id;

    SELECT las_log_seq.NEXTVAL
      INTO :new.las_log_seq
      FROM DUAL;
END bins1_las_log_tbl;
/

Heff

Tags: Database

Similar Questions

  • I have more than one partition on my hard drive, how to create a shortcut to a particular drive from the desktop?

    I fitted with a 1 TB drive to my macbook, then partitioned several times, all good so far, everything works.

    I use two connections, staff and work. My 'work' connection I have one partitioned drive named "work" which I use as an archive / storage for all work related data, far from any current activity. How to create a shortcut for just this partition to 'work' on the desktop?

    I tried Finder > Preferences > general - show these items on the desktop, hard drives of ticks. But it shows then all partitioned drives.

    The partitions must be included in the side bar of the Finder to choose. You can also click with the right button on a volume and select 'add to dock '. I don't know how to add an alias on the desktop.

  • How to create an ERD for the vista sp2 x 64?

    How to create an ERD for the vista sp2 x 64?

    How to create an ERD for the vista sp2 x 64?

    If you do not have a Microsoft Vista DVD, make a repair disc to do a Startup Repair:

    Download the ISO on the link provided and make a record of repair time it starts.

    Go to your Bios/Setup, or the Boot Menu at startup and change the Boot order to make the DVD/CD drive 1st in the boot order, then reboot with the disk in the drive.

    At the startup/power on you should see at the bottom of the screen either F2 or DELETE, go to Setup/Bios or F12 for the Boot Menu.

    When you have changed that, insert the Bootable disk you did in the drive and reboot.

    http://www.bleepingcomputer.com/tutorials/tutorial148.html

    Link above shows what the process looks like and a manual, it load the repair options.

    NeoSmart containing the content of the Windows Vista DVD 'Recovery Centre', as we refer to him. It cannot be used to install or reinstall Windows Vista, and is just a Windows PE interface to recovering your PC. Technically, we could re-create this installation with downloadable media media freely from Microsoft (namely the Microsoft WAIK, several gigabyte download); but it is pretty darn decent of Microsoft to present Windows users who might not be able to create such a thing on their own.

    Read all the info on the website on how to create and use:

    http://NeoSmart.net/blog/2008/Windows-Vista-recovery-disc-download/

    ISO Burner: http://www.snapfiles.com/get/active-isoburner.html

    It's a very good Vista startup repair disk.

    You can do a system restart tool, system, etc it restore.

    It is NOT a disc of resettlement.

    Make sure you get the 64 bit version.

    See you soon. Mick Murphy - Microsoft partner

  • How to create a password for the user account for my child?

    How to create a password for the user account for my child?

    You can create the user with the parental control account. This will act as a protection for the child's account.

    You can take a look at the following links on setting up parental controls:

    http://Windows.Microsoft.com/en-us/Windows/set-up-family-safety#set-up-family-safety=Windows-7

    http://Windows.Microsoft.com/en-us/Windows/set-parental-controls#1TC=Windows-7

    http://www.howtogeek.com/HOWTO/10524/how-to-use-parental-controls-in-Windows-7/

  • How to create the ADC for first name

    Hello

    I have the situation here, I need display the default in the e-mail (Dear) when the value in the first name field is less than 2 characters long or it is empty. Otherwise, I need to insert the value of the field name (Dear John).

    Please let me know how to create an ADC for this.

    Thank you

    Rama

    Use wildcards for searching.

    ? = any 1 character

    * = 0 or any number of characters

    In order to find people with more than 2 characters in this area?: *

    Then, build your default rule to merge the content in case they encounter more rule of character 2.

  • How to create a shortcut for all users during installation

    Hi people,

    We have a desktop application that is distributed with Java Webstart and works on Win7 machines. Initially, users all connected using a connection by default, so creating shortcuts was not a problem. Now, because of new networking strategies, each user has his own connection.

    The problem is that the shortcut to the application is created in the user profile (for example "C:\Users\JohnDoe\", so that other users in the same machine can not run the application unless he or she installs the application again.)

    Is there a way to create this shortcut for all users using JNLP API or configuration in the xml file?

    If anyone has need of the solution: during installation I save the jnlp file in a directory accessible to all the world and then start the application using "javaws path\to\file.jnlp". More details in How to create a shortcut for java webstart available for all users on Windows 7?-stack overflow

  • How to create a password for the pdf file

    The Adore Acrobat XI, how to create a password for the file? Aid says going to the Tools Menu and clicking on the Protection tab - but there is no option. In the security file - properties - screen, it shows the security details but doesn't allow for no change.

    I think you can be mixing two different products: (free) Adobe Reader and Acrobat ($$).

  • How to create a card for After Effects?

    How to create a card for After Effects?

    After effects Developer Center

  • How to create the presentation for the columns variable and use it in the story?

    Hi all

    Someone knows how to create variable presentation for a column (that is, I need to create it in edit section formula itself). And then, I should use it in the Narrative section to display the value of this column. Is this possible? Or do I need to use any other variable for this requirement? If Yes please let me know, how to create it? This is a very urgent requirement.

    Thanks in advance
    Stephanie

    Hello
    You can have any number of columns in the narrative view, he will accept... Just mention the numbers of the columns in the view body narrative...

    check if useful/correct...

    Thank you
    prassu

  • How to create unique variables for... in loop? (AS2)

    Hello

    I have a function onEnterFrame controlling all the movie clips in a table. The movement of each of these clips is controlled by a few variables - speed, acceleration, etc - that are changed on every enterFrame. I can't understand how to create unique variables for each element of the array. Now my variables are the same for all elements, and therefore the proposals of each video clip are the same.

    I used this code to add my video clips in the table:

    for (i = 0; i < starNumber; i ++) {}
    duplicateMovieClip (star, "star" + I, i);
    starArray.push (this ["star" + String (i)]);
    }

    I do a similar thing to create unique variables for each? Or is there something I need to do my loop (myClip in myArray) which is contained in my onEnterFrame function?

    I can post my code if that would help (65 lines).

    Creating unique variables is easy way out. Here's the modified code using unique variables that should solve your problem:

    var i: Number;

    var starArray:Array = [];

    var starArray_X:Array = [];

    var starArray_Y:Array = [];

    var mc:String;

    var scale: number;

    var speedXMod:Number;

    var speedYMod:Number;

    var starNumber:Number = 10;

    var minSize:Number = 15;

    var maxSize:Number = 80;

    var speed: number = 0.2;

    var minSpeed:Number = 0;

    var maxSpeed:Number = 1;

    for (i = 0; i< starnumber;="">

    duplicateMovieClip (star, "star" + I, i);

    starArray.push (this ["star" + String (i)]);

    }

    (MC starArray) {}

    starArray [mc] ._x = (Math.Random () * Stage.width);

    starArray [mc] ._y = (Math.Random () * Stage.height);

    scale = (minSize + (Math.Random () * (maxSize - minSize)));

    ._xscale starArray [mc] = scale;

    starArray [mc] ._yscale = scale;

    var startSpeedX:Number = ((Math.pow (-1, (Math.round (Math.random ())) * (minSpeed + (Math.Random () * (maxSpeed - minSpeed)));)))

    var startSpeedY:Number = ((Math.pow (-1, (Math.round (Math.random ())) * (minSpeed + (Math.Random () * (maxSpeed - minSpeed)));)))

    [mc] starArray_X = startSpeedX;

    [mc] starArray_Y = startSpeedY;

    onEnterFrame = function() {}

    (MC starArray) {}

    speedXMod = ((Math.random () * acceleration)-(0,5 * accélération));

    speedYMod = ((Math.random () * acceleration)-(0,5 * accélération));

    If (((Math.abs (starArray_X [mc] + speedXMod)) < maxspeed)="" &&="" ((math.abs(stararray_x[mc]="" +="" speedxmod))=""> minSpeed)) {}

    [mc] starArray_X += speedXMod;

    } else {}

    [mc] starArray_X = speedXMod;

    }

    If (((Math.abs (starArray_Y [mc] + speedYMod)) < maxspeed)="" &&="" ((math.abs(stararray_y[mc]+="" speedymod))=""> minSpeed)) {}

    [mc] starArray_Y += speedYMod;

    } else {}

    [mc] starArray_Y = speedYMod;

    }

    If (((starArray [mc]._x + starArray_X[mc]) > 0) & ((starArray [mc]._x + starArray_X[mc])))<>

    starArray [mc] ._x += starArray_X [mc];

    } else {}

    starArray_X [mc] * = - 1;

    starArray [mc] ._x += starArray_X [mc];

    }

    If (((starArray [mc]._y + starArray_Y[mc]) > 0) & ((starArray [mc]._y + starArray_Y[mc])))<>

    starArray [mc] ._y += starArray_Y [mc];

    } else {}

    starArray_Y [mc] * = - 1;

    starArray [mc] ._y += starArray_Y [mc];

    }

    }

    }

    }

  • How to create a jar for icons

    Hi all


    How to create a jar for icons? Please help me thanks in advance.


    Sarah

    Hi Sarah!

    To do this, you use at best the jdk (java development kit) which is already
    installed on your pc in forms is installed.

    Copy all your gif icons in a folder
    Open the command prompt and in this folder.

    If we assume that you have installed forms in the default directory, call the jar.exe like this:

     x:\DevSuiteHome_1\jdk\bin\jar -cfv your_icons.jar *.gif
    

    This will create a jar file in the same directory.
    Copy the jar file into your x:\DevSuiteHome_1\forms\java folder.

    Then open your formsweb.cfg x:\DevSuiteHome_1\forms\server and change your configuration entry under the

    archive_jini=frmall_jinit.jar
    

    TO

    archive_jini=frmall_jinit.jar, your_icons.jar
    

    Please check if in your formsweb.cfg so the imagebase is set to the code base.
    If this isn't the case, create a parameter in your config entry:

    imagebase=codebase
    

    Now the jar file is loaded when you start your application and the icons are
    turns red from the jar file.

    Concerning

  • How would you disble modifiable for a particular row in a dataGrid?

    How would you disble modifiable for a particular row in a dataGrid? Looks really hard to do.

    Point to make function made the trick:




    Editable = "{outerDocument.rendererEditable (data .month)} '"
    paddingTop = paddingBottom '0' = '0' / >

    public void rendererEditable(s:String):Boolean {}

    If (s == 'Total') {}
    Returns false;
    }
    Returns true;

    }

  • How to create a login for PHP users

    How to create a login for users to access their data, currently, I don't see the first user each time I connect with a different user name. I know that I need session stuff but don't know how to use, add or where to put them.
    Thanks in advance.

    Hello

    Find this in your login page:

    session_register ("MM_Username");

    and then you add a session variable in MX called it:

    MM_Username

    then on any of your pages that calls the base to make sure that you use the = MM_Username and then you're all set; Make sure that the tables have a field to reference the session MM_Username variable.

    See you soon
    Let me know if you just come!

  • How to create a 'category' for the brushes?

    I've collected a ton of different types of paint brushes. To keep all in my active brush Panel seems to slow down Photoshop and my computer, and it is difficult to sort all the when you are looking for a particular brush.

    Is there a way I can create a category for certain types of brushes, as the default categories that appear at the bottom of the context menu brush Panel (calligraphic, false finish brushes...)? An example would be a category for all my brushes of foliage (leaves, grass, Moss, trees, etc.).

    Or is there a better way to keep similar brushes orgainized together and accessible in the PS brush Panel? Thank you

    Hi rich,

    Yes, you can get your brushes to show up in the menu of the Panel under all the built-in brushes. But it is a few steps, follow me.

    Start by creating your predefined. Looks like you already know how to do this, but I'll repeat the steps for someone else.

    Click the create predefined in the Panel forms.

    The name of the brush.

    Create as many other preset that you like.

    When you have all your brushes. Choose the Preset Manager in the brushes Panel menu.

    This opens the preset manager.

    Shift + click or Cmd/Ctrl-click to select the brushes you want to have in their own game. Then click on the button Save the value. This opens the dialog box save the value.

    This should open in the brushes folder that is located in the Presets for Photoshop. Don't go anywhere else. This is where you want to be.

    Name your game (such as foliage), and then click Save.

    You can now delete these brushes from the preset manager.

    Restart Photoshop.

    Your brushes custom if poster at the bottom of the Panel forms Preset.

    At any time, you can choose the brushes. An alert will ask you if you want to replace (throw all your other brushes and insert those custom) or append (add brushes to those you already have). I usually add.

    Let us know if that helps.

  • How to create a sequence in oracle forms6i

    Oracle forms 6i


    Hai All

    I work in a leave request entry, so I need to create a sequence to give a unique number for each entry

    Pls tell me the steps how to create and how to call the sequence of database


    Thanks in advance

    Srikkanth.m

    Hello
    Sequence, you can create in the database and you can use this sequence generation sequence number forms
    Creation, see link below...
    http://www.techonthenet.com/Oracle/sequences.php
    http://psoug.org/reference/sequences.html

    To generate numbers forms use like that...

    For each entry at the time of save you can use on PRE-INSERT of block level
    SELECT SEQUENCE_NAME.NEXTVAL
    INTO :FORM_FIELD_NAME
    FROM DUAL;
    

    -Clément

Maybe you are looking for