Add Backspace function to PL/SQL button

Hello,
I am implementing a POS interface in oracle forms 6i and I am confused upon how to create the backspace function on a pl/sql button. I have added these to the WHEN-BUTTON-PRESSED trigger:
SELECT substr(:system.current_item, 1, (LENGTH(:system.current_item) - 1))
INTO lv_return
FROM dual ;
The problem is that I did not manage to get a dynamic reference to my current (selected) item on runtime. That is I only get it as a value and not as an item reference, where I can assign the lv_return value from above.
Any suggestions?
thank you.

Hello,
In a more general way you could use the d2kwutil Win_Api_Shell.SendKeys() function to simultate a keybord hit:
Description
Plays back Keystroke Macros to an application. You can combine keystrokes together in a macro and apply modifiers to them. Generally function keys can be addressed to the MDI window. Other sets of Keystrokes e.g. Sending Ctrl+Home to a Multi line text item are best done in the When-new-item-instance trigger of that item, using the Window_Handle for the item obtained by the Form Builder build-in Get_Item_Property.
Syntax
PROCEDURE Win_Api_Shell.SendKeys
(hWnd IN PLS_INTEGER,
Keys IN VARCHAR2,
RaiseExceptions IN BOOLEAN DEFAULT FALSE);
Parameters
Target
     The Window handle of the window you want to send the keystrokes to. You can get this handle by using the GET_WINDOW_PROPERTY built-in.
Keystrokes
     The keystrokes that you want to send to the window. Use these characters for modifier keys:
     Shift = +;
     Control = ^;
     Alt = %.
Modifiers can be ?Escaped? by enclosing them in braces {}.
To apply the modifiers to a sequence of keys, enclose the keys in brackets, as in "^(abc)". Other special keys are enclosed in braces thus:
{Backspace}
{Break}
{CapsLock}
{Clear}
{Delete}
{End}
{Enter}
{Esc}
{Help}
{Home}
{Insert}
{NumLock}
{PgDown}
{PgUp}
{PrtSc}
{ScrollLock}
{Tab}
{F1} - {F12}
{Up}
{Down}
{Left}
{Right}
RaiseExceptions If TRUE, then if the procedure fails to send or parse the keystrokes, the explicit PL/SQL exception NO_DATA_FOUND will be raised
In your case you could use the following:
win_api_shell.sendkeys(get_window_property('WINDOW1',window_handle),'{Backspace}',TRUE);
Francois

Similar Messages

  • How can i add a function to the Home button?

    I'm developing an app and in order to make it work, i need to add a function to the Home button when the user is in a specific screen.

    I would not say "impossible", but certainly not an app that would ever be available via the iTunes App Store.

  • How do I add a functional "submit button" to a pdf form in Adobe Acrobat Pro XI ? I created the pdf form in Adobe Forms Central.

    How do I add a functional "submit button" to a pdf form in Adobe Acrobat Pro XI ? I created the pdf form in Adobe Forms Central. It's for an online Diet Questionnaire. After people complete the form I'd like them to click "SUBMIT" and the completed form will be emailed to me.

    This can be a bit confusing because Acrobat 11 comes with the desktop app that allows you to create simple PDF forms without having a FormsCentral account. Some people find this helpful, but you need to understand that when you generate the PDF form, it is Reader-enabled by Acrobat. In order to edit the form further in Acrobat, you have to create a non-enabled copy of the form. You do this in Acrobat by opening the form and selecting: File > Save a Copy
    and opening the copy. It is not opened automatically.
    You can now add a button and set it up to submit by email, either using a "Submit a form" action or the submitForm JavaScript method. You can set it up to include just the form data or the entire PDF, and will want to use a mailto type URL. Submitting the form to the FormsCentral server has a number of important advantages over email (much more reliable, more secure, etc.), so you might want to consider it.
    If the form needs to be saved with Reader versions prior to 11, then you will need to Reader-enable the document. In Acrobat 11 you do this by selecting: File > Save As Other > Reader Extended PDF > Enable More Tools

  • CS3/AS2 need to add a function to FLVPlayer component play button

    Hi,
    I have an instance of the FLVPlayback component in a movie.
    I need to assign an extra function to the play button in the
    component
    (to tell another swf on the same page to stop, I have the
    function working)
    how can I find out the button instance name so I can assign
    the function to it?
    or am I on the wrong track?
    mark

    bump
    Do I need to trigger it by listening for an event, namely
    play
    rather than assigning it to the button as a function for
    on(release)
    I do not know how to do that
    any help please
    not much time to sort this out

  • Programming backspace function in a java calculator.

    I am doing a java calculator.
    I want to program the backspace function, here is the code I have:
    private void jbbackspaceMouseClicked(java.awt.event.MouseEvent evt) {                                        
    // TODO add your handling code here:
    caja=Float.valueOf(jtfpantalla.getText()).floatValue();
    if(caja==0){
    jtfpantalla.setText("0");
    else{
    char caja2;
    caja2=Float.toString(caja);
    caja2.getChars(0,24,caja2,0);
    jtfpantalla.setText(String.valueOf(caja));
    Netbeans sends me 2 errors. I don't know how to use caja, as string or as an array. I want to convert it ,to print the characters of the array except the last character when the backspace button will be pressed.
    I want to count the decimal point as another character, and print the characters except the last two when the decimal point is the penultime in the array.

    I'd suggest that you store the temporary or displayed value in the calculator as a List of characters, or a String, and then don't ever turn it into a number until someone pushes the '=' button.
    That's assuming I know what you're doing, which maybe I don't.

  • How to get a form field valud in delete PL/SQL Button Event Handler

    Hi Friend,
    I have a form. when user clicks delete button. we want to remove system dodelete function
    and add a delete script
    Under delete-top category,
    how can I get value of form EVENT_NUMBER field in form at delete PL/SQL Button Event Handler?
    DELETE FROM PTEAPP.PTE_EVENTS WHERE eventnumber = EVENT_number
    But when I try to save this form and get message as
    1721/15 PLS-00201: identifier 'EVENT_NUMBER' must be declared
    Thanks for any help!
    newuser

    I did something similar but wasn't using a stored procedure. Couldn't you set a flag variable once you know you're not doing the insert and in the "before displaying the form" section put an IF to check if your flag was set, and if so do an HTP.Print('You are overpaid buddy!');
    Then just reset your flag.

  • Timing of Report (function body returning sql) w/ pagination

    Hey -
    Wondered if someone can provide some insight here...
    I have a report that is dynamically created by calling a function that returns sql. Since it may return a few hundred results I have pagination turned on allowing the user to choose rows per page, and am showing X-Y with next/prev links.
    Before displaying the report the user has to choose some criteria to narrow down the result set - I'm finding something that I think is a bit strange in that it takes more time for the page to render when zero results are found vs. 100's of results. If I run the function and take the sql it creates, I can return 0 rows in .2 seconds and 508 rows in .5 seconds so I think the sql itself is fine. Other than debugging timings, how can I find out what is taking so long?
    Debug for 0 results:
    0.07: Region: Program Forecast (viewing SAVED values)
    5.14: show report
    5.15: determine column headings
    5.15: parse query as: ####
    5.15: print column headings
    5.15: rows loop: 15 row(s)
    10.32: Computation point: AFTER_BOX_BODY
    Debug for 508 results (in chunks of 15):
    0.07: Region: Program Forecast (viewing SAVED values)
    2.76: show report
    2.76: determine column headings
    2.77: parse query as: ####
    2.94: print column headings
    2.94: rows loop: 15 row(s)
    6.52: Computation point: AFTER_BOX_BODY
    So it took only 6.5 seconds to pull 508 rows, look at my pagination and pull the first x rows, but 10.32 seconds to pull 0 rows and show me the no data found message. Even stranger is that in the 0 rows result it looped and took 5 seconds before it hit the next point (5 seconds doing what??)
    Any ideas? I'm a little baffled here...I guess the next step is to trace it but I wanted to see if anyone had any ideas in the interim.

    Where is the embarrassed icon?
    After painstakingly copying over each item to a new page to test, I figured out performance starting sucking big time once I put a button out there that apparently had a less than optimal exists clause in it.
    D'oh!

  • How do I get an Apple License to add Mac functions to the keyboard my company manufactures?

    I'm writing to inquire about the process for obtaining a VID license to add mac functions to the keyboard my company manufactures. I've called serveral numbers (Apple Support, Apple Software Licensing, Apple Legal, Apple Corporate, Apple Developers, etc as well as emailed all these departments and more) with no response or instructions on how to move forward. Is what we're hoping for even possible???
    The mac functions we want to add to our keyboard are: the ability to touch one key to open the dashboard, same for the expose feature- rather than needing to press two keys- fn plus the F1-F12 key needed (this is a mac function that can be set up in the control panel on any mac). We would like our keyboards to be work in this manner, just as a mac keyboard would.
    We do not need to use the Dashboard or expose keycap images (I already know there are no current licenses for those), just the functions.
    Does anyone know the process for obtaining this sort of license? The cost? Any information would be helpful. I've been put on hold for over two hours, on several occassions, lead to empty voicemail systems that lead to no-one, and written over a dozen emails with only automated responses- none of which applicable to our question.
    I just want to know if this is possible ! Please help!
    Thank you in advanced.

    "...you don't have to press two keys to do any of that on a Mac keyboard." That is our goal, we are not a mac keyboard, but manufacture PC and Mac compatible keyboards.... since we are not an apple product, to utilize those hot and media keys we've had to press fn first...
    we want our next keyboard release to do as mac keyboards do and by that only press one button for those functions. We are advised to first recieve apple permissions to manufacture a keyboard like this.
    Also, I have been all over the site linked above, I've emailed and called these guys several times (from the link):
    Apple Inc.
    Software Licensing Dept
    12545 Riata Vista Circle
    MS:198-3SWL
    Austin, TX 78727
    (also their phone is 512.674.2645)
    No one there has been able to answer my question, or be able to offer any help regarding this type of license (contrary to the department name).
    Thanks for responding, but unfortunately it doesn't really help us answer our question.

  • Using variables in PL/SQL function body returning SQL query

    h4. okay so I have this procedure POSTCODE_TO_LAT_LNG_GM_API(postcode  IN  VARCHAR2, lat  OUT NUMBER,  p_long OUT NUMBER) to convert a postcode into lat/long values. I then need to add them to the returned SQL statement so I used the string concat operator || with to_char but it comes up with this error when I try to apply the changes: Query cannot be parsed within the Builder. If you believe your query is syntactically correct, check the ''generic column'' checkbox below the region source to proceed without parsing.
    ORA-00936: missing expressionh4. Does anyone know what I am doing wrong here I have tried so many different ways round and none seem to work!! :/
    h4. btw I'm using Oracle 11g release 11.2.0.3.0 and Apex version 4.1.1.00.23
    DECLARE
    l_lat NUMBER;
    l_lng NUMBER;
    l_SDO_GEOMETRY SDO_GEOMETRY;
    l_query VARCHAR2(30000);
    BEGIN
    POSTCODE_TO_LAT_LNG_GM_API (:P1_POSTCODE, l_lat, l_lng);
    l_query := 'select
    CAR_ID, CAR_NAME, CAR_POSTCODE,
    SDO_GEOM.SDO_DISTANCE(car_location, SDO_GEOMETRY(2001,
                                        8307,
                                        SDO_POINT_TYPE(' || to_char(l_lng) || ','
                                                         || to_char(l_lat) || ',
                                                         NULL),
                                        NULL,
                                        NULL),
    0.005, ''UNIT=MILE'') DISTANCE
    from   CARS';
    RETURN l_query;
    END;

    Okay so did a little playing around and eventually got it to work, the SQL Command didn't help with the function FYI (maybe something to do with it testing SQL statements and not PL/SQL?).
    My 1st problem was that one of my columns relied on an apex text box which isn't always filled in so the SQL Compiler didn't like that. To solve this I did an IF NOT NULL, ELSE statement.
    My 2nd problem was after I did that i didn't have a value for Distance in the ELSE statement and so APEX didn't know weather or not to add a Distance column. I solved this by making the distance column NULL.
    Here is my final working code:
    DECLARE
    l_lat NUMBER;
    l_lng NUMBER;
    l_SDO_GEOMETRY SDO_GEOMETRY;
    l_query VARCHAR2(30000);
    BEGIN
    IF :P1_POSTCODE IS NOT NULL THEN
    POSTCODE_TO_LAT_LNG_GM_API (:P1_POSTCODE, l_lat, l_lng);
    l_query := 'select
    CAR_ID, CAR_NAME, CAR_DESC, CAR_MAKE, CAR_MODEL, CAR_MILEAGE, CAR_PRICE, CAR_YEAR, CAR_POSTCODE,
    SDO_GEOM.SDO_DISTANCE(car_location, SDO_GEOMETRY(2001,
                                        8307,
                                        SDO_POINT_TYPE(' || l_lng || ','
                                                       || l_lat || ',
                                                       NULL),
                                        NULL,
                                        NULL),
                                        0.005, ''UNIT=MILE'') DISTANCE,
    dbms_lob.getlength(CAR_IMAGE_SMALL) CAR_IMAGE_SMALL,
    CAR_FUEL_TYPE, CAR_TRANSMISSION, CAR_ENGINE_SIZE, CAR_NUM_DOORS, CAR_BODY_TYPE, CAR_COLOUR
    from   CARS';
    ELSE
    l_query := 'select
    CAR_ID, CAR_NAME, CAR_DESC,
    NULL Distance,
    dbms_lob.getlength(CAR_IMAGE_SMALL) CAR_IMAGE_SMALL,
    CAR_FUEL_TYPE, CAR_TRANSMISSION, CAR_ENGINE_SIZE, CAR_NUM_DOORS, CAR_BODY_TYPE, CAR_COLOUR
    from   CARS';
    END IF;
    RETURN l_query;
    END;So yer problem solved now, thanks to you guys for trying to help out!! =)

  • Is it possible to add the exit command to a button in ALV OO toolbar

    Hi ABAP folks,
    is there are a way to add the exit command to a button of an ALV toolbar (like in the GUI status)?
    I want to prevent the field validations of a dynpro field at PAI.
    Thanks and regards,
    Martin

    Manage the event [TOOLBAR|http://help.sap.com/saphelp_erp2004/helpdata/en/ee/c8e07dd52611d2b468006094192fe3/frameset.htm] of CL_GUI_ALV_GRID.
    This event is triggered by the ALV each time the toolbar of the control needs to be regenerated. To add self-defined functions to the toolbar, you trigger the event using method set_toolbar_interactive and write an event handler method ( see also: Defining GUI Elements in the Toolbar).
    Look at demo BCALV_GRID_05.
    Regards,
    Raymond

  • How to call javascript function from PL/SQL procedure

    Can anybody advice me how to call javascript function from PL/SQL procedure in APEX?

    Hi,
    I have a requirement to call Javascript function inside a After Submit Process.
    clear requirement below:
    1. User selects set of check boxes [ say user want to save 10 files and ticks 10 checkboxes]
    2. user clicks on "save files" button
    3. Inside a After submit process, in a loop, i want to call a javascript function for each of the file user want to save with the filename as a parameter.
    Hope this clarify U.
    Krishna.

  • How to add Change Layout, savelayout, select layout Button to ALV Toolba

    How to add Change Layout, savelayout, select layout Button to ALV Toolbar?
    Moderator message: please (re)search yourself before asking.
    [Asking Good Questions in the Forums to get Good Answers|/people/rob.burbank/blog/2010/05/12/asking-good-questions-in-the-forums-to-get-good-answers]
    locked by: Thomas Zloch on Sep 10, 2010 10:57 AM

    Variant
    CALL FUNCTION 'REUSE_ALV_VARIANT_F4'
           EXPORTING
                is_variant          = gs_variant
                i_save              = c_save
              it_default_fieldcat =
           IMPORTING
                e_exit              = gf_exit
                es_variant          = gs_variant
           EXCEPTIONS
                not_found = 2.
      IF sy-subrc = 2.
        MESSAGE ID sy-msgid TYPE 'S'      NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ELSE.
        IF gf_exit = space.
          cf_varia = gs_variant-variant.
        ENDIF.
      ENDIF.
      CALL FUNCTION 'REUSE_ALV_VARIANT_DEFAULT_GET'
        EXPORTING
          i_save        = c_save
        CHANGING
          cs_variant    = gs_variant
        EXCEPTIONS
          wrong_input   = 1
          not_found     = 2
          program_error = 3
          OTHERS        = 4.
      IF sy-subrc NE 0.
        cf_subrc = sy-subrc.
      ENDIF.
    Change Layout, savelayout, select layout Button  pass the value which is in BOLD
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
       EXPORTING
         i_callback_program                =  gd_repid
         i_callback_user_command           =  'U_COMMAND'
         i_callback_top_of_page            = 'TOP-OF-PAGE'
                         is_layout                    =  fld_lay
           it_fieldcat                  =  fieldcatalog[]
                       IT_EXCLUDING                  =
                       IT_SPECIAL_GROUPS             =
                       IT_SORT                        =  it_sort[]
         i_default                      = 'X'
         i_save                         = 'A'
         is_variant                     = gs_variant
         it_events                      =  it_event[]
        TABLES
          t_outtab                      =    it_sales
                     EXCEPTIONS
                       PROGRAM_ERROR                     = 1
                       OTHERS                            = 2
    Annasaheb

  • Calling Javascript function from PL/SQL Process

    I am new to APEX and Javascript so please forgive my question.
    I have a process on page which successfully runs a few procedures etc. but now, as part of this process, I want to call a javascript function I have typed into the HTML Header.
    My question is how can I call the javascript function from my process? Is it possible?
    Many thanks
    Winnie
    ps. as an example my javascript looks like:
    <script language="JavaScript">
    function test(){
    var decision = confirm("Click a button below and watch what pops up next.");
    alert(decision);
    </script>

    See: How to call a javascript function from pl/sql?

  • Downloaded 11.0.3 (42) 64 bit to my MacBook Pro and it crashes every time I select a song a use the 'add to' function to add to a play list. It's never done this before, is it a bug with the new version?

    downloaded 11.0.3 (42) 64 bit to my MacBook Pro and it crashes every time I select a song a use the 'add to' function to add to a play list. It's never done this before, is it a bug with the new version?

    You could just disable updates. Change these settings in about:config.
    * app.update.auto - set to false
    * app.update.enabled - set to false
    You can still check for updates with the "Check for Updates" button in the About Firefox window, but it will download the update file anyway if there is an update available. You can also check which is the current release from here:
    * http://sjc.mozilla.com/en-US/firefox/new/

  • Function of the PLAY button versus the ENTER button

    Hello gang,
    I had a quick DVD / DVDSP related question that I've been trying to get a definitive answer for, and I've had great luck and some very helpful responses over in the Final Cut forum so I figured I'd give it a shot.
    Anyways, I'm editing some video and authoring a DVD for a group who intend to make an instructional DVD. It's divided into about five chapters and each one begins with some sort of voiceover and text/graphics. In the opening segment of the DVD, there is a voiceover that explains the way to navigate through the DVD and select chapters, etc. etc. The voiceover has already been written and recorded, but I have some concerns about the power they have designated for the "Play" button. Here is an excerpt:
    "We use the PLAY button in a couple of ways: to select and play an item that is currently highlighted in a list of items on the screen..."
    and also:
    "Almost all DVD remotes have a set of buttons that are arranged like a set of arrows (or triangles) pointing to the top, bottom, right and left of the remote control. These keys are used to move the selection pointer on menus presented on the screen. When an item is selected, it is highlighted to distinguish it from the other items in the list that are not selected. Once you have moved the selection point to the item you want, push the PLAY button to actually select and begin playback on that item."
    Now here is my concern– I was under the impression that the "Enter" button was typically used to select menu items, etc. I decided to test this on some commercial DVDs I had lying around, and it seems that the Play button does in fact work to select items. I had always assumed it was assigned just one specific role, for example playing the main title on a DVD.
    I looked it up in the DVDSP manual and this is all I found:
    "A button is selected when the viewer navigates to
    it. Only one button at a time can be in the selected state. The selected button becomes
    activated when the viewer presses the remote control’s Enter button. Depending on the
    button type, highlights or layers are used to indicate each button’s state."
    I couldn't find anything regarding the function of the Play button. I suppose my question is this: do these instructions sound okay? Are they universal? Can the Play button be used to select menu items on EVERY DVD player? I am only really stressing about this because this DVD is being targeted towards senior citizens, many of whom have extremely limited knowledge of DVD technology. I'd like to come up with the most universal, simple, and solid instructions for navigation through the DVD.
    Okay, thank you in advance. I appreciate any comments or advice you might be able to offer.
    PowerBook G4   Mac OS X (10.4.7)  

    Ah yes, Jake, but which UOP? Surely, you've seen me address this issue of there not being a Play UOP before?
    The project can be set up for Play to be Enter on a very high percentage of players, but it would be good with Christopher’s project to get the announcer to add "and Enter".
    The way it works is make sure that the "Still Off" user Op in DVD Studio Pro's Advanced Playback Controls is unchecked. DVD SP started making this default UOP denial in recent versions, which will mess up the Play remote key on a lot of players, including the Apple DVD player.
    And it would be good to take notes here Jake, since you do some Scenarist authoring. This Play remote key could bite you big time, if you're not careful (I've rescued two good authors who had trouble with what I'm about to describe; luckily, we caught it before it was submitted for replication).
    Still Off, which is what a lot of DVD player manufacturers map their play remote key if they don't directly map it to "Enter", when the DVD player is in infinite pause mode, i.e., the state a cell/program is in when displaying a still menu, causes the menu PGC to execute it's post command area (leave the PGCs still phase).
    A check of DVD SP's abstraction layer will show that navigation out of the post command area of all DVD SP's menu PGCs is determined by the current value of SPRM 8, the last selected/activated button. All of DVD SP's menu domain buttons are "LinkTail PGC" commands, so the effect of Operating Play is identical to activating a button with Enter, in the case of Still Off being the trigger.
    This can be verified by setting a button command in AfterEdit to jump somewhere directly which is different location than it was set in DVD SP. With the Still Off user op enabled, hit Play on the selected button and find that the original command in DVD SP will execute. But hit enter on the same button, and navigation will go to your test location. This is how it works on many players (you can check it out right in the Apple player).
    So it's good for spec based authors to use LinkTail PGC, which most do, on their menu button commands for still menus (in single PGCs), just in case users use Play instead of Enter in those players; or navigation can get pretty wacky! Or, if you don’t use LinkTail for the menus’ button commands, then it would be good to at least provide for code in the PGCs post command area to receive navigation in this case. But LinkTail has lots of other advantages, which is why it's used so much.
    With motion menus, Most players map the play remote key to "Enter", well, except the Apple DVD player. It turns the Play remote key to a Pause key during motion, so Christopher’s viewers would definitely be out of luck there.
    All that said, the play remote key should not be depended on as the primary for bullet-proof navigation, as you said.
    Take care,
    Trai

Maybe you are looking for

  • OR Operator...Help!

    Hi All, I need some help concerning using the "OR" operator in an SQL statement to query a database. If I run the query in the query editor, all works well. However, when I deploy the project, this is the error I get: Exception Details:  org.apache.j

  • Opinions?  Do you let 2003s camp out in spacious 2007s?

    Hi Everyone, Just out of curiosity, am I the only one late to the game in discovering that the definition of sdo_gtype 2007 allows single polygons, what I would call a "2003" to validly live inside a geometry defined as sdo_gtype 2007? When you see a

  • Find value that in screen

    hi, where i can find ( I NEED TABLE name ) Equipment type description , its in transaction as03 ->allocations -> right to field Equipment type we have description i try with f1 but i get structure where i can find it (which table)? Regards

  • Error in writing clob

    Hello, there is a problem on a java application when it try to insert a clob data. The error is java.sql.SQLException: Invalid argument(s) in call at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:187) at oracle.jdbc.dbaccess.DBError.thr

  • IPhone 4s hot and decreases charge percent when on charge?

    My iphone 4s has been getting really hot whilst on charge and increases percentage and then decreases. E.g. it goes to 20% then down to 4%. I have had my phone for a year now and I charge it most nights while i am asleep.