Deleting lines in a table with a button

Good day all.

I seemed to have encounter a problem with trying to add a delete button in a table that deletes a row. Let me expain.

The form contains 1 table that has 7 elements composed of fields of text and drop downs. This table is in its own subform.

There is a button to add lines that the user needs. The code I use to add lines: psl_list_subform.instanceManager.addInstance (1);

I was asked to add a delete for a user button can delete rows. I added this at the end of the table. SO whenever a row is repeated, there's a button Delete. The code I am "trying" to use is;

Table4.Row1.instanceManager.removeInstance (this.parent.index);

When I click on the button Delete, nothing happens. I grew up the JavaScript debugger, there is no errors.

Any ideas what I missed.

Thank you all

Chomp

Hello

my understanding of your form, you can add new instances of the "psl_list_subform" subform that contains a single table row.

The hierarchy that resemble 'psl_list_subform. Table4.Row1.removeButton ".

To remove an instance of the subform, a button in the row of the table, the script needs to refer to the 3rd parent of the button Delete.

this.parent.parent.parent.instanceManager.removeInstance(this.parent.parent.parent.index);

Explanation: this = Radiobutton2, 1 parent = Row1, 2nd parent = table 4, 3rd mother = psl_list_subform

Tags: Adobe LiveCycle

Similar Questions

  • Add a line in a table with a button

    Good day to all;

    I think I have now lost...; >)

    Life cycle of Designer 8.05

    In any case, if the user of the form requires additional lines to enter the infoamtion, I want them to be able to add a line using a button. I tried to use the following

    "

    Table "N". Row2.instanceManager.addInstance (1); = "N" is the name of the table.

    I did it on a couple other forms but I must be missing something that I get the following error in Consol java

    "GeneralError: failed the operation."

    XFAObject.addInstance:1:XFA:form1 [0]: #subform [0]: #subform [1]: Button1 [0]: click

    The item [max] has violated its number of occurrences. »

    The form is registered as a form Arcobat 8 dynamic XML

    I have

    1 page is sent

    Subform is cast

    Someone would be kind enough to point me in the right direction.

    Thank you all

    Chomp

    Eventually, you forgot to put the line to be reapetable.

  • Remove a line of table with a button in Livecycle Designer SS3

    I have a table in Livecycle which includes 16 static lines. Several lines can be added or removed dynamically at the end of the table.

    I want the user to be able to remove one of the static lines if they want to however I can't get the script to work.

    I have a button at the end of the line with the script:

    driverTable._Row2.removeInstance (true);

    I tried various forms of this script such as do not use the abbreviation for 'instanceManager', leaving 'real' outside, etc. Where it says 'Row2' I would like to use this script for the following lines, Row3, etc. Row4.

    I tried with the initial counter value of 1 and tried to zero. The table is in a fluid subform.

    Can anyone help?

    Hello

    A line cannot be set to 0 cases, if you want to remove a line, you need to hide by using its property of presence...

    But if you use 1 table for 16 different ranks, why don't you set the table with dynamic lines and have an initial 16 meter, then you can delete the lines you want with the removeInstance method

  • I have a table with a button to add a line. Works fine except when the page is full, will not exercise in another page. Just gives me a blank page.

    See the image below. The figure is the view with the button. Figure 2, this is what happens when the expense to the other page, but failed to add more rows. In fact, it goes backward.

    FIGURE 1

    Capture01.PNG

    FIGURE 2

    Capture02.PNG

    Make sure to the table, you check the box "Allow the page break in content" under object-> Table

    ~ AEK

  • Remove the current instance of a line in a table with formcalc using removeinstance

    I'm new on this and to find most of my answers with the help of Adobe or some other resources I have but this one left me speechless.  I have a table and a button to add lines.  After the lines are added and filled I need users to be able to delete some of them.  I have a delete button added to the last column of the table and the button strives to remove an instance of the table, the problem is that the instance that is being removed is evil, is always the first step on the line that the button is in.  If anyone can help, here's what I have:

    Table1._Row1.removeInstance (1)

    I know that 1 is not fair, but what I do to delete the current line that the button is.

    Thank you!

    Hello

    The setting for the done removeInstance() refers to the index of the repeat line you want to delete. This is a base zero index.

    If you replace the 1 in media with:

    This.parent.index

    It shoul work.

    See an example here: http://assure.ly/gk8Q7a

    Niall

  • Clear/clear to clear the line in the table region forward button

    Hello
    IAM using region table in advance for items on the level line.


    If I press the button for a line of AddAnother he is setting fund new line to add records, once if I click on add another line button, I don't have control to erase/delete the record. If anyone has example code, please share.

    Thank you

    Try with this

    public void deletelines(String LineId)
    {
    getOADBTransaction().writeDiagnostics(this, "In the delete Method LineId==>" +LineId, 1);
    OAViewObject vo = getXxafpEepStageRebateLineVO1();
    XxafpEepStageRebateLineVORowImpl rowi = null;
    int fetchedRowCount = vo.getRowCount();
    getOADBTransaction().writeDiagnostics(this, "Row Count is =>" + fetchedRowCount, 1);
    RowSetIterator selectIter = vo.createRowSetIterator("selectIter");
    Connection conn = getOADBTransaction().getJdbcConnection();
    try
    {
    if (fetchedRowCount > 0)
    {
    selectIter.setRangeStart(0);
    selectIter.setRangeSize(fetchedRowCount);
    for (int i = 0; i < fetchedRowCount; i++)
    {
    
    getOADBTransaction().writeDiagnostics(this, "in the foor Loop" + i , 1);
    rowi = (XxafpEepStageRebateLineVORowImpl)selectIter.getRowAtRangeIndex(i);
    String voLineId = rowi.getLineId()+"";
    getOADBTransaction().writeDiagnostics(this, "voAssignmentId && tableAssign id is "+voLineId "," LineId, 1);
    if(LineId.compareTo(voLineId) == 0)
    {
    // This performs the actual delete.
    rowi.remove();
    getTransaction().commit();
    break; // only one possible selected row in this case
    }
    }
    }
    }
    catch(Exception e)
    {
    e.printStackTrace();
    }
    selectIter.closeRowSetIterator();//Here we close the rowSetIterator
    }//deletelines end
    

    Thank you
    AJ

  • Deleting line of advanced Table region

    Dear members,

    I have an OFA Page where I use Advanced Table region to display the data in a table.

    As soon as the page opens I displays a single line in the area of advanced table. In this area, I also gave a button called + (using the feature of ADVANCED TABLE COMPONENTS, FOOTER, TABLE FOOTER, ADD TABLE ROW) add one MORE LINE.

    So when the user clicks on this button a new row will be added. Now, if the user wishes to remove how do I achieve this.

    Please please help me in implementing this feature.

    Thanks in advance.

    Best regards
    Arun D. Reddy

    Hi Arun,

    You must first create a button or image called Delete on your advanced table region.
    Action type: firePartialAction
    Event: remove

    Then in your CO PFR, write the code below

        if ("delete".equals(pageContext.getParameter(EVENT_PARAM)))
        {
          String rowRef = pageContext.getParameter(OAWebBeanConstants.EVENT_SOURCE_ROW_REFERENCE);
          OARow row = (OARow)am.findRowByRef(rowRef);
          row.remove();
        }
    

    I hope this helps. :)

    Thank you
    SK

    Published by: SK February 9, 2011 17:21

  • Need to create a new line in the table with the same data as the primary key, but new PK

    Hello gurus,

    I have a table with a column as a primary key, I need to create a new row in the table, but with the same data in one of the lines, but with different primary keys, focus a double row with key primary diferent...

    Any ideas of how it can be done without much complication?

    Thanks in advance for your answer.

    Agress,
    Karim idrissi

    user9970447 wrote:
    Hello gurus,

    I have a table with a column as a primary key, I need to create a new row in the table, but with the same data in one of the lines, but with different primary keys, focus a double row with key primary diferent...

    Any ideas of how it can be done without much complication?

    Thanks in advance for your answer.

    Agress,
    Karim idrissi

    something like

    insert into mytable values ('literal for new pk',
                                           select non-pk-1,
                                                    non-pk-2,
                                                    non-pk-n
                                           from mytable
                                           where pk-col = 'literal for existing pk')
    
  • As a table with search button

    Hi all

    I have a table with the columns form: en Id Type_email
    E-mail type can have some values.
    I also made a page, named «Type-email search» element
    This article is a list of selection with certain values that can have the Type_email column.
    When I select one of the values, only the rows with this value should be included in the tabular presentation.
    Is someone can you please tell me how I can do?

    Thank you much in advance.

    Set up your report by adding this in your WHERE clause.

    SELECT ...
      FROM ...
     WHERE TYPE_EMAIL = :PX_TYPE_EMAIL
        AND ...
    

    As long as the value of return in your list of values is the datatype of the column in the report, you will have a match.

    Now, if you want to get a bit more fancy, you can also make your limited report If the limit value is set and if not, it will include all. The NVL command converts to:

    SELECT ...
      FROM ...
     WHERE TYPE_EMAIL = NVL(:PX_TYPE_EMAIL,TYPE_EMAIL)
        AND ...
    

    In this example, if your selection value returns null, you will get all values in your database, but if user selects something in the drop-down menu, you will see those. These types of selection lists are very practical for users.

  • How to remove line before Panel table with databases?

    Hi friends,

    I created the table creation of database for the list of users. Which works very well. And I also recover data that is I've stored previously and I have displayed in table format on the front. Now, I want to delete a whole line, is not a wise order, for example, now, I have a table, there total 7 rows and 5 columns. Now, I want to delete the 3 rows using by selecting the line (i.e., click anywhere in this line and press the button) that day that the rank will be remove from the database. Then remaining will again store in the database.

    I want this way is it possible or not?

    Thanks

    Concerning

    Joel M

    India

    Note: I use the LabVIEW database connectivity toolkit

    Database: Ms access

    Sorry for my grammatical error

    arun575 wrote:

    Hi friends,

    [...] Now, I want to delete the 3 rows using by selecting the line (i.e., click anywhere in this line and press the button) that day that the rank will be remove from the database. Then remaining will again store in the database.

    Instead of storing data in the database, simply remove the record that you have removed from your FP indicator and recharge the light on the database.  (The first column in my database is named ID - autoindexed, the primary key)

    EDIT - only sub blue-vi is https://lavag.org/files/file/60-array-point-to-rowcol/

  • deleting line of AF: table, using window note as confirmation

    Hi Experts,

    I use JDev 11.1.1.4. Here, I have a requirement that I have to create af:table in which a column should be remove the image and clicking on this image will open 'window of note' that will ask the user for confirmation if user confirm and then delete the line.

    is it possible to use the "note" as a confirmation. How to customize the 'window of note' to show the buttons(yes,no) conformation in side it?

    Help, please

    Hello

    have you tried dragging a control element in the note window? Sometimes by train is easier than to ask. Drag an af:popup, add an af:noteWindow and an af:commandButton. You can launch the Java popup.

    Frank

  • Simple table with radio buttons

    Hi guys,.

    I have here a simple table that contains a number of option buttons.

    Option buttons must be grouped by three, (you can select either 0, 1 or 2 in each column)

    I am having difficulties to consolidate the buttons as such.

    The form is attached.  Can someone help me?

    Thank you

    Hello

    You need three boxes into a single cell. Drag buttons 2 and 3 in the Group 1 exclusion of radio on the second column in the view hierarchy. To simulate a table, turn on the top and bottom of the cell lines and off up and down lines on three boxes. Get the boxes of the same size option (it helps to have snap to grid off the coast), same book and aligned. Remove the two bottom lines, and it should look like a table again.

    Good luck

    N.

    PS: If users are going to fill this in hand, you can follow the example of Jono and have radio buttons with a square and square hollow brand. The place is more intuiative on the page and even on the screen that the place stands out more against the choice of the user. I understand that the use of sunken places working against practices of the circles for the exclusion, but with your form groups, I suspect that clarity is important because the choice is perhaps "health"; "have you made a will? "beeeeeeeeep!" ;-)

  • Delete data from a table with joins

    Hey guys,.

    IV struggled for a while with a sql now.
    I'm trying to remove some data from urole based on the www.lesormes.com in the select part.
    The selection is correct, but the part delete Deletes all data in the table urole and not only those found in the select.

    How can I delete all data by using a join?


    DELETE FROM urole
    WHEN THERE IS)
    SELECT *.
    User JOIN urole
    ON user.userid = urole.userid
    AND user.audit_version = urole.audit_version
    JOIN secrole
    ON urole.roleid = secrole.roleid
    WHERE user.audit_current = 'Y '.
    AND secrole.audit_current = 'Y '.
    AND IN secrole.rolename
    ('X',
    « Y »,
    « Z »,
    ));

    Thanks for your help in advance!

    Hello

    Welcome to the forum!

    Chances are, you don't want to join in the subquery EXISTS of EPM; It is more likely you want just like this correlated subqueries:

    DELETE FROM urole
    WHERE  EXISTS (
                      SELECT  0
               FROM    user
               WHERE   user.userid      = urole.userid
               AND     user.audit_version = urole.audit_version
               AND     user.audit_current = 'Y'
               )
    AND    EXISTS (
                      SELECT  0
               FROM    secrole
               WHERE   secrole.roleid         = urole.roleid
               AND     secrole.audit_current = 'Y'
               AND     secrole.rolename          IN ( 'X',
                                                        'Y',
                                          'Z'     -- No comma here
                                           )
               )
    ;
    

    or maybe an IN subquery:

    DELETE FROM urole
    WHERE   p_key  IN
                (
                SELECT  urole.p_key
                FROM    user
                JOIN    urole     ON     user.userid          = urole.userid
                                      AND     user.audit_version      = urole.audit_version
                JOIN    secrole     ON     urole.roleid           = secrole.roleid
                WHERE   user.audit_current     = 'Y'
                AND     secrole.audit_current     = 'Y'
                AND     secrole.rolename      IN ( 'X',
                                                     'Y',
                                       'Z'
                                     )
                )
    ;
    

    where p_key is a unique key (not necessarily a single column) of urole.

    It's just a guess; That's all I can do with the information you have posted. Test this carefully before to try it on your actual data.

    Whenever you have a problem, it allows to post a small example of data (CREATE TABLE and INSERT statements) and the results desired from these data.
    In the case of a DML (such as DEL) problem, the sample data must re - create the tables as they are to the DML, and the results will be the content of the modified table (urole) after the DML.

    Furthermore, there is a built-in function called user, the user is not a good name for a table.

  • Compare a line in a table with no line

    How can I compare jspx, the actual line with the prevoius in a page?

    Thank you very much.

    all with an EL expression if possible.

    It is not - there is no EL for "the previous row.

    John

  • Adding a table with a button, how to specify the location?

    I have a form of have been a table is duplicated by using a button and the instance script Add.  Is there one had to specify which direction or location of the table is added.  I guess that by default it is created as the original table.  I would like that it is created to the right of the original table.  This option can be changed or scripted somehow?  Thank you

    Hello

    If you repeat the whole table, it is within a subform flowed. The default value is cast from top to bottom. If you change this Western style, objects will be flowing from left to right.

    However, it is because there is the space to the right of the form to receive the new instance.

    Here are some examples:

    https://Acrobat.com/#d=aFfqJJrwjDbVOuT96bD8Ug

    https://Acrobat.com/#d=4QBgZy0pBIV9IoMlKP0lRg

    Good luck

    Niall

Maybe you are looking for

  • Problem with my keyboard on P25

    I have experience problens with my satellite P25 keyboard... it is not allways, but sometimes when I press the S key, it displays SX... the same thing happens with other keys also, like; outputs; [d outputs dc... When this happens, if I move the note

  • Satellite U500-17F: problems with the new HARD drive

    Hi everyone, I got some troubleshooting with my Satellite and a new drive, I bought recently, because that is already damaged because of too many bad sectors. One is a Western Digital Scorpio Black 320 Bg (WD3200BEKT model number). It should be a fas

  • HP_15-af001au_Laptop: brightness keys not working not

    Hello. I use HP_15-af001_au. I installed windows 7 32 bit of the system. But my brightness keys do not work. Help, please!

  • P1100 printer margins have become smaller. Help!

    Hello I have a Photosmart P1100 printer that works fine with Windows 7 after I finally found a printer driver that would manage this old printer.  I use the HP1220C driver and it works beautifully!  However, yesterday I tried printing a portfolio of

  • On a 30 day free trial... Help!

    On a 30 day free trial... Dreamweaver has worked lately, but today will not load properly, simply display a gray screen... Why?