Trouble with Deleting Table Headers

Hi NI community,
I need your help with deleting the row headers of a table.
The first time the program runs everything is OK.
However, when the user sets a new number of tests and clicks the ‘Run Again’ button the old row headers not only are not being deleted but the new ones are appended under them.
I would like the entire table, headers including, to be deleted and the new results to be displayed starting from the top of the table.
I am attaching a sample program.
Thank you in advance for your help.
Solved!
Go to Solution.
Attachments:
TableHeader.vi ‏40 KB

You need to initialize your first shift register )inside the first sequence frame).
Even better, simply use autoindexing to create the array, no shift register needed.
Also note that writing the header does not belong in a loop, writing them once is sufficient. Use the proper datatypes. For example the number of trials is an integer. You have way too many unecessary local variables and sequence structures. most are not needed.
LabVIEW Champion . Do more with less code and in less time .
Attachments:
Write Headers.png ‏6 KB

Similar Messages

  • Trouble with RFC table input

    Greetings Experts,
    I'm having trouble with calling an RFC with table input.
    Here is my code so far:
      public void executeZps_Fm_War_Mat_Update_Input( )
        //@@begin executeZps_Fm_War_Mat_Update_Input()
              //$$begin Service Controller(344531631)
              IWDMessageManager manager = wdComponentAPI.getMessageManager();
              try {
                   int size =
                        wdContext
                             .nodeZps_Fm_War_Mat_Prefill_Input()
                             .nodeWarOut()
                             .nodeEx_Warout()
                             .size();
                   for (int i = 0; i < size; i++) {
                        IPublicWARComp.IEx_WaroutElement srcElement =
                             wdContext
                                  .nodeZps_Fm_War_Mat_Prefill_Input()
                                  .nodeWarOut()
                                  .nodeEx_Warout()
                                  .getEx_WaroutElementAt(i);
                        IPublicWARComp.IIm_WarmatinElement trgElement =
                             wdContext.createIm_WarmatinElement(
                                  new com.kaisa.mwci.models.updatezpsmur.Zps_War());
                        WDCopyService.copyCorresponding(srcElement, trgElement);
                        wdContext
                             .nodeZps_Fm_War_Mat_Update_Input()
                             .nodeIm_Warmatin()
                             .addElement(
                             trgElement);
                   wdContext
                        .currentZps_Fm_War_Mat_Update_InputElement()
                        .modelObject()
                        .execute();
                   wdContext.nodeOutWarMatIn().invalidate();
              } catch (WDDynamicRFCExecuteException e) {
                   manager.reportException(e.getMessage(), false);
              //$$end
        //@@end
    I can call the RFC, it actually returns a value, but not one that I expect. I think the table data is not being passed at all?
    Ideas will be greatly appreciated. Thanks!
    Cheers,
    Alfonso

    HI
          try for external debugging of you RFC , and whether you are able to pass you data to the RFC ,
           public void executeZps_Fm_War_Mat_Update_Input( )
        //@@begin executeZps_Fm_War_Mat_Update_Input()
              //$$begin Service Controller(344531631)
              IWDMessageManager manager = wdComponentAPI.getMessageManager();
              try {
                   int size =
                        wdContext
                             .nodeZps_Fm_War_Mat_Prefill_Input()
                             .nodeWarOut()
                             .nodeEx_Warout()
                             .size();
                   for (int i = 0; i < size; i++) {
                        IPublicWARComp.IEx_WaroutElement srcElement =
                             wdContext
                                  .nodeZps_Fm_War_Mat_Prefill_Input()
                                  .nodeWarOut()
                                  .nodeEx_Warout()
                                  .getEx_WaroutElementAt(i);
                        IPublicWARComp.IIm_WarmatinElement trgElement =
                             wdContext.createIm_WarmatinElement(
                                  new com.kaisa.mwci.models.updatezpsmur.Zps_War());
                                              // here instead of creating a element ,  there would be some Class
    created for IIm_Warmatin  , so you can create a instance for this class and set the 
    source data element to the target .
                   ZIIm_Warmatin   target = new IIm_WarmatinElement();
                      target.set(...);
                     wdcontext.nodeIIm_Warmatin.bind(target);
       try this .          or  you can set the source data to the element created for the target .
           hopefully should work
                   wdContext
                        .currentZps_Fm_War_Mat_Update_InputElement()
                        .modelObject()
                        .execute();
                   wdContext.nodeOutWarMatIn().invalidate();
              } catch (WDDynamicRFCExecuteException e) {
                   manager.reportException(e.getMessage(), false);
              //$$end
        //@@end

  • Im having trouble with deleting photos, help :(

    Hi, well im quite new to this but im having major problems with deleting pictures. Im able to delete the ones i have took from my ipod but cant delete the ones i have synced from the laptop to my ipod. Also i can view them on the ipod and not on the laptop. If anywan can help it would be more than appreciated. Thanks :-(

    Thanks that really helped, well iv got another problem now. When i go on photos im able to see my pictures i put in my ipod through the laptop 'ipod cache photos' which im happy about but iv got another folder called 'photo library' with the exact pictures as 'ipod cache photos'. Now i wanted to know what folder is meant to be there and also how to delete the one thats not meant to be there. Thanks

  • Help please.  Trouble with a table

    Hi All.  Hope you can help.  Looked through the Q & A but it's all about CS4 so no good to me as I have CS3.  I am new to DW and trying to start my site.  I inserted a table with 1 x row and 2 x columns.  I first made the left column 160 px wide, and the rest for the main body.  Inserted a graphic at the top of the left column to head the menu.  Then I tried to insert another graphic into the body (right column)  I could not place this graphic at the top because the cursor would only go half way down the image on the left.  I tried doing various things and one image would go up and the other down or vice versa.  It's driving me nuts :-))  Does anyone have any idea what I am doing wrong please?
    Also, does anyone know of a site where I can get good tutorials in CS3 please/, without it costing me a small fortune.  TIA
    Regards
    Jon

    With your cursor in the table cell, set the verical alignment to Top in the properties panel.  That will ensure that any images or text you place within that cell stays at the top no matter how the cell or table expands.
    And not to be disrespectul in any way, this is a pretty basic function of table layouts.  You are sure to run into many more troubles along the way unless you study up on tables and how they work in DW.  So instead, I agree with the above response - you're going into a learning curve anyway, so you may as well apply it to CSS - I think things will even go quicker for you that way and you'll be building sites using the current and better technology.

  • Trouble with two tables and persistence

    Hi all,
    I would need your opinion on this:
    I have two tables:
    Table User (UID(PK), Uname, Pword)
    Table Choice (CID(PK), UID(FK), Cname, Cparameter1, Cparameter2)
    I have tried to put both together into one entity as described in: http://en.wikibooks.org/wiki/Java_Persistence/Tables#Example_mapping_annotations_for_an_entity_with_multiple_tables
    However, the trouble is that it doesn't work as I have hoped. I am unable to insert data into the user table alone, because it complains about missing entries for CID, Cname, etc...). I thought I would be able to query them independently, as 1 user can have many Choices.
    Any suggestions how to tackle this problem?
    Thank you.

    Ahh, I think I have figured out part of it but it isn't working yet. I created a view of the trk_user table. Now I need help with the code, I am trying to incorporate it here:
    SELECT webb.TRK_CALLS_VIEW.ID, webb.TRK_CALLS_VIEW.USER_, webb.TRK_CALLS_VIEW.ASSIGNED_TO, webb.TRK_CALLS_VIEW.PROBLEM, webb.TRK_CALLS_VIEW.SOLUTION, webb.TRK_CALLS_VIEW.STATUS, webb.TRK_USER_VIEW.lname, webb.TRK_USER_VIEW.fname
    FROM webb.TRK_CALLS_VIEW, webb.TRK_USER_VIEW
    WHERE
    ( STATUS = 'Open' and :P2_REPORT_SEARCH is null )
    or
    ( regexp_like( USER_ || '#' || ASSIGNED_TO || '#' || PROBLEM || '#' ||
    SOLUTION || '#' || STATUS, :P2_REPORT_SEARCH, 'i' ) )
    Can someone help me in the right direction

  • IPhoto '09 trouble with deleting photos

    I have a large amount of photos on iphoto. (13,000+) I am attempting to take them off.To make sure I have backups I first put them onto an external drive and also burn CD or DVDs. For some of my photos this has been successful. For a majority of them when I have backed up my photos satisfactorily I DELETE THEM by sending them to iphoto trash. I then empty the trash. The photos are gone. The number of photos in my iphoto drop. (My goal). When I close iphoto and come back a while later the photos I have deleted reappear and then number is high again. This has happened to several groups of photos. iPhoto won't delete them either in the iphoto trash or the regular trash. I have tried putting only 100 photos at a time in the trash. This didn't make any difference. WHAT SHOULD I DO to get rid of these photos so I can make more space iphoto? Why would they show up back in the library when they were deleted in the iphoto trash?????

    Welcome to the Apple Discussions.
    Because your database has been damaged.
    Option 1
    Back Up and try rebuild the library: hold down the command and option (or alt) keys while launching iPhoto. Use the resulting dialogue to rebuild. Choose to Rebuild iPhoto Library Database from automatic backup.
    If that fails:
    Option 2
    Download iPhoto Library Manager and use its rebuild function. This will create a new library based on data in the albumdata.xml file. Not everything will be brought over - no slideshows, books or calendars, for instance - but it should get all your albums and keywords, faces and places back.
    Because this process creates an entirely new library and leaves your old one untouched, it is non-destructive, and if you're not happy with the results you can simply return to your old one.
    Regards
    TD

  • Trouble with deleting mail in Gmail

    Before I upgraded to iOS 5 last night, when I deleted an email in gmail using the mail app on my phone, it would move it into the trash.  From here I could delete it out of the trash, and it would be gone for good.  Since I've updated, when I move an email to the trash and delete it, it moves it to my All Mail Folder.  I don't want it to do this.  Even if I go delete it back out of the All Mail folder, it will move it into the trash until I delete it from the trash and it moves it back into the All Mail folder.  There seems to be no way to get rid of the message for good.  I want it to be deleted permanently.  I have the Archive mail setting off under the settings tab for mail, contacts and calendar.  Is anyone else having this issue or know of a fix???

    Since a Yahoo account can be created and accessed as a POP account only with the Mail.app on your Mac, it shouldn't matter if you delete and manually recreate the account with the Mail.app on your new Mac. This will not affect all received messages that remain on the server even if the account is deleted with the Mail.app on your other Mac, which I don't beleive it will. You can temporarily disable syncing with your MobileMe account on the other Mac before deleting and manually recreating the account with the Mail.app on your new Mac and then re-enable syncing with MobileMe on the other Mac after doing so.

  • Why does Java have so much trouble with deleting files

    So, I've been doing alot more code on the file-level and have been noticing that Java is really terrible at deleting files. This should be rather straightforward, but the delete method can fail in so many ways, it's unbelievable. Even with taking special care to close all streams, it will sometimes just not do it, or even return a "Yes I've deleted it" result and the file is still there! (deleteOnExit() suffers the same affliction)
    This problem is even scuttling the otherwise trusty Ant, which is really annoying. Ever seen this? "BUILD FAILED: Could not delete 'myproject.jar'" So any Ant-driven automated build-and-test process can fail because of this super-avoidable error. (We have to code a pre-build-jar-deletion shell script, which is annoying when jars are added/deleted/renamed for whatever reason.)
    Does anyone know the reason for this? I'm really curious.
    Maybe, in 1.5, they will come out with "File.crushAndDestroyWithMercilessPrejudice()". I'd use it all of the time! :)

    I had the same problem when I was working with JAI. I had about a half million images that I made a viewer for, which would allow our users to do away with microfiche. Project worked great, but the files wouldn't delete off the user box (Win2K). I checked everything and they just would not delete--windows would not acknowlege the resources had been released by Java.
    I finally took a lesson from MS developers and said: "It's not a bug, it's a feature!" I wrote it into the manual that it was a cache feature and would speed-up access to the images, yet delete the old ones (which it did, any images that were not accessed during the session would delete just fine, while any that were accessed would still be there next time for local access rather than hitting the network for them. The cache turned out to be one of the great features of the application.
    On the other hand, I've not had any problems deleting files from Linux.

  • Trouble with deleting music

    We've just had a new laptop so I have downloaded ITunes. When I've come to connect my Ipod Nano to it, it brings on the music but all the songs are 'greyed out' so I can't delete any.
    It is an old Ipod nano but should this make any difference? What am I doing wrong?
    Thanks

    What sort of "troubles" are you having? It might be that the songs you're seeing are stored in the cloud and not on the phone
    try Settings>Music and turn show all music off and see if you can delete after that

  • Trouble with deleting tracks on

    When I decided to delete an album from player, he has written that removal is impossible and after that all the time began to brake. I have removed all files,even standard music,photos and videos,then have loaded music again, but he again began to brake and not to answer. I turned off it from computer and connected again then there was suddenly all music on it'swhich i have on the computer(I did not load it all) and in songs which do not have album picture, began to be displayed the same picture. What should i do

    All the players have one as does yours. You don't try you don't have a working player. Now go follow the directions in this link & see if it helps you to get your player working againhttp://forums.creative.com/creativel...208606#M208606
    Buka9 wrote:
    No,I didnt because I cant do it.Dont know why.Maybe I misunderstood something?I bought my device in Russia.So maybe?this?recovery mode that you suggested for me?is impossible for my player?

  • Trouble with deleting message.

    I can't seems to delete off my massage. I tried deleting it, but somehow after I on off my phone, the message that I've deleted will appear again.

    Hi there Iphone5nae,
    I would recommend taking a look at the troubleshooting steps found in the article below.
    iOS: Troubleshooting Messages
    http://support.apple.com/kb/ts2755
    -Griff W.

  • Trouble with deleting files

    I have many files in the trash that is locked files. So I cannot empty my trash without unlocking them. How can I unlock all the files without having to unlock them separately? That will take very long time..

    I'm not sure if I understand completely what your problem is, but...
    Just try unlocking a few, and see what happens. I had a problem like this a while back, I only "unlocked" the first one and didn't do anything for the rest (even though it keeps asking you)... and it worked! So just try... otherwise, if you could explain a little better, we could understand a little better.
    Good Luck!

  • Problem with automatic table of contents Level headings

    I am having trouble with the Table of contents in Adobe Indesign. When I create my automatic table of contents one of the Level headings that is supposed to appear under Chapter 1 instead appears under the Introduction heading. On the actual page where the heading paragraph styles have been defined the 2nd Level heading is as it should be underneath Chapter 1. So what I end up having to do is move them manually in the TOC. But I don’t want to have to do this and it would be great if Indesign instead did the automatic table of contents correctly.
    I wonder if it has anything to with the fact that our template is set up with headings (that sit outside the body text to the left) as text boxes which we place inside the main body text box (they have anchored object settings on them so the heading sits off to the side).  Whilst the anchored text box is exactly in the right sequence, maybe indesign senses and reads the anchored text box last?
    I have an example of the file and the problem that is occurring in the pdf, it can be downloaded from:
    Is there a solution to this?  If anyone has any ideas I would be very grateful.

    I've been playing with this for a while, and quite honestly I don't understand why it's doing things the way it is. It's working correctly on Page 11, which seems to me to have exactly the same structure, except for the subtitle. It also works correctly if I copy the frames from page 14 and paste into a new doc.
    Things I tried that did not work: Export as .inx and move the pages to a new doc. You might try copying the text and pasting into a new doc.

  • Database, Dataset, Table Adaptors Error "Unable to load, Update requires a valid DeleteCommand when passed DataRow collection with deleted row"

    Microsoft Visual Basic 2010 Express.
    I am new to Visual Basic programing and i am trying to understand the relationships between Datasets, database, table Adaptors. I have to following code that is is giving me the following error" Unable to load, Update requires a valid DeleteCommand
    when passed DataRow collection with deleted rows". 
    I can track the error and its located in "OffsetTableTableAdapter.Update(MaterionOffsetDataSet.OffsetTable)" code. What am i missing?
    It seems that i can delete the data on the DataGridView Table and it only displays the correct data. but my database is not updating, even though the data grid displays differently.I can determine this because, when i save the offset database, i have all
    the previous uploads and all the rows that i wanted to delete are still there.
    My final goal is to be able to import offset data from a CSV file, save this data on the pc, send a copy of this data to a NuermicUpDown so the customer can modify certain numbers. From here they download all the date to a controller.  IF the customer
    needs to modify the imported data, they can go to a tab with a data grid view and modify the table. They will also have to option to save the modified data into a csv file.  
    Im not sure if i am making this overcomplicated or if there is a easier way to program this.
    CODE:
    Private Function LoadOffSetData()
            Dim LoadOffsetDialog As New OpenFileDialog 'create a new open file dialog and setup its parameters
            LoadOffsetDialog.DefaultExt = "csv"
            LoadOffsetDialog.Filter = "csv|*.csv"
            LoadOffsetDialog.Title = "Load Offset Data"
            LoadOffsetDialog.FileName = "RollCoaterOffset.csv"
            If LoadOffsetDialog.ShowDialog() = Windows.Forms.DialogResult.OK Then  'show the dialog and if the result is ok then
                Try
                    Dim myStream As New System.IO.StreamReader(LoadOffsetDialog.OpenFile) 'try to open the file with a stream reader
                    If (myStream IsNot Nothing) Then 'if the file is valid
                        For Each oldRow As MaterionOffsetDataSet.OffsetTableRow In MaterionOffsetDataSet.OffsetTable.Rows
                            oldRow.Delete()                       
    'delete all of the existing rows
                        Next
                        'OffsetTableTableAdapter.Update(MaterionOffsetDataSet.OffsetTable)
                        Dim rowvalue As String
                        Dim cellvalue(25) As String
                        'Reading CSV file content
                        While myStream.Peek() <> -1
                            Dim NRow As MaterionOffsetDataSet.OffsetTableRow
                            rowvalue = myStream.ReadLine()
                            cellvalue = rowvalue.Split(","c) 'check what is ur separator
                            NRow = MaterionOffsetDataSet.OffsetTable.Rows.Add(cellvalue)
                            Me.OffsetTableTableAdapter.Update(NRow)
                        End While
                        Me.OffsetTableTableAdapter.Update(MaterionOffsetDataSet.OffsetTable)
                        MainOffset.Value = OffsetTableTableAdapter.MainOffsetValue          'saves all the table offsets
    to the offset numericUpDown registers in the main window
                        StationOffset01.Value = OffsetTableTableAdapter.Station01Value
                        StationOffset02.Value = OffsetTableTableAdapter.Station02Value
                       myStream.Close() 'close the stream
                        Return True
                    Else 'if we were not able to open the file then
                        MsgBox("Unable to load, check file name and location") 'let the operator know that the file wasn't able to open
                        Return False
                    End If
                Catch ex As Exception
                    MsgBox("Unable to load, " + ex.Message)
                    Return False
                End Try
            Else
                Return False
            End If
        End Function

    Hello SaulMTZ,
    >>I can track the error and its located in "OffsetTableTableAdapter.Update(MaterionOffsetDataSet.OffsetTable)" code. What am i missing?
    This error usually shows that you do not initialize the
    DeleteCommand object, you could check this
    article to see if you get a workaround.
    >> Im not sure if i am making this overcomplicated or if there is a easier way to program this.
    If you are working CSV file, you could use OleDB to read it which would treat the CSV file as a Table:
    http://www.codeproject.com/Articles/27802/Using-OleDb-to-Import-Text-Files-tab-CSV-custom
    which seems to be easier (in my opinion).
    Regards.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • I HAVE A SOURCE TABLE WITH 10 RECORDS AND TARGET TABLE 15 RECORDS. MY WUESTION IS USING WITH THE TABLE COMPARISON TRANSFORM I WANT TO DELETE UNMATCHED RECORDS FROM THE TARGET TABLE ??

    I HAVE A SOURCE TABLE WITH 10 RECORDS AND TARGET TABLE 15 RECORDS. MY QUESTION IS USING WITH THE TABLE COMPARISON TRANSFORM .I WANT TO DELETE UNMATCHED RECORDS FROM THE TARGET TABLE ?? HOW IT IS ??

    Hi Kishore,
    First identify deleted records by selecting "Detect deleted rows from comparison table" feature in Table Comparison
    Then Use Map Operation with Input row type as "delete" and output row type as "delete" to delete records from target table.

Maybe you are looking for