Form completion progress bar

How do I make a progress bar to show the amount of populated fields in a form?
I remember an example posted here on the forum, but can no longer find it.
It was a sliding "progress bar" that increased as you populated fields in the form.
As the form fields were filled in, the progress bar moved up the scale.
When all fields were populated the progress bar was "full".
Thanks for any help!

The 'jumping back' would be due to reinitializing the thermometer every time calculate is triggered. There's no need to call begin() or set the duration more than once per thermometer session.
About the 'odd jumping' problem; after some testing I'm bound to doubt the possibility of invoking a thermometer with a value other than 0. Your thermometer is invoked with value=1, although the progress bar stays put at 0.
A solution would be to invoke the thermometer before filling out the first field (whereas value really is 0). However Acrobat doesn't seem to keen on jump-starting thermometers on startup (whether it's initialize, form:ready or docReady). I've also tried app.setTimeOut() with no luck. Although enter- and exit-events do the trick, I'm convinced there are better solutions...

Similar Messages

  • Form Button running Script that does not complete Progress Bar

    Hello,
    Currently I have created a form using the System.Reflection.Assembly which includes a textbox and button.   The button calls a script with a progress bar using the write-progress method, but when the progress bar completes it does not go away.
    Any assistance is appreciated.   As the code is quite long and in several files I have posted some of the code below.
    [void] [System.Reflection.Assembly]::LoadWithPartialName("System.Drawing")
    [void] [System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms")
    $getVMware = Join-Path -path $ScriptPath -ChildPath "bin\get-vmhosts.ps1"
    Add-PSSnapin VMware.VIMAutomation.Core -ErrorAction SilentlyContinue
    $objForm = New-Object System.Windows.Forms.Form
    $objForm.Text = "VMware Script - Created by Walter Beach"
    $objForm.Size = New-Object System.Drawing.Size(650,390)
    $objForm.StartPosition = "CenterScreen"
    $AuditButton = New-Object System.Windows.Forms.Button
    $AuditButton.Location = New-Object System.Drawing.Size(310,80)
    $AuditButton.Size = New-Object System.Drawing.Size(75,23)
    $AuditButton.Text = "Audit"
    $AuditButton.Add_Click({ get-vmhosts | set-vmdnsservers -DNS $DNS })
    $objForm.Controls.Add($AuditButton)
    Function set-vmdnsservers
    param
    [Parameter(ValueFromPipelineByPropertyName=$true)]$Name,
    [Parameter(Mandatory=$true,HelpMessage="Example: 192.168.1.1")]$DNS
    $i = 0
    $itemCount=$input.Count
    write-host ""
    Write-Host "Configuring DNS Server " -NoNewline
    $Input | ForEach {
    IF ($PSVersionTable.PSVersion.Major -ge 3) { Write-Progress -activity "Configuring DNS Servers" -status $_ -PercentComplete (($i++ / $itemCount) * 100) } Else { ticker }
    $_ | Get-VMHostNetwork | Set-VMHostNetwork -DnsAddress $DNS | Out-Null
    } # End For Each Loop
    } # End of set-vmdnsservers
    Walter

    You need to put a final call to Write-Progress with the -Completed switch, probably right after your ForEach loop, in this case:
    $Input | ForEach {
    IF ($PSVersionTable.PSVersion.Major -ge 3) { Write-Progress -activity "Configuring DNS Servers" -status $_ -PercentComplete (($i++ / $itemCount) * 100) } Else { ticker }
    $_ | Get-VMHostNetwork | Set-VMHostNetwork -DnsAddress $DNS | Out-Null
    } # End For Each Loop
    Write-Progress -Activity "Configuring DNS Servers" -Completed

  • 11.1.2.0 data form load progress bar

    We are not seeing circle progress/hourly glass when loading some large set of data. Form is rather showing no load status thus confusion to users whether it is doing anything.
    Please let me know if anyone has any advise or solution to get around this behavior. I see below fix from 11.1.2.1.000 patch set but my issue is with load not the save (when clicking GO to load form)
    • 9928211 If business rules are associated with a data form, a progress indicator needs to
    display when the data form is saved.
    Thanks much.

    At the end of day ..Does webform working perfectly???
    Cheers!
    Sh!va

  • How to show the progress bar on forms?

    Hello ALL,
    How should we show the progress bar in our forms screen so we can see how much work is remaining?
    For example if we are performing some task through forms, what code and on which trigger we placed this code in order to show the progress bar that inform us about the task in progress.
    Thanks
    malan

    Hi,
    Shouldn't the oracle forms' support the progress
    bar?
    I prefer to have a code which shows progress bar on
    forms.
    Can some one have this code ?
    ThanksPJC progress bars are shown on the form and forms support progress bar and coding itit's relatively easy.
    If I were you I would take Francois' advice and type in "progress bar" in the lil search box :)
    It's a wonder what a lil search can show you
    Tony

  • Ffmpeg conversion progress bar?

    Hello All,
    I am currently in the process of writing a perl script to automate the conversion of avi files into mp4 format so that they can be played on my iPod classic 80GB. I was hoping to create some form of "progress bar" for the entire process. At the moment I am using ffmpeg to convert the files however I cannot see how to obtain a value for the time it is going to take to complete the conversion of each file. I have attached the code at the bottom of this post for anyone that is interested so far. Please forgive any problems with the perl code but I have only just started learning it (plus I'm a systems administrator not a code monkey).
    If anyone has any ideas or has seen something that I can't see in the ffmpeg documentation then I would really like to hear it.
    Cheers,
    #!/usr/bin/env perl
    use Cwd;
    use strict;
    use warnings;
    use File::Basename;
    while (@ARGV) {
    print "*** Converting $ARGV[0] ***\n";
    my $file = $ARGV[0];
    my $newfile = getcwd.'/'.basename($file);
    $newfile =~ s/\.avi$/.mp4/; # Convert File Extension To .mp4
    my $output = `ffmpeg -i "$ARGV[0]" -vcodec libx264 -b 700k -acodec libfaac -ab 192k -s 320x240 -aspect 4:3 "$newfile" >& /dev/null`;
    print "*** Conversion Complete ***\n";
    shift @ARGV;

    Well actually, only the JDK 1.4 allow such thing.
    The other solution is allways increasing the max size
    on when the max length is set, to set the length to the minimun
    and restart the process. Try the progressbar of the JDK 1.4 seems
    to be the best solution for your problem.

  • PROGRESS BAR , URGENT ....

    I have a backend process which takes 15 minuites to complete. Now when the user starts the process, I want to show in the front end form a progress bar . So as soon as the user hits the button to start the process, the progress bar will start and when the process will complete it ll complete. Any one knows how to achieve this ?
    A sample code is appreciated.
    Thanx
    Feroz

    I found a way to display a progress bar.
    I draw a red filled rectangle (named for example PROGRESS_BAR on the canevas). For example set the width of this rectangle to 200. And I draw also an empty rectangle to show the border of the first one
    Now calculate the number of iterations you make during your process : for example if you loop on the records of a table, count the number of records.
    Let's say you have n = 1000 iterations
    and the size of the rectangle is length = 200
    DECLARE
    n_cpt NUMBER := 0; -- loop counter
    n_step NUMBER;
    BEGIN
    -- At the beginning of the process, make the rectangle visible :
    set_item_property('PROGRESS_BAR', DISPLAYED, PROPERTY_TRUE);
    -- set the size to zero
    set_item_property('PROGRESS_BAR', WIDTH,0);
    -- for example if you want to refresh
    -- the progress bar by 5%
    n_step := n * 0.05;
    -- you will refresh after 1000 * 0.05 = 50 -- loops
    LOOP
    -- test if the occurrence can by divided
    -- by n_step
    IF (n / n_step ) = ROUND( n /n_step) THEN
    set_item_property('PROGRESS_BAR', WIDTH,
    n / n_step * 200 * 0.05);
    -- for example if n = 500 you will have
    -- a width of 500 / 50 *200 * 0.05 = 100
    -- it's the half of the initial width
    -- of 200 and shows the user that you
    -- have processed half of the records
    END IF;
    -- increment loop counter
    n := n +1;
    ..... rest of your code
    END LOOP;
    message('end of process');
    -- hide the progress bar
    set_item_property('PROGRESS_BAR', DISPLAYED, PROPERTY_FALSE);
    END;
    null

  • Customizing OI to add step progress bar

    Hello custom RTOI experts!  I am attempting to make a customization to the full-featured LabVIEW RTOI (for TestStand 3.0) in order to provide the seemingly simple feature of a step completion progress bar on the execution page of the tab control.  Let me explain a little behind the concept I'm going for.  There are some steps in my sequences that take a relatively long time (15 minutes or so).  During this period, a requirement of mine is to have a progress bar that gets updates every so often such that by the time the step would ordinary complete, the progress bar is at 100%.  Initial attempts involved a separate VI that managed the progress bars, but having yet another window is not the ideal UI design...  Instead, I was hoping to integrate this functionality into the RTOI so that each time a new step begins executing, additional custom data (the expected step duration) is (optionally) sent to the RTOI providing the progress update portion of the RTOI code the necessary data.
    Is there any sample code out there that performs some similar task so that I can get a better feel for how the pieces fit together?  In particular, there are a few things that are befuddling me:
    1) What is a good way to store this custom information (step duration) in the sequence file?  Should I modify the basic step types to add a new duration field which can be optionally set to something greater than the default, 0?
    2) How should the step duration get passed to the RTOI?  My current thought is to override the PreStep engine callback to send the custom duration field in a custom UIMessage, but that may be partly because I'm not familiar enough with the structure of the data is that is that is accessible via the sequence context...
    3) How do I link the progress bar data to the actual execution page that is currently being viewed.  Up to 4 executions can be running using the parallel model or the batch model in my sequences, so something would clearly need to be done so that when execution 1 is visible, the associated progress bar is shown, etc...  I'm assuming I can trap on some event when the user clicks on an execution in the list bar, but there is no similar code in the out-of-box RTOI - all that appears to be managed automatically by linking the controls to the execution manager.
    Thanks for any pointers or code samples (or even suggested reading) that anyone can give.

    Thanks for the response.
    I may indeed want to use the ProgressPercent message, but I'm not so sure just yet.  I did not want to leave the responsibility of sending UIMessages up to the VIs and other code modules called by the sequence - I was hoping for a simple solution to provide a new field (ExpectedDuration) that can be set for any given step.  In this way, the RTOI can manage updating the progress simply by counting seconds.  Perhaps there is some timer callback that can be leveraged to perform this function?
    What I have so far is as follows: I have a new step type called PassFailTestWithDuration.  It is a copy of the PassFailTest step type with the addition of a ExpectedDuration property and a new PreStep which calls the PostUIMessageEx with a custom event (10001).  The expected duration and the RunState.TestSockets.MyIndex both get passed as parameters.  Inside the RTOI, I have added a UserMessage callback VI which stores the data in the appropriate slot of a global (indexed by socket index).  (The global array is implemented as what I've heard called an action engine - there are init, read, and write actions that it can perform on data stored in the VI, and it is set as non-reentrant so that race conditions cannot occur).  Each entry in the global array has 2 fields - the expected duration, and the current elapsed time.  My idea was to continually update the current elapsed time for all active executions and simply show a progress bar for the "active" execution by displaying its elapsed time/expected duration in each necessary event...
    I think my main question now is - how do you determine the RunState.TestSocket.MyIndex of the active execution in the execution manager (or application manager)?  It seems like such an obvious thing to want to know, but I don't see it anywhere.
    Thanks again for any hints you can provide!

  • Directories in finder greyed out, with partially-filled progress bars

    I attempted to use the finder to copy some SSDs to an external hard drive.  Normally I use rsync, and this has never failed me.  This time I decided to use the Finder to do the copy because I wanted to know in advance how long the 1.6TB transfer would take.  When I started the copy operation, the finder told me it would take 16 hours.  I left for Boston, expecting the copy to be done when I returned.  It failed, so I re-started it.
    Very close to the end of the copy of the last two SSDs, I received an alert that my external drive had been disconnected (I hadn't touched it).  However, after physically removing the FW800 cable and reconnecting, the drive re-mounted, and the two directories I was trying again to copy were reconnected with it, but they were greyed out, each one showing a progress bar of the defunct copy operation from the last time.
    How do I get the disk, which has now been properly updated via rsync, to forget this vestigal information from the finder that, apparently, was not enough information to get the Mac to just Do The Right Thing and continue the copy, nor sufficiently self-aware to remove itself after the failed copy?
    What''s the fix?

    Well the strange partially-completed progress bars are gone, but my directories in those directories remain grayed out.  Using the command line, I can easily see the tens of thousands of files in those directories (RAW files from a BlackMagic Cinema Camera for an hour-long event).  But the finder refuses to open the directory.
    Does anybody else have any thoughts on how to tell the Finder "you are confused.  Forget everything you think you know, and just rebuild your knowledge from evidence in the filesystem, rather than your own preconceived notion of what you think should be there"?  Or better yet, how to tell the Finder "never try to be smarter than the filesystem.  Just be a **** GUI and let the file system be the file sytem?"

  • Progress bar and threads

    I have made a web browser, when you load a web-page a progress bar is displayed showing the current progress of the page loading. However if you try and load a new page before the previous page has finished loading the progress bar goes crazy. I have included a short example of what is happening below:
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    //import javax.swing.event.*;
    public class ProgressBarTest extends JFrame implements ActionListener,Runnable{
        private JProgressBar myprogressBar;
        private boolean stopProgressBar = false;
        public Thread thread;
        public ProgressBarTest(){
            createGui();
        }//end of constructor
        public void createGui(){
            this.setLayout(new BorderLayout());
            this.setDefaultCloseOperation(this.EXIT_ON_CLOSE);
            this.setSize(300,150);
            JPanel ButtonPanel = new JPanel(new FlowLayout());
            JButton new_Page = new JButton("new Page");
            JButton Page_Loaded = new JButton("Page Loaded");
            new_Page.addActionListener(this);
            Page_Loaded.addActionListener(this);
            ButtonPanel.add(new_Page);
            ButtonPanel.add(Page_Loaded);
            myprogressBar = new JProgressBar(0,100);
            this.add(ButtonPanel,BorderLayout.NORTH);
            this.add(myprogressBar,BorderLayout.CENTER);
            this.setVisible(true);
        }//end of method
        public void actionPerformed(ActionEvent e) {
            if(e.getActionCommand().equals("new Page")){
                createNewandRun();
            }else if(e.getActionCommand().equals("Page Loaded")){
                stopProgressBar = true;
        }//end of method
        public void run(){
                myprogressBar.setVisible(true);
                stopProgressBar = false;
                myprogressBar.setValue(0);
                System.out.println("Page Loading...");
                try{
                    for(int i = 0;i<100;i++){
                        Thread.sleep(70);
                        myprogressBar.setValue(i);
                        if(stopProgressBar){
                            System.out.println("progress was stopeed at "+i+ " %");
                            break;
                  myprogressBar.setValue(100);
                  System.out.println("Page Loaded");
                  thread.sleep(1000); //Show complete progress bar for one second
                }catch (Exception e){
                    System.out.println("thread error "+e);
               myprogressBar.setVisible(false);
        }//end of run method
        public void createNewandRun(){
          thread = new Thread(this);
          thread.start();
        public static void main(String args[]){
             SwingUtilities.invokeLater(new Runnable() {
             @Override
             public void run() {
              new ProgressBarTest();
        }//end of main
    }//end of classThanks in advance
    Calypso

    Using Swing Worker.... Just like your code intended, the progress bar will wait one second upon completion before being made invisible. If the "New Page" button is pressed then the old SwingWorker exits gracefully and a new one starts up. All modification of the JProgressBar is done on the Event Dispatching Thread.
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    import javax.swing.JButton;
    import javax.swing.JProgressBar;
    import javax.swing.SwingWorker;
    import java.awt.event.ActionListener;
    import java.awt.event.ActionEvent;
    import java.beans.PropertyChangeListener;
    import java.beans.PropertyChangeEvent;
    public class ProgressBarTest implements ActionListener,
            PropertyChangeListener{
        JButton newPage;
        JButton pageLoaded;
        JProgressBar progressBar;
        PageLoader currentWorker;
        public ProgressBarTest() {
            JFrame frame = new JFrame();
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            newPage = new JButton("New Page");
            newPage.addActionListener(this);
            pageLoaded = new JButton("Page Loaded");
            pageLoaded.addActionListener(this);
            JPanel buttonPanel = new JPanel();
            buttonPanel.add(newPage);
            buttonPanel.add(pageLoaded);
            progressBar = new JProgressBar();
            JPanel contentPane = new JPanel();
            contentPane.setLayout(new java.awt.BorderLayout());
            contentPane.add(buttonPanel,java.awt.BorderLayout.NORTH);
            contentPane.add(progressBar,java.awt.BorderLayout.CENTER);
            frame.setContentPane(contentPane);
            frame.pack();
            frame.setVisible(true);
        public void actionPerformed(ActionEvent e) {
            if(e.getSource() == newPage) {
                if(currentWorker != null) {
                    currentWorker.removePropertyChangeListener(this);
                    currentWorker.cancel(true);
                progressBar.setValue(0);
                progressBar.setVisible(true);
                currentWorker = new PageLoader();
                currentWorker.addPropertyChangeListener(this);
                currentWorker.execute();
            }else if(e.getSource() == pageLoaded) {
                if(currentWorker != null) {
                    currentWorker.pageLoaded = true;
        public void propertyChange(PropertyChangeEvent evt) {
            if(evt.getPropertyName().equals("progress")) {
                int progress = (Integer) evt.getNewValue();
                progressBar.setValue(progress);
            }else if(evt.getPropertyName().equals("pageLoaded")) {
                progressBar.setVisible(false);
                currentWorker.removePropertyChangeListener(this);
                currentWorker = null;
        private class PageLoader extends SwingWorker<Void,Void> {
            private int progress;
            private boolean pageLoaded;
            public Void doInBackground() {
                for (progress = 0; progress < 100; progress++) {
                    if(pageLoaded) break;
                    try {
                        Thread.sleep(70);
                    } catch (InterruptedException e) {
                        //return gracefully since "New Page" button was pressed
                        return null;
                    setProgress(progress);
                /**The progress might have reached 100 naturally. In which case
                 * pageLoaded is false and needs to be set to true.*/
                pageLoaded = true;
                /**The Page Loaded button might have been pressed, in which case
                 * the progress is not 100 and needs to be set to 100.*/
                progress = 100;
                setProgress(100);
                try{
                    //show completed progress bar for 1 second.
                    Thread.sleep(1000);
                }catch(InterruptedException e) {
                    pageLoaded = false;
                    return null;
                return null;
            //executed on EDT when doInBackground() method is done
            public void done() {
                System.out.println("Progress reached: " + progress + "% " +
                        "upon termination.");
                if(pageLoaded) {
                   firePropertyChange("pageLoaded",null,null);
        public static void main(String[] args) {
            javax.swing.SwingUtilities.invokeLater(new Runnable() {
                public void run() {
                   new ProgressBarTest();
    }

  • Progress bar completion function

    How do we control the progress bar completion functions @ the end of the pages, so they reflect reasonably correct amounts?

    For single page forms we never show progress
    For multiple page forms the first page always shows 0% and we don't show progress on the last page. For the pages in between we take the number of questions completed on the previous pages and divide by the total number of questions in the entire form to get the percentage for the current visible page.
    Hope that explains this better.
    Randy

  • IE progress bar continues after Request is completed

    I have an iPlanet J2EE Struts web application running in a 6.0.280 IE Browser. I have a JSP page that when submitted, the request is 100% successfully completed. I get the standard "Done" message on the browser bar, the IE globe is not active, and the web page properly displays the expected results. However, the IE progress bar continues to increase up to a point, indicating that more processing is expected or still waiting for a response. That�s the issue. There are 2 JSP�s that make-up this web page. One is an outer page which contains links and filtering options and the other is an inner frame which contains the data on which the submit will act. Although it may not be enough to illustrate this issue, below is a snippet of the both JSP�s. Any suggestions would be appreciated:
    Segment of Main JSP code:
    ( The Javascript method submitDoUpdate() is invoked when the user clicks a �submit� link.)
    This method resides in the outer page(main frame/page)
    * Submit update
    function submitDoUpdate(){
    top.main_frame.innerFrame.document.myForm.submit();
    The submit will POST the form using the following from the InnerPage(innerFrame/page) and invoke the Struts Action listed.
    <FORM NAME=" myForm " action="myAction.do" method="POST">

    maybe it's doing something else? are there images in your page?

  • Progress Bar in Form

    how can i use progress bar in form for performing task in background

    Another simple trick I used to use is create one textitem with a white background color and a widht of 100. Create another textitem with the same height, x-pos and y-pos but with a width of 0 and a background color of blue.
    Then in your program vary the width of the blue textitem to "fill" the progress bar.
    The real challenge is how to calculate the percentage completed. If you're running a database stored procedure, then I'm afraid there is no way to communicate the progress back to the Forms process until the PL/SQL procedure is over. If it's a client/Forms side PL/SQL procedure then you can set the percentage complete of the progress bar

  • Getting a class to update a progress bar in the caller form

    Suppose my form calls a class that does a lot of work.  The class could take 5 minutes to complete the job it is doing.  So every 20 seconds, perhaps, I would like the class to tell the form what percentage of the job is has completed, so that
    I can update a progress bar.  Can this be done without my having to code a save of the state of the operation (going on in the class) and returning to the caller so that it can update the bar, restore the state and start things up again?
    Thanks.

    Do you use a BackgroundWorker or a seperate thread for the job? If not, the UI is frozen anyway.
    Have a look here:
    BackgroundWorker Class
    Armin

  • TS3694 hi i recently updated into ios 7.0.4 now i want to fully restore my ipad to resell but when i restore it it got stuck with apple logo and progress bar with 45% completed as firware file is downloaded using ipad 4 wifi itunes 11.3.8

    hi i rescently updated my ipad 4 in ios 7.0.4 and for resell purpose i want to restore my ipad via itunes but it got stuck at apple logo and progress bar of 45% completed i tried it 50 times but it stuck on that exact point for hours i cant able to restore it and had no errors it just like freezes at one point i also uses dfu mode but got stuck at same problem using windows 7 32 bits itunes 11.3.8 ipad 4 wifi please help

    My iPhone 5 wouldn't start after I turned it off a few minutes after writing this. It went into recovery mode and I had no choice but to connect to iTunes on PC and restore.
    I restored to factory setting first, just to validate my phone was okay. For a second consecutive iOS update, the  iPhone 5 did not update smoothly while connected to PC and iTunes - I had to retry two times before the progress bar for the update showed. (The exact same problem with the restart occured when I updated to 7.0.4.)
    The good news is that I was ultimately able to restore the iPhone 5 to factory settings while running iOS 7.0.6. I did have a backup from about a month ago lying around and was able to successfully restore with that as well, so the damage done is almost negligible since I had my contacts, notes, mail, etc. backed up to iCloud.
    Once I completed both restores, the sync with iTunes worked fine.

  • Creating progress bar in oracle forms 6i

    Hii
    I have a push-button (pb_submit)
    when when_button_pressed trigger fired...I have a database main procedure to be called.
    inside that procedure i am calling 25 procedures.
    and all 25 Procedures will be executed sequencially.
    I want to use a Progress bar...
    so that user will get to know hw much % completed
    if main procedure(total 25 procedures inside) is completed successfully then progress bar should show 100%
    like wise if 1 procedure completed then 4 %
                 if 2 procedure completed then 8 %
    total 25 procedure completed then 100%
    how to implement this logic.
    and if in between 1 procedure failed then progress bar should stop at that incident.
    and it should start from dat instant only if again that failed procedure run successfully.
    should i post my codes here.ok...here is the codes written in the button(when_button_pressed trigger)
    DECLARE
      l_Last_Record      NUMBER  := 0  ;
      l_Prg_Process_Id    NUMBER     ;
      l_Prg_Process_Id_1  NUMBER     ;
      l_Prg_Id       VARCHAR2(15)  ;
      l_Alert_Result    VARCHAR2(1)   ;
      l_Validation_Msg   VARCHAR2(500) ;
      l_Path        VARCHAR2(240) ;
      File_Name       VARCHAR2(250) ;
      l_file_exists     BOOLEAN       ;
      l_file_len        NUMBER     ;
      l_blocksize       BINARY_INTEGER;
      o_Status       VARCHAR2(1)  ;
      o_User_Selection_Ca1 VARCHAR2(1)  ;
      o_User_Selection_Ca2 VARCHAR2(1)  ;
      o_User_Selection_Ca3 VARCHAR2(1)  ;
      CURSOR C_Validation IS
      SELECT Cpv_Validation_Type     ,
             Cpv_Validation_Input    ,
             Cpv_Validation_Action  ,
             Cpv_Validation_Active_Flag
      FROM   Config_Process_Validation
      WHERE  Cpv_Program_Id = l_Prg_Id
      AND   Nvl(Cpv_Validation_Active_Flag, 'N') = 'Y'
      ORDER BY Cpv_Validation_Sequence;
    BEGIN
    SELECT RV_HIGH_VALUE
    INTO   l_Path
    FROM   CG_REF_CODES
    WHERE  Rv_Domain    = 'DERV_DATA_FILES'
    AND   Rv_Low_Value = 'DRV_FILES';
    Go_Block('Process');
      Last_Record;
      l_Last_Record := :System.Cursor_Record; 
      First_Record;
      FOR i IN 1 .. l_Last_Record
      LOOP
      Go_Record(i);
      l_Prg_Id := :Prog_Id;
      IF NVL(:Process.Cb_Select,'N') = 'Y' THEN
       :Query.Current_Status := 'Current Process: ' || :Process.Prog_Desc;
       Synchronize;
       --Validate if program is already in running mode or already completed
       SELECT NVL(MAX(DECODE(Prg_Status, 'R', 999999999, 'C', Prg_Process_Id)), 0)
       INTO   l_Prg_Process_Id
       FROM   Program_Status,
           Parameter_Master
       WHERE  Prg_Dt      = Pam_Curr_Dt
       AND    Prg_Cmp_Id  = l_Prg_Id
       AND    Prg_Exm_Id  IN ('ALL', :Query.Exchange)
       AND    Prg_Status  IN ('R', 'C');
       IF l_Prg_Process_Id = 999999999 THEN
         P_Show_Alert(l_Prg_Id||' Process is already running.','A',l_Alert_Result);
        --RAISE Form_Trigger_Failure;
       ELSIF l_Prg_Process_Id > 0 AND :Execution_Flag <> 'M' THEN
        P_Show_Alert(l_Prg_Id||' Process already run. It can not run twice. ','A',l_Alert_Result);
        RAISE Form_Trigger_Failure;
       END IF;
       --Validate mandataory process, process specific validation and message
       FOR i IN C_Validation
       LOOP
        IF i.Cpv_Validation_Type = 'MANDATORY' AND i.Cpv_Validation_Active_Flag = 'Y' THEN
           SELECT Count(1)
           INTO   l_Prg_Process_Id_1
           FROM   Program_Status,
               Parameter_Master
         WHERE  Prg_Dt      = Pam_Curr_Dt
         AND    Prg_Cmp_Id  = i.Cpv_Validation_Input
         AND    Prg_Exm_Id  IN ('ALL', :Query.Exchange)
         AND    Prg_Status  = 'C'
         AND    Prg_Process_Id IN (SELECT MAX(Prg_Process_Id)
                      FROM   Program_Status,
                          Parameter_Master
                      WHERE  Prg_Dt      = Pam_Curr_Dt
                      AND    Prg_Cmp_Id  = i.Cpv_Validation_Input
                      AND    Prg_Exm_Id  IN ('ALL',:Query.Exchange)
                      AND    Prg_Status  = 'C');
         IF l_Prg_Process_Id_1 = 0 THEN
          P_Show_Alert(i.Cpv_Validation_Input||' Mandatory Process NOT completed successfully.','A',l_Alert_Result);
          RAISE Form_Trigger_Failure;
         END IF;
        ELSIF i.Cpv_Validation_Type = 'MESSAGE' THEN
         P_Show_Alert(i.Cpv_Validation_Input, i.Cpv_Validation_Action, l_Alert_Result);
         IF l_Alert_Result = 'N' THEN
          RAISE Form_Trigger_Failure;
         END IF;
        ELSE   
         --- OTHER PROCESS SPECIFIC VALIDATION
         l_Validation_Msg := Null;
         Pkg_Process_Automation.P_Pre_Process_Validation(l_Prg_Id,
                                 :Query.Exchange,
                                 :Query.Segment,
                                 i.Cpv_Validation_Type,
                                 l_Validation_Msg);
         IF l_Validation_Msg IS NOT NULL THEN
          P_Show_Alert(l_Validation_Msg,i.Cpv_Validation_Action,l_Alert_Result);
          IF l_Alert_Result = 'N' THEN
           RAISE Form_Trigger_Failure;
          END IF;
         END IF;  
        END IF; 
       END LOOP;
       --Validating whether file exists or not
       IF :Process.File_Input_Format IS NOT NULL THEN
        Pkg_Process_Automation.P_Gen_File_Name(:Process.File_Input_Format,
                            :Query.Exchange,
                            :Query.Segment,
                            File_Name);
        Utl_File.FGetAttr(
         location    => l_Path,
         filename    => File_Name,
         fexists     => l_file_exists,
         file_length => l_file_len,
         block_size  => l_blocksize);
        IF NOT l_File_Exists THEN
         --MESSAGE('The file does not exist.');
         P_Show_Alert('The file does not exist.','A',l_Alert_Result);
         RAISE Form_Trigger_Failure;
        END IF;
       END IF;
       Set_Application_Property(Cursor_Style, 'BUSY');
       SET_ITEM_INSTANCE_PROPERTY('Process.Status', CURRENT_RECORD, VISUAL_ATTRIBUTE, 'VA_YELLOW');
       :Process.Status := 'R';
       Synchronize;
       IF l_Prg_Id = 'DTMBCORP' THEN
        P_Show_Alert('Do you want to do Final Settlement Corporate Action ?(Y/N)','I',l_Alert_Result);
        o_User_Selection_Ca1 := l_Alert_Result;
        P_Show_Alert('Enable Round-To-Tick ? (Y/N)','I',l_Alert_Result);
        o_User_Selection_Ca2 := l_Alert_Result;
        --P_Show_Alert('Do you want to Rollback ? (Y/N)','I',l_Alert_Result);
        --o_User_Selection_Ca3 := l_Alert_Result;
       END IF;
       ----   Calling of Main Procedure
       Pkg_Process_Automation.P_Run_Process(l_Prg_Id,
                          :Query.Exchange,
                          :Query.Segment,
                          :Query.Entity_Id,
                          File_Name,
                          o_User_Selection_Ca1,
                          o_User_Selection_Ca2,
                          o_User_Selection_Ca3,
                          o_Status);
       IF l_Prg_Id = 'DTMBCORP' THEN
        P_Show_Alert('Do you want to Rollback (Y/N)','I',l_Alert_Result);
        o_User_Selection_Ca3 := l_Alert_Result;
        Pkg_Process_Automation.P_Run_Process(l_Prg_Id,
                            :Query.Exchange,
                            :Query.Segment,
                            :Query.Entity_Id,
                            File_Name,
                            o_User_Selection_Ca1,
                            o_User_Selection_Ca2,
                            o_User_Selection_Ca3,
                            o_Status);
       END IF;                 
       Set_Application_Property(Cursor_Style, 'DEFAULT');                  
       Message(o_Status);
       Message(o_Status);
       IF o_Status = 'Y' THEN
        :Process.Status := 'C';
        SET_ITEM_INSTANCE_PROPERTY('Process.Status', CURRENT_RECORD, VISUAL_ATTRIBUTE, 'VA_GREEN');
       ELSE
        :Process.Status := 'E';
        SET_ITEM_INSTANCE_PROPERTY('Process.Status', CURRENT_RECORD, VISUAL_ATTRIBUTE, 'VA_RED');
       END IF;
       SELECT Prg_Log_File
       INTO   :Process.Log_File
       FROM   Program_Status ,
              Parameter_Master
         WHERE  Prg_cmp_id = l_Prg_Id
         AND    Prg_dt     = Pam_Curr_Dt
          AND   (Prg_Cmp_Id,Prg_Strt_Time)  IN (SELECT   Prg_Cmp_Id,max(Prg_Strt_Time) 
                                   FROM   Program_Status b,
                                                        Parameter_Master
                                                 WHERE  Prg_Cmp_Id =  l_Prg_Id
                                   AND    Prg_Dt     =  Pam_Curr_Dt
                                                  GROUP BY Prg_Cmp_Id);
       Synchronize;
       Set_Application_Property(Cursor_Style, 'DEFAULT');   
      END IF;
    END LOOP;
    :Query.Current_Status := '';
    Synchronize;
    EXCEPTION
      WHEN OTHERS THEN
      :Query.Current_Status := 'Error found';
      Set_Application_Property(Cursor_Style, 'DEFAULT');
      MESSAGE(sqlerrm );
      --MESSAGE(sqlerrm );
      Synchronize;
    END;
    inside p_run_process there are other 25 database procedures.
    help me !!!

    Create a procedure as like,
    PROCEDURE show_progress(x number) IS
    y number;
    BEGIN
      set_item_property('PART_DISP',VISIBLE,PROPERTY_TRUE);
      set_item_property('PART_DISP',WIDTH,x);
      set_item_property('PART_DISP',VISIBLE,PROPERTY_TRUE);
    END;
    PART_DISP is a display_item.
    After completion of each procedures call the above procedure like,
    cntr:=cntr+1;
    show_progress(round(cntr/25*287,0));
    synchronize;
    where cntr is a counter it will be incremented 1 to 25, the constant value 287 is the maximum width of PART_DISP (you can change for your need).
    The local variable cntr's initial value is 0 and maximum value is 25.    
    cntr                   part_disp          % of progress
    1
    11.48
    4
    2
    22.96
    8
    3
    34.44
    12
    4
    45.92
    16
    5
    57.4
    20
    6
    68.88
    24
    7
    80.36
    28
    8
    91.84
    32
    9
    103.32
    36
    11
    126.28
    44
    12
    137.76
    48
    13
    149.24
    52
    14
    160.72
    56
    15
    172.2
    60
    16
    183.68
    64
    17
    195.16
    68
    18
    206.64
    72
    19
    218.12
    76
    20
    229.6
    80
    21
    241.08
    84
    22
    252.56
    88
    23
    264.04
    92
    24
    275.52
    96
    25
    287
    100
    Hope this will help.

Maybe you are looking for

  • Firefox 6.0.1 doesn't open after upgrade from 3.6.8

    I've been running FF 3.6.8 since, well, forever. Today I installed 6.0.1 and everything seemed fine. When I ran 6, however, it never loaded. After a minute, I killed in the process table; I notice that there was another firefox process running, so I

  • Upgrading hyper-v 2008 r2 to 2012?

    is it possible/will it be possible to just upgrade hyper-v server from 2008 r2 to 2012 or will I have to reinstall the whole os and vms?

  • Handling Workflow Exceptions

    What is the best way to handle exceptions in workflow? Suppose a workflow step calls a method in a business object which in turn calls a function. Now an exception is raised in the function, the workflow just sits at that step with an "In Process" st

  • Erasing OSX Address Book w/ Sync!

    I've had this problem with my iPhone twice... If I'm syncing, sometimes all of my applications will freeze. (Address Book, iChat, iCal, Mail, etc.) If I force quit them (after about 5 minutes) then my address book is utterly erased, and iChat runs as

  • Using the mousepad on MacBook Pro with Lion.

    I can use the wireless mouse very easily in the iMac with Lion. The mouse trackpad on the MacBook Pro is much harder. Is it just a question of adjusting the settings ?