8 Replies Latest reply: May 9, 2013 4:38 PM by Doug RSS

    Setting Upper case in tabular forms

    Doug
      I am working in APEX 4.0.

      I want to be able to set a tabular forms column to upper case. I can do this with javascript for page items, but I cannot do the same for tabular forms columns. Please, if you know a way to do this, I would appreciate your help.
        • 1. Re: Setting Upper case in tabular forms
          Denes Kubicek
          Doug,

          I think this could solve your problem:

          https://apex.oracle.com/pls/apex/f?p=31517:279

          Denes Kubicek
          -------------------------------------------------------------------
          http://deneskubicek.blogspot.com/
          http://www.apress.com/9781430235125
          http://apex.oracle.com/pls/apex/f?p=31517:1
          http://www.amazon.de/Oracle-APEX-XE-Praxis/dp/3826655494
          -------------------------------------------------------------------
          • 2. Re: Setting Upper case in tabular forms
            VC
            Doug wrote:
            I am working in APEX 4.0.

            I want to be able to set a tabular forms column to upper case. I can do this with javascript for page items, but I cannot do the same for tabular forms columns. Please, if you know a way to do this, I would appreciate your help.
            This can be easily done by a dynamic action and built-in JavaScript API.

            Create a dynamic action as follows:

            Event: Key Release
            Selection Type: Jquery Selector
            replace f03 with your column internal name attribute i.e. name="fxx", you can get this by inspecting one of your column field in chrome/firefox
            Jquery Selector: input[name="f03"]

            Add a True Action as follows
            Action: Execute JavaScript Code
            this is generic and no need to change
            Code: $v_Upper(this.triggeringElement);

            Edit the dynamic action now and set the Event Scope to live +(this change is required so that this dynamic action will work for newly added rows)+

            That's it now as soon as you type something in that column and release the key the text will be turned to upper case

            Thanks,
            Vikram

            Edited by: VC on Apr 20, 2013 6:35 PM
            • 3. Re: Setting Upper case in tabular forms
              Denes Kubicek
              Vikram,

              that is also a solution but it doesn't work for the new added rows.

              Denes Kubicek
              -------------------------------------------------------------------
              http://deneskubicek.blogspot.com/
              http://www.apress.com/9781430235125
              http://apex.oracle.com/pls/apex/f?p=31517:1
              http://www.amazon.de/Oracle-APEX-XE-Praxis/dp/3826655494
              -------------------------------------------------------------------
              • 4. Re: Setting Upper case in tabular forms
                VC
                Denes Kubicek wrote:
                Vikram,

                that is also a solution but it doesn't work for the new added rows.

                Denes Kubicek
                Denes,

                It does work, As you know when we create a new dynamic action the event scope defaults to bind that will only work for the existing DOM elements.
                I forgot to add one more step i.e. Once the dynamic action is created, you have to edit it and set the Event Scope to live +(updated my answer above)+

                Cheers,
                Vikram
                • 5. Re: Setting Upper case in tabular forms
                  Denes Kubicek
                  O.K. they call it now "Static" and "Dynamic" and the dynamic one says:

                  Dynamic - Binds the event handler to the triggering elements for the lifetime of the current page, including any triggering elements that are recreated via Partial Page Refresh (PPR).

                  You need to read this at least ten times to understand what it says :) I didn't think about this possibility allthough I have used this in reports with links starting dynamic actions. Thanks.

                  Denes Kubicek
                  -------------------------------------------------------------------
                  http://deneskubicek.blogspot.com/
                  http://www.apress.com/9781430235125
                  http://apex.oracle.com/pls/apex/f?p=31517:1
                  http://www.amazon.de/Oracle-APEX-XE-Praxis/dp/3826655494
                  -------------------------------------------------------------------
                  • 6. Re: Setting Upper case in tabular forms
                    VC
                    Denes Kubicek wrote:
                    O.K. they call it now "Static" and "Dynamic" and the dynamic one says:
                    I was referring to 4.0 documentation as OP's question was regarding to.
                    Dynamic - Binds the event handler to the triggering elements for the lifetime of the current page, including any triggering elements that are recreated via Partial Page Refresh (PPR).
                    in earlier version it used to be bind,live & once, this was similar to jQuery method's bind,live & one

                    but from 4.2 they became static,dynamic & once, at least apex team have thought to use something that makes sense to apex developers (from non web tech background).
                    You need to read this at least ten times to understand what it says :) I didn't think about this possibility allthough I have used this in reports with links starting dynamic actions.
                    absolutely :) I always feel that oracle's documentation is a bit confusing. I use dynamic actions a lot with my plugins and reports etc.

                    another annoying thing was this event scope doesn't appear in the dynamic action wizard that means you have to edit that once created!.

                    Thanks,
                    Vikram
                    • 7. Re: Setting Upper case in tabular forms
                      Doug
                      Vikram, thanks for your explanation and sorry it's taken me so long to get back to this question. I tried to follow your directions, but obviously failed since the tabular columns are not changing to upper case.

                      The Event is "Key Release."

                      The Selector Type is "jQuery Selector".

                      The jQuery Selector is: input (name="f04_0001"). I have tried the selector using just "f04" but that was no help; I've also used "id" instead of "name". I have also used brackets instead of prentheses.

                      The code is exactly as you specified: $v_Upper(this.triggeringElement);

                      You did not specify a selection for "Affected Elements," but I tried everything except items.

                      Any ideas on what may be wrong?
                      • 8. Re: Setting Upper case in tabular forms
                        Doug
                        Please forget my earlier reply. It now works. Thank you very much. This is great.