8 Replies Latest reply on Aug 14, 2014 12:55 AM by gkthomas

    Status/Progress bar based on a field value

    gkthomas

      Friends, I have a  Field in a Form  called "STATUS" . This status has possible values such as  Draft, Open, Submitted for approval, Approved, Completed, Closed.    Based on current value of status, I wanted to show a Status/Progress bar just below the breadcrumb  which shows the current status.

      Can Someone help?

      George

        • 1. Re: Status/Progress bar based on a field value
          Mohannad

          Hi,

           

          You can use the built in list template "Horizontal Wizard Progress List" and create a list with your values, then create a region for this list wherever you wish.

           

          Thanks

          Mohannad

          • 2. Re: Status/Progress bar based on a field value
            Jorge Rimblas

            I think we need a lot more detail here. 

            Mohannad is right, the progress list can help you.  However, if you just want to display the current value there are several options. You could obtain the value with a Process on the rendering side of the page, for example, with an After Header process, and set a item with the value.  This will allow you to then display it on the page after the breadcrumb.

            Another option is to simply have a region with PL/SQL that will output the value after the breadcrumb.  The code will look something like

            declare

            l_status some_table.status%type;

            begin

            select status into l_status from some_table where id = : P10_ID;

            htp.p('Status:' || l_status);

            end;

             

            Hope this helps.

            -Jorge

            1 person found this helpful
            • 3. Re: Status/Progress bar based on a field value
              gkthomas

              Progress.jpg

              Thanks both for the help. Appreciate it

              I actually wanted to show and image like this with color for the current value of the status field

              George

              • 4. Re: Status/Progress bar based on a field value
                Jorge Rimblas

                Does that bar exist already? Is that image based on actual HTML?  If so please share it so that we can help.

                 

                Basically, I would do something like this:

                <ul>

                <li class="stsDraft">Draft</li>

                <li class="stsAwaiting">Awaiting</li>

                <li class="stsQualified">Qualified</li>

                <li class="stsWIP">WIP</li>

                <li class="stsComplete">Complete</li>

                </ul>

                 

                Then, based on the status, lets say I have it stored on P10_STATUS, I would add a class of "current" to the current element that will change it to green.

                Using APEX ability to do substitution variables I would do something like this:

                 

                $(".&P10_STATUS.").addClass("current");

                 

                This is an oversimplified example because I know your HTML will be a little more complex.  But the technique can be the same.

                 

                Again, an example on apex.oracle.com would go a long way here. 

                Thanks

                -Jorge

                1 person found this helpful
                • 5. Re: Status/Progress bar based on a field value
                  gkthomas

                  That bar does not exists , I just cropped a screens shot from another application . In the built in Horizontal Wizard Progress List, it is bullets. That is fine , But when creating the list it is asking dynamic  or static. My values are actually static, but the current value is dynamic. I couldn't get the bullet  to show the current value

                   

                  George

                  • 6. Re: Status/Progress bar based on a field value
                    Jorge Rimblas

                    You can use either one, Dynamic or Static.  With Dynamic you'll have the option to set the "is_current" column to "YES". With the static you'll need to code a PL/SQL condition that will evaluate to true when you want something to be current.

                    I personally would want to use Dynamic because then I can tie it to a table and set the order of the entries with a display_seq column.  But nothing wrong with a static list.

                     

                    Thanks

                    -Jorge

                    • 7. Re: Re: Status/Progress bar based on a field value
                      jwellsnh

                      user483406 wrote:

                       

                      Progress.jpg

                      Thanks both for the help. Appreciate it

                      I actually wanted to show and image like this with color for the current value of the status field

                      George

                      Hi George,

                       

                      This demo does not meet your color requirement but I believe it meets the rest.

                       

                      https://apex.oracle.com/pls/apex/f?p=48513:1

                       

                      The progress bar is conditioned using an Exist SQL Query for each list entry based upon the LOV item on the page.

                      StatusBar List Entry.jpg

                       

                      Jeff

                      1 person found this helpful
                      • 8. Re: Status/Progress bar based on a field value
                        gkthomas

                        Thanks a ton guys

                        You guys are awesome

                        Appreciate your help

                        George