Navigate to pressed button in multirecord block

Hi,
I'm using Forms 6i (6.0.8.27.0), Client / Server.
I have a multi-record block with a button ("+") in the block for duplicating the record and increasing the date.
So each row has a "+" button.
When I press the "+" eg. on the 3rd row I want to navigate to this row and to execute the code in when-button-pressed trigger.
So I wrote in the when-button-pressed trigger
"GO_RECORD(:system.mouse_record);
duplicate_record;
Unfortunately :system.mouse_record is set to 1, also :system.cursor_record and :system.trigger_record.
The "Mouse Navigate" property of the button is set to "yes".
I have used the search function but didn't found a solution.
Thanks in advance,
Marco.

Marco,
My apologies, I should learn to read all of the message. I am embarrassed into having another try.
Firstly, to clarify
I am using Forms10g (sorry but it was the only one I could remove a developer from)
Duplicate_Record: Copies the value of each item in the record with the next lower sequence number to the corresponding items in the current record. The current record must not correspond to a row in the database. If it does, an error occurs.
I have setup a default block with a button on it and to test I have just executed a query against the block.
After rows have been retrieved
When I click on a button system.mouse_record always returns 0 (In the help it says this will be the case if you are not in an item, but I do not know if a button is classed as an item in the eyes of the help test author, I thought it might be, but maybe they mean a text item?) when I use :system.trigger_record I always get the right record number.
For duplicate_record to work I have to be in a "NEW" record. I appear to be able to do this in two ways.
Go to the bottom of my records + 1. The button becomes enabled and when I press it I can duplicate the record above.
I can choose "insert record" (key-crerec I think or create_record) if I do this I can then press the button and duplicate the record above into this new record.
If I press a button on a record which already has a record I presume of type QUERY then when I press the button I get FRM-41802 duplicate record function allowed on new records only.
If I do not perform a query in the block; I create the first record input data I have to move to the next record to enable the button
If I press the button it duplicates the value in the first record
If I change the value in the second record and then go back to the first and press the button on the second row it overwrites the value with the value from the first row
I hope this gives you some pointers in solving your problem.
Apologies again for not reading properly and I hope that my using 10g has not made all this info useless.

Similar Messages

  • Push Button in Multirecord block and Record Number

    Hi All,
    I have a push button in Multirecord block.
    for eg. there are 5 records in that block and cursor is on 1st record. if users pressess the push button on 3rd record (or other than 1st record) i want to get that 3rd record number. i am not able to get this. i checked :system.trigger_record, cursor_record, mouse_record values but it is not working correctly.
    what code should i write in when-button-pressed trigger to work it the way i want.
    can anybody help.
    regds

    Yes i got it
    Re: multi-record push button
    set mouse navigable property to true for push button and you get the :system.trigger_record value.

  • Multirecord block & when-button pressed

    Forms10g
    In a multirecord block there's a button displayed for each row.
    Problem is:
    Focus doesn't change to the row where button is pressed before executing the "w-b-p" trigger logic and therefore correct context information is not passed !
    I've tried to get form to synchronize:
    synchronize;
    go_record(:system.trigger_record); and also
    go_record(:system.cursor_record);
    but system variables are not being set before executing "w-b-p trigger" ?
    HAs anyone got a workaround for this ?
    Thanks
    Pete

    Set the Mouse Navigate property to TRUE/YES on the button

  • Disable button when no records in multirecord block.

    Hello,
    In a tabular multirecord block we have a button that will open another window for the selected row. The problem is that when there are no records in the multirecord-block, the first line is still selected, and the pushbutton is enabled. This will cause an error when the user press the button when there are no records. Adding code to the button will of course take care of the error, but it is still enabled. How do we disable the entire line when there are no records?

    how about - directly after querying the master record...
    go_block(<block>)
    if :blk.key (or :blk.rowid) is null then
      SET_ITEM_PROPERTY('<buttonname>',enabled, property_false);

  • I'm running Safari 6.0.5 - Mac OS 10.8.4 -- when I load my gmail the block around the DELETE and MOVE tabs are not usable - press buttons but nothing happens. ???

    I'm running Safari 6.0.5 - Mac OS 10.8.4 -- when I load my gmail the block around the DELETE and MOVE tabs are not usable - press buttons but nothing happens. ???
    I can see the block (flashes) and the buttons are no longer usable.
    I have Empted Cache but doesn't seem to help.

    From the Safari menu bar, select
    Safari ▹ Preferences ▹ Extensions
    Turn all extensions OFF and test. If the problem is resolved, turn extensions back ON and then disable them one or a few at a time until you find the culprit.
    If you wish, you may be able to salvage the malfunctioning extension by uninstalling and reinstalling it. Its settings will revert to their defaults. If the extension still causes a problem, remove it permanently or refer to its developer for support.

  • Showing 10 records at a time in a multirecord block

    Hello,
    I have a requirement to show 10 records at a time,consider a table in which
    there are 100 records which is associated to a multirecord block,in order to have a web look and feel I need to show first 10(1 to 10) record on load,when the user presses the button "Next 10 records", I need to replace the first 10 records with new set of 10 records(11 - 20),
    Please note that no of records to be displayed at a time will be 10 and our requirement is avoid scroll bar.
    Any suggestions as to how I need to accomplish the task above.
    Thanks and Regards
    Mohan

    You don't need a special button for this because the user can already navigate using the cursor keys and page up/down keys.
    For cursor keys use the key-up, key-down, key-nxtrec and key-prvrec triggers.
    For page up/down use the key-scrup and key-scrdown triggers.
    I suppose the menu option "Query > Fetch Next Set" (key-nxtset) should operate the same as page down.
    An example of the key-scrdown trigger is thisdeclare
         numrecs integer := get_block_property('EMP',records_displayed);
         toprec integer := get_block_property('EMP',top_record);
         thisrec integer := :system.trigger_record;
    begin
         go_record(toprec + (2 * numrecs) - 1);
         go_record(thisrec + numrecs);
    end;This will advance by as many records are in the block and leave the cursor positioned on the same record relative to the top of the block. Eg if there are 10 rows in the block and you're on the first set then the top record will be 1 and you want to make the new top record 11. So you need to call go_record(20), which makes that the bottom record and 11 the top one.
    You'll need to work out how the form should behave when the number of records in the block is not exactly divisible by the number of records in the data because forms won't allow blank records to pad out the bottom of the block and records_displayed isn't a settable property at runtime. So if there are 10 rows in the block and 103 rows of data then the penultimate page will show records 91-100 and the last page will show records 94-103. Should scrolling back up show record 91 at the top, or 84?
    For the key-down/key-nxtrec trigger you'll probably want something like thisdeclare
         numrecs integer := get_block_property('EMP',records_displayed);
    begin
         if :system.last_record != 'TRUE' then
              if mod(:system.cursor_record,numrecs) = 0 then
                   -- last record in this set
                   go_record(:system.cursor_record + numrecs);
                   go_record(:system.cursor_record - (numrecs - 1));
              else
                   next_record;
              end if;
         end if;
    end;If you're at the bottom of one set it will show the next set and go to the top record, otherwise it will just go to the next record. But again, this breaks down when the number of rows in the block and in the data don't divide up evenly.
    I hope this is enough to get you started.

  • Jump to one defined record in multirecord block

    Hello.
    I have a multirecord block.
    ex:
    rec, day, text
    rec1, day1, text1
    rec2, day1, text2
    rec3, day2, text1
    rec4, day2, text2
    rec5, day2, text3
    rec6, day3, text1
    User can select any record in that block. But when he presses one button, form should first jump to first record of that day, then execute everything else in that trigger.
    If the user is in record:
    rec5, day2, text3
    form should jump to record:
    rec3, day2, text1
    If the user is in record:
    rec2, day1, text2
    form should jump to record:
    rec1, day1, text1.
    And so on.
    Is there a way to do that?
    Thanks.

    Another technique ...
    Declare
         v_Day Table.Field%Type;
    Begin
         v_Day := :Rec.Day;
         Previous_Record;
         Loop
              if :Rec.Day <> v_Day then
                   Next_Record;
                   Exit;
              else
                   Previous_Record;
                   if :System.Cursor_Record = 1 then
                        Exit;
                   End if;
              End if;
         End Loop;
    End;
    Best regards
    R E H A N M I R Z A

  • One press button selection/activation?

    Just wondering if it's possible for a button to be selected/activated at the same time. In other words if you have a menu with three buttons and you press the left directional key on the remote, it will navigate to then activate the button taking you to the target clip without the need to press the enter key. Hopefully this can be done without scripting, but either way any help will be appritiated.
    Thanks

    Yes, this is possible - what you do is set the button to 'auto-activate' in the property inspector. When you navigate to the button it will send you straight on to the target without any further intervention on your part.

  • Mouse navigate property of button

    What is mouse navigate property of button?
    When we can use it ?

    Try this:
    1. Create a Button in a form.
    2. Select the Mouse Navigate property of the button in the Property Palette
    3. Press F1 to open Mouse Navigate Property help
    Basically, this property controls the cursor navigation for the button. When 'YES', Forms will physically move the cursor to the button before triggering the When-Button-Pressed trigger (there is a visual cue that the cursor is on the button). When 'NO', Forms will not move the cursor to the button, but will simply trigger the When-Button-Pressed trigger and the input focus (cursor) will stay whereever it was before you clicked on the button.
    Typically, I have used this property when I have a When-Validate-Item trigger on a field and button that will perform an action on the item (or other items) and I don't want to a Validation event in a field to occur when I click on the button. The point is, I want to execute the code behind the button, but I don't want the cursor to move to the button, I want it to stay where it is.
    Craig B-)
    If someone's response is helpful or correct, please mark it accordingly.

  • How can I get the screen to lock on my iPhone 4, so I don't press buttons while talking?

    I just upgraded to the iPhone 4.  When I am talking on the phone, the screen doesn't lock, so I am constantly pressing buttons or hanging up on the person I'm talking to.  How can I get the screen to lock while I'm talking?  It's driving me NUTS.

    The otterbox is one of the culprits. Take the phone out of the case and see if it still happens. If so it is not the case. If the problem goes away, then you may need to make the hole slightly larger. My family has three iPhone 4's in otterboxes and none have this problem. Other users on this forum have reported success with the above methods.

  • LV 8.6: programatically pressing button only works in some VIs, not all?

    Setup is an old labview 8.6
    I'm tasked with fixing some strange old engine test bench which has a ~1E-6 measurement drift.
    The "easiest" work around fix would be to run the mechanics to a bottom end point then press the "reset" measurement button automatically.
    !!:  A "drive" vi and a "measurement" vi has to be running at the same time. The drive vi will then periodically drive the test bench to a mechanical end point and reset the measurement vi. This would get rid of the drift.
    !!:  Both vi's must be started manually and running. I cannot start one vi from the other. It messes things up. I know not why. There seems to be some strange dependency over compiled FPGA code somewhere.
    I'm no lab view wizard. It was 20 years since I touched it last.
    So digging through examples on how to press a button in one VI from another VI I found this:
    https://decibel.ni.com/content/docs/DOC-15962
    Which I built into a sub-vi and a test setup to see if I could make it work on the test bench. With some tweaking it works.
    A test "master" vi can press any button in a test "slave" vi.
    However. It is impossible to press the "reset" button in the "measurement" vi.
    Labview reports no errors, it just doesn't execute the value change event as far as I can understand.
    In fact, I can copy exactly the same code from the working "slave" vi into the "measurement" vi and it stops working. !!??
    How can code work perfectly well in one vi but not in another ?
    The "measurement" vi has some sort of compilation requirements, meaning any change to the vi takes >30min to "compile" before it can be run. Can this have something to do with why remote button pressing doesn't work?
    It also interfaces with some FPGA somewhere, can that have something to do with it ?
    I have no clue. Happy for any help here.

    Here it comes -- WARNING -- ugly code, this is my first labview in 20 years and I'm very short on time.
    press-button.vi
      the sub vi I mangle up from the example (https://decibel.ni.com/content/docs/DOC-15962)
    master.vi
      the test event sender
    slave.vi
      the test event receiver
    measurement.vi
      the real vi, where no buttons can be pressed
    In master.vi you can reconfigure the input to press-button to which vi and button to target. Right now it is set for the test slave vi (I think) to verify that it actually works as intended in the test environment.
    Hmm, seems there is a limit to 3 attachments, will post the measurement.vi in next post
    Attachments:
    press-button.vi ‏15 KB
    master.vi ‏19 KB
    slave.vi ‏29 KB

  • Problem with cheek pressing buttons while on calls

    I have never had this issues before but since my upgrade I am having problems with the 5s pressing buttons such as mute, keys,etc during calls.

    I do not have a screen protector but do have a case (Lifeproof). I had a similar Lifeproof case with my other 4s and 3 iphones and did not have this issues. Could it be the Issue with Proximity Sensor during calls?

  • Change pressed button Color

    Hi,
    I want to change my pressed button Color and I haven't been able to find a way, I tried creating my own button and add a listener when it is pressed and then change its background color but it doesn't work! it works for enter and exit but not for pressed and released.
    any one has an idea?
    thanks
    Here's my code:
    package components;
    import javax.swing.*;
    import java.awt.event.MouseEvent;
    import java.awt.event.MouseAdapter;
    import java.awt.*;
    * JButton con una nueva propiedad de Color presionado
    * @author Ana Mar�a Franco
    * @version 1.0
    public class PressedColorButton extends JButton
        // Atributos ************************************************************************
        private Color unpressedButtonColor;
        private Color pressedButtonColor;
        // Constructores ********************************************************************
        public PressedColorButton()
            super();
            this.addMouseListener(new PressedColorButton_this_mouseAdapter(this));
        // M�todos **************************************************************************
         * Obtiene el color sin presionar
         * @return Color
        public Color getUnpressedButtonColor()
            return this.unpressedButtonColor;
         * Define el color sin presionar
         * @param nuevoColor Color
        public void setUnpressedButtonColor(Color nuevoColor)
            this.unpressedButtonColor = nuevoColor;
         * Obtiene el color presionado
         * @return Color
        public Color getPressedButtonColor()
            return this.pressedButtonColor;
         * Define el color presionado
         * @param nuevoColor Color
        public void setPressedButtonColor(Color nuevoColor)
            this.pressedButtonColor = nuevoColor;
        public void this_mouseExited(MouseEvent e)
            this.setBackground(unpressedButtonColor);
        public void this_mousePressed(MouseEvent e)
            this.setBackground(pressedButtonColor);
        public void this_mouseReleased(MouseEvent e)
            this.setBackground(unpressedButtonColor);
        public void this_mouseEntered(MouseEvent e)
            this.setBackground(pressedButtonColor);
    // Escuchadores *************************************************************************
    class PressedColorButton_this_mouseAdapter extends MouseAdapter
        private PressedColorButton adaptee;
        PressedColorButton_this_mouseAdapter(PressedColorButton adaptee)
            this.adaptee = adaptee;
        public void mouseExited(MouseEvent e)
            adaptee.this_mouseExited(e);
        public void mousePressed(MouseEvent e)
            adaptee.this_mousePressed(e);
        public void mouseReleased(MouseEvent e)
            adaptee.this_mouseReleased(e);
        public void mouseEntered(MouseEvent e)
            adaptee.this_mouseEntered(e);
    }

    Swing related questions should be posted in the Swing forum. Try setting the following properties on the button:
    setContentAreaFilled( false );
    setOpaque(true);

  • Multirecord block on a tab page leaves empty space

    Hi,
    When I generate a tabpage with a multirecord block from Designer10G there is always a 'big' gap of space on the right side of the multirecord block.
    Is there a preference which i overlooked to make this space smaller, because i have changed all possible layout preferences without any result.
    regards, richard

    You can change stacked canvas margins and block margins to zero, but I still have big space on the right side of the form, this space can hold 3 or 4 character if it is used.

  • Problem with multirecord block

    Hi every one
    I have multirecord block in form conten 2 textitem A & B
    and i have checkbox .
    i need when i check the checkbox set instance item A Enable and item B Disable
    and vice versa
    the problem is when i check the checkbox all instance of item enable or disable
    but i want that instance what I foucs on .

    You can't disable/enable an individual instance of a multi-record item.
    What you CAN do is use SET_ITEM_INSTANCE_PROPERTY to set INSERT_ALLOWED, UPDATE_ALLOWED and VISUAL_ATTRIBUTE. To disable, set up a visual attribute that mimics a disabled field, and set INSERT_ALLOWED and UPDATE_ALLOWED to false. If you don't want them to be able to click or tab the cursor into the field create a pre-text-item trigger on the items that checks the value of the checkbox and raises form_trigger_failure if this field should be disabled.

Maybe you are looking for