Question on updating JTable contents

I doing a java mail project, I constructed a tablemodel to store/show the mail contents:
class MailTableModel extends DefaultTableModel{
with one botton event I successfully added the mail information into a vector.
However, I couldn't get the JTable to update its view.
JTable is defined in the mainFrame class:
class MailFrame extends JFrame{
private JTable table;
public MainFrame(TableModel tm){
table = new JTable(tm) // reference to the tablemodel which has the data;
public someButton_actionPerformed(ActionEvent e){
// what to do to let the JTable to update and show the data?
// anybody can help?
somebody said the DefaultTableModel will update the view automatically
with the addRow method, well, not in my case, any suggestions?
Thanks!

somebody said the DefaultTableModel will update the view automatically with the addRow method, well, not in my case, It works for me. Reply 3 of this thread shows a simple example:
http://forum.java.sun.com/thread.jsp?forum=57&thread=290478

Similar Messages

  • Updating JTable content

    Hi guys,
    I got a JTable and I have tu update his content when a RadioButton is changed.
    I got 4 TableModels that rappresent 4 contents I have to show depending on the radiobutton selected.
    How can I change dinamically the content of my JTable?
    I tryed to do something like this:
    myjtable.removeAll();
    myjtable.setModel(new MYMODEL());
    but the table go empty and there is no update.
    why??
    I should use models, and not other kind of ways.
    bye

    table.setModel(...) should work.
    Does your MYMODEL class contain valid data?? You don't pass any parameters to it so how is model 1 different from model 4?

  • Could You help Please (updating JTable Content)

    Sorry for posting again... I really need help... can't update the content of JTable instead it keep adding the columns to the table. How can I remove before add?? I tried couple of things but didn't work...
    Please help... bellow is the code i posted on the previous message...
    Hi,
    How can I remove the content of my table columns before adding the new data?
    here is the code the fillout the table everytime the new data is available..
    public void FillOutTables()
    m_data.setTableData();
    jTable1.setAutoCreateColumnsFromModel(false);
    jTable1.setModel(m_data);
    for (int k = 0; k <AppLetterTableData.m_columns.length; k++)
    DefaultTableCellRenderer renderer = new DefaultTableCellRenderer();
    renderer.setHorizontalAlignment(AppLetterTableData.m_columns[k].m_alignment);
    TableColumn column = new TableColumn(k, AppLetterTableData.m_columns[k].m_width, renderer, null);
    jTable1.addColumn(column);
    JTableHeader header = jTable1.getTableHeader();
    header.setUpdateTableInRealTime(false);
    how should I clean the table before adding? should I clean the table or the dataClass (AppLetterTableData) allthough I clear the vector with in the data class (AppLetterTableData) before I add to it.
    Very much appreciate your help

    I guess I solved the problem but JTable.setValueat(Object value, row, column)
    thanx for not responding:)

  • Updating JTable Contents

    I'm having trouble refreshing a JTable after changing it's 2D Object array data. Perhaps this is a stupid question, but any advice would be appreciated.
    Basically I've been building from the SimpleTableDemo.java file in the "How to Use Tables" tutorial. I set Object[][] data to a 2D Object array that is modified by other parts of my program.
    I added the public void tableChanged(TableModelEvent e) function to detect data changes, displaying a simple System.out, but it never seems to get called.
    Is there any way that the JTable can observe changes in the Object[][] data array and update it's self accordingly? I'm never sure if rows are being added or removed.
    I hope that made sense, and thank-you in advance to anyone who replies.
    -Arthur

    Couple of things...
    Whenever you change the contents of your TableModel you need to fire the appropriate event to get the JTable to update the viewed rows... in your case it sounds like you would have to call the "fireTableDataChanged()" method defined by AbstractTableModel so that your contents will be viewed.
    Also... it is rare that you really need to update the entire contents of your table model, most the time it is more efficient to just update the cell or row your need and call the appropriate "fire..." method to update
    Hope this helps
    Josh Castagno
    http://www.jdc-software.com

  • Trying to post a question and receiving: You are not allowed to create or update this content

    I am a newbie and am trying to post a question to the support communities and received this reply:"You are not allowed to create or update this content"
    My question:
    Help! Not all my incoming mail messages are going to my home computer account. Some are derailed and end up in my inbox on my iphone only. My husband is waiting for a message to come through on the home computer and sometimes they end up on my iphone5 accounts. Yikes! He is not happy. Some messages come to my pc email and some only to my phone. But then, some come to both as they should. I need all mail to arrive at both home and on my iphone. I would so appreciate any help or advice given. Thank you!  Iphone 5c  IOS 7.1.2

    I'm not sure, but you might try this (instructions are from my 5s running iOS 7.1.2):
    On your iPhone, go to Settings -> Mail, Contacts, Calendars
    Find the account you're having the problem with
    Touch the arrow to the right of it, which will bring up a screen that has the account name, Mail and Notes
    Touch the account name. This brings up a settings screen for only that account.
    Go down to Advanced and touch that
    See what it says under Deleted Messages. If Remove is set to something really short, your iPhone might be deleting the messages before they have a chance to download onto another device.

  • Refreshing JTable contents (rows and columns) handling.

    Hi,
    I have a general question related to refreshing the contents of JTable and handling some application specific requirements.In our application we are planning to refresh the contents of JTable automatically after certain period of time by fetching data from database and update the JTable contents or user has clicked refresh button.
    But following scenarios we are planning to handle when refresh is called automatically or user has clicked refresh button.
    1) User is working with data of JTable. Like rows of JTable has checkBoxes and user selects them and doing operation like viewing the details of selected rows in new details dialog. So if refreshing is done then the selection will be lost if I update the whole data in JTable.
    a)Will it be possible to append the data at the end of JTable rows without disturbing the existing JTable contents.
    b) Is it feasible to compare the data of existing rows and newly fetched rows and update only the rows whose values are changed in database or update specifically updated columns. But this comparision for finding changed values will result in performance problems.So are there any other alternatives of doing this, ideas are most welcome.
    c) Simple way is to alert the user that data will be updated and everything will be refreshed will be the choice in worst case.
    I guess many may have encountered such problems and may have solved it depending on the product requirements.
    Ideas and suggestions are most welcome.
    Regards.

    Hi,
    Here are my views and my assumptions.
    Assumptions :
    1) Your JTable is populated with list of Objects.
    2) Your tables in database is having columns like created date, created time, updated date updated time
    3) Order by clause for all the time will remain same.
    If these assumptions are correct then I think you can achieve your goal.
    Here how it is.
    Your application session will maintain last db hit time and will maintain for every hit that applicate made to fetch data from db.
    When object is created on the server side once it fetch data from table it will compare the created date/time or update date/time with the session varibale that holds last visit date/time. Based on this flag need to be set to indicate if this item is added/updated/deleted since last visit.
    And when all these object is returned to your client, the table model will iterate through the list and based on object index in the list and and if object is changed will update only that perticular row.
    Hope this is what you want to achieve.
    Regards

  • Update Jtable from access database

    as the title suggests help me guys... till now i have a database and some contents in it.. when the application starts the table is filled with contents of the database.. now whenever i add or remove a row in the databse i want to show it in the table... i have a Vector called dbData with the present contents of the database.. i want to update jtable with contents of dbData.... how to do it??

    the best things i can see to do is
    JTable table = new Jtable(.....); // this was ur table before;
    deleteRow(table); // you deleted the row
    // now you have a vector containing all the data for the rows;
    // but you need a vector containing the columns for the rows too
    //so now you do
    table = new JTable(dbData,columnnames);
    repaint();dbData must be a vector of vectors;
    dbData.elementAt(1) return a vector with all the data for row one
    so dbData.elementAt(1).elementAt(1) will be the data for row 1 column 1
    // dbData will be the data still remaining in the table
    or instead of the above you could use a nested for loop and set each element one at a time
    Object temp;
    int numberofRows = dbData.elementCount();
    int numberofColumns = db.elementAt(0).elementCount();
    for(int row = 0; row < numberofColumns;row++)
    for( int column = 0; column < numberofRows; column++)
      temp = dbData.elementAt(row).elementAt(column);
      table.setValueAt(temp,row,column);
    }

  • Updating flash content

    Hi All,
    I have a query that I need an answer to as soon as possible.
    Any feedback would be greatly appreciated.
    A client of mine is currently in a legal battle with a
    competitor over one of their products' package designs. They have
    that product listed on their website and so asked my company to
    urgently update the flash site (which we designed) and the .swf
    containing the product packshot. We do this on a fairly regular
    basis and it has never been a problem in the past but now we've
    encountered a problem with some potentially hazardous consequences,
    to my client anyway.
    The update went normally and I could view the updated content
    immediately however my client's lawyers and more to the point,
    their competitors, are viewing the previous version of the site
    containing the questionable content.
    My suggestion was to clear all temporary internet files and
    also to ensure that should the person/parties involved be using a
    proxy server, to clear all archived versions of the website. I'm
    all out of options from this point.
    Any suggestions or comments about this? Why else would the
    content not be updating on these user's systems?
    You can check it out for yourself (to let me breathe a sigh
    of relief anyway :P) at: www.nutrilida.com
    Once in the site, you'll land on the products page. Have a
    look at 'ViralGuard'. The latest content should include a blue band
    at the bottom of the packaging.
    Let me know what you see and thanking you in advance!

    Thats a good idea...
    but you will run into trouble when you have dozens of swf
    files. In this case you would have to rename each filename and
    rewrite all of the internal paths, each time you want to update
    your content.
    Update
    I've just googeld a bit and found this one:
    Cache
    Manager
    maybe this is it, i will check this one out, too.

  • Updating Web Content

    I post my web on an account other than .MAC. My question concerns updating a web page's content. I have many pdf and doc files that I link to within my site. The reside in iWeb created folders. When I change the content of a pdf or doc file and just publish it to my site and later publish my iWeb web to a folder, the ftped content is overwritten.
    I have to link to the changed file and then rename the link to something other than the default xxx.pdf. Then publish to a folder.
    Is there a better method?
    Thanks
    Harvey

    I do not know if I understand you. I try to explain better: I make a change in code, publish and upload files via FTP to hosting. Then I call the customer and ask him to look at the new version, then he enters your browser, enter the URL and says he sees the same old version. And to me, that happens the same sometimes, not always.
    Then the client tells me worried that if it has happened to him, also can happen to anyone on the web and that, therefore, that user will not see the new dates calendar of events.
    From what I understand, you propose adding the Location reload() Method (with forceGet parameter to True) in any event code in Edge or maybe directly in index.html file. Is that so?
    If so, where would you recommend me to insert?
    And, is there no other way to get only new and modified files and not reload all page elements every time that you visit the website?
    Thank you very much.

  • Error while updating the content in workflow

    Hi,
    I'm getting an error while updating the content in workflow thru the checkout option. i.e. contributor checks in the content - reviewer rejects the content - then contributor checks out and modifies the content as per the reviewer's remarks and while checking in the following error occurs
    Content Server Request Failed
    Unable to check in content item 'HO000128' for workflow. Unable to execute service method 'checkInUpdateRevByID'. (System Error: Runtime error: java.lang.NullPointerException
    at intradoc.server.DocServiceHandler.checkInRevByID(DocServiceHandler.java:248)
    at intradoc.server.DocServiceHandler.checkInUpdateRevByID(DocServiceHandler.java:240)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at intradoc.common.IdcMethodHolder.invokeMethod(ClassHelperUtils.java:617)
    at intradoc.common.ClassHelperUtils.executeMethodReportStatus(ClassHelperUtils.java:293)
    at intradoc.server.ServiceHandler.executeAction(ServiceHandler.java:79)
    at intradoc.server.Service.doCodeEx(Service.java:490)
    at intradoc.server.Service.doCode(Service.java:472)
    at intradoc.server.ServiceRequestImplementor.doAction(ServiceRequestImplementor.java:1360)
    at intradoc.server.Service.doAction(Service.java:452)
    at intradoc.server.ServiceRequestImplementor.doActions(ServiceRequestImplementor.java:1201)
    at intradoc.server.Service.doActions(Service.java:447)
    at intradoc.server.ServiceRequestImplementor.executeSubServiceCode(ServiceRequestImplementor.java:1071)
    at intradoc.server.Service.executeSubServiceCode(Service.java:3497)
    at intradoc.server.ServiceRequestImplementor.executeServiceEx(ServiceRequestImplementor.java:942)
    at intradoc.server.Service.executeServiceEx(Service.java:3492)
    at intradoc.server.Service.executeService(Service.java:3476)
    at intradoc.server.DocServiceHandler.determineWorkflowCheckin(DocServiceHandler.java:3833)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at intradoc.common.IdcMethodHolder.invokeMethod(ClassHelperUtils.java:617)
    at intradoc.common.ClassHelperUtils.executeMethodReportStatus(ClassHelperUtils.java:293)
    at intradoc.server.ServiceHandler.executeAction(ServiceHandler.java:79)
    at intradoc.server.Service.doCodeEx(Service.java:490)
    at intradoc.server.Service.doCode(Service.java:472)
    at intradoc.server.ServiceRequestImplementor.doAction(ServiceRequestImplementor.java:1360)
    at intradoc.server.Service.doAction(Service.java:452)
    at intradoc.server.ServiceRequestImplementor.doActions(ServiceRequestImplementor.java:1201)
    at intradoc.server.Service.doActions(Service.java:447)
    at intradoc.server.ServiceRequestImplementor.executeSubServiceCode(ServiceRequestImplementor.java:1071)
    at intradoc.server.Service.executeSubServiceCode(Service.java:3497)
    at intradoc.server.ServiceRequestImplementor.executeServiceEx(ServiceRequestImplementor.java:942)
    at intradoc.server.Service.executeServiceEx(Service.java:3492)
    at intradoc.server.Service.executeService(Service.java:3476)
    at intradoc.server.Service.doSubService(Service.java:3465)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at intradoc.common.IdcMethodHolder.invokeMethod(ClassHelperUtils.java:617)
    at intradoc.common.ClassHelperUtils.executeMethodEx(ClassHelperUtils.java:279)
    at intradoc.common.ClassHelperUtils.executeMethod(ClassHelperUtils.java:264)
    at intradoc.server.Service.doCodeEx(Service.java:507)
    at intradoc.server.Service.doCode(Service.java:472)
    at intradoc.server.ServiceRequestImplementor.doAction(ServiceRequestImplementor.java:1360)
    at intradoc.server.Service.doAction(Service.java:452)
    at intradoc.server.ServiceRequestImplementor.doActions(ServiceRequestImplementor.java:1201)
    at intradoc.server.Service.doActions(Service.java:447)
    at intradoc.server.ServiceRequestImplementor.executeActions(ServiceRequestImplementor.java:1121)
    at intradoc.server.Service.executeActions(Service.java:433)
    at intradoc.server.ServiceRequestImplementor.doRequest(ServiceRequestImplementor.java:635)
    at intradoc.server.Service.doRequest(Service.java:1707)
    at intradoc.server.ServiceManager.processCommand(ServiceManager.java:359)
    at intradoc.server.IdcServerThread.run(IdcServerThread.java:197))
    Please help to resolve.
    Thanks in advance
    Prasad

    I also get error while updating the content in workflow thru the checkout option as reviewer. i.e. contributor checks in the content - then reviewer either updates the metadata or checks out and modifies the content and while checking in the following error occurs
    Content Server Request Failed
    Unable to update the content item information for 'HO000128'.
    The content ID must be specified.
    Please help to resolve.
    Thanks in advance
    Prasad

  • How to write the JTables Content into the CSV File.

    Hi Friends
    I managed to write the Database records into the CSV Files. Now i would like to add the JTables contend into the CSV Files.
    I just add the Code which Used to write the Database records into the CSV Files.
    void exportApi()throws Exception
              try
                   PrintWriter writing= new PrintWriter(new FileWriter("Report.csv"));
                   System.out.println("Connected");
                   stexport=conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE);
                   rsexport=stexport.executeQuery("Select * from IssuedBook ");
                   ResultSetMetaData md = rsexport.getMetaData();
                   int columns = md.getColumnCount();
                   String fieldNames[]={"No","Name","Author","Date","Id","Issued","Return"};
                   //write fields names
                   String rec = "";
                   for (int i=0; i < fieldNames.length; i++)
                        rec +='\"'+fieldNames[i]+'\"';
                        rec+=",";
                   if (rec.endsWith(",")) rec=rec.substring(0, (rec.length()-1));
                   writing.println(rec);
                   //write values from result set to file
                    rsexport.beforeFirst();
                   while(rsexport.next())
                        rec = "";
                         for (int i=1; i < (columns+1); i++)
                             try
                                    rec +="\""+rsexport.getString(i)+"\",";
                                    rec +="\""+rsexport.getInt(i)+"\",";
                             catch(SQLException sqle)
                                  // I would add this System.out.println("Exception in retrieval in for loop:\n"+sqle);
                         if (rec.endsWith(",")) rec=rec.substring(0,(rec.length()-1));
                        writing.println(rec);
                   writing.close();
         }With this Same code how to Write the JTable content into the CSV Files.
    Please tell me how to implement this.
    Thank you for your Service
    Jofin

    Hi Friends
    I just modified my code and tried according to your suggestion. But here it does not print the records inside CSV File. But when i use ResultSet it prints the Records inside the CSV. Now i want to Display only the JTable content.
    I am posting my code here. Please run this code and find the Report.csv file in your current Directory. and please help me to come out of this Problem.
    import javax.swing.*;
    import java.util.*;
    import java.io.*;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.table.*;
    public class Exporting extends JDialog implements ActionListener
         private JRadioButton rby,rbn,rbr,rbnore,rbnorest;
         private ButtonGroup bg;
         private JPanel exportpanel;
         private JButton btnExpots;
         FileReader reading=null;
         FileWriter writing=null;
         JTable table;
         JScrollPane scroll;
         public Exporting()throws Exception
              setSize(550,450);
              setTitle("Export Results");
              this.setLocation(100,100);
              String Heading[]={"BOOK ID","NAME","AUTHOR","PRICE"};
              String records[][]={{"B0201","JAVA PROGRAMING","JAMES","1234.00"},
                               {"B0202","SERVLET PROGRAMING","GOSLIN","1425.00"},
                               {"B0203","PHP DEVELOPMENT","SUNITHA","123"},
                               {"B0204","PRIAM","SELVI","1354"},
                               {"B0205","JAVA PROGRAMING","JAMES","1234.00"},
                               {"B0206","SERVLET PROGRAMING","GOSLIN","1425.00"},
                               {"B0207","PHP DEVELOPMENT","SUNITHA","123"},
                               {"B0208","PRIAM","SELVI","1354"}};
              btnExpots= new JButton("Export");
              btnExpots.addActionListener(this);
              btnExpots.setBounds(140,200,60,25);
              table = new JTable();
              scroll=new JScrollPane(table);
              ((DefaultTableModel)table.getModel()).setDataVector(records,Heading);
              System.out.println(table.getModel());
              exportpanel= new JPanel();
              exportpanel.add(btnExpots,BorderLayout.SOUTH);
              exportpanel.add(scroll);
              getContentPane().add(exportpanel);
              setVisible(true);
          public void actionPerformed(ActionEvent ae)
              Object obj=ae.getSource();
              try {
              PrintWriter writing= new PrintWriter(new FileWriter("Report.csv"));
              if(obj==btnExpots)
                   for(int row=0;row<table.getRowCount();++row)
                             for(int col=0;col<table.getColumnCount();++col)
                                  Object ob=table.getValueAt(row,col);
                                  //exportApi(ob);
                                  System.out.println(ob);
                                  System.out.println("Connected");
                                  String fieldNames[]={"BOOK ID","NAME","AUTHOR","PRICE"};
                                  String rec = "";
                                  for (int i=0; i <fieldNames.length; i++)
                                       rec +='\"'+fieldNames[i]+'\"';
                                       rec+=",";
                                  if (rec.endsWith(",")) rec=rec.substring(0, (rec.length()-1));
                                  writing.println(rec);
                                  //write values from result set to file
                                   rec +="\""+ob+"\",";     
                                   if (rec.endsWith(",")) rec=rec.substring(0,(rec.length()-1));
                                   writing.println(rec);
                                   writing.close();
         catch(Exception ex)
              ex.printStackTrace();
         public static void main(String arg[]) throws Exception
              Exporting ex= new Exporting();
    }Could anyone Please modify my code and help me out.
    Thank you for your service
    Cheers
    Jofin

  • When ever i click a picture in photo booth it does not automatically update its content is this a bug or i don't know how to do it?

    when ever i click a picture in photo booth it does not automatically update its content is this a bug or i don't know how to do it?
    whenever you click a picture in photobooth you have to manually insert it one by one in iphoto
    i want to know is there any other option in iphoto which can do this type of thing(adding pictures automatically to iphoto )
    so that i do not have to do it manually

    Once you take the photo with Photo Booth, select the photo in the tray at the bottom and click on the iPhoto button just abouve and to the left:
         Click to view full size
    That will import the photo into iPhoto automatically.  But PB does not import any and all photo taken into iPhoto automatically.  That choice is left to the user.
    OT

  • When ever i click a picture in photo booth it does not automatically update its content is this a bug ?

    when ever i click a picture in photo booth it does not automatically update its content is this a bug or i don't know how to do it?

    Once you take the photo with Photo Booth, select the photo in the tray at the bottom and click on the iPhoto button just abouve and to the left:
         Click to view full size
    That will import the photo into iPhoto automatically.  But PB does not import any and all photo taken into iPhoto automatically.  That choice is left to the user.
    OT

  • Infopath 2007 "Updating Site Content Failed"

    I get this error for just about everything I do with the forms we are publishing via Infopath 2007.  I believe it is because our forms have a fair amount of Promoted fields in them (more than 30 each).
    I've seen this article and think that maybe it will alleviate the problem: http://support.microsoft.com/default.aspx/kb/958139
    The problem is the hotifx that this references is not available for public download and when I try to go through the great new Microsoft Support site (piece of absolute ____) I am unable to get a phone number to call, submit an e-mail or anything without giving them a credit card for payment.  I do not intend to pay money to get the right to download or be sent a hotfix.
    Does anyone know if there is a way I can test to verify that I indeed "need" this hotfix before I spend money out of my pocket? 
    The forms I have published to form libraries in MoSS 2007 Enterprise have many promoted fields.  I can create a new content type in the site collection via Infopath if I keep the promoted fields under about 25, however once I publish it I can no longer change the content type (get the "Updating Site Content Failed" message) and have to create a new content type to make changes to any form I have.  As you can imagine this is a problem as I have to constantly change the template url on my libraries and constantly re-link all of the saved forms in the libraries.
    Does anyone have any ideas how to realistically fix this outside of the hotfix?
    I've tried every method I can find on the internet, but nothing seems to work.

    A little more information.  On the server itself I don't show any indication or problem in the Event logs related to this issue.
    However, on the workstation that I am attempting to publish from (Same subnet, local Gigabit Connection) I get 4 MSSOAP Errors:
    Event Type: Error      Event Soruce MSSOAP
    Event Category: Generic   Event ID: 16
    Description: Soap error: Connection Time out
    I get two of those and two of these:
    Event Type: Error   Event Source: MSSOAP
    Event Category: General  Event ID: 16
    Description: Unspecified HTTP error.
    I went into the sharepoint central admin and changed the timeout value (which was 30 seconds) in the infopath forms section to 120 seconds and it hasn't made any difference.
    Edit:  Yes I have tried from multiple workstations.  We don't load office on the server itself or I would try from there as well.

  • Approval Workflow does not update the Content Approval status if started automatically

    Hi,
    I’m using a simple Approval Workflow associated with
    Content Approval on site pages. It works fine when I set it to be started manually (by using
    Allow this workflow to be manually started by an authenticated user with Edit Item permissions
     option) and on the completion of the workflow the
    Content Approval status is updated accordingly. But when I set it to be started automatically (by using
    Start this workflow when a new item is created
     / Start this workflow when an item is changed
    options), it does not updates the Content Approval status. Note that I’ve set the
    Update the approval status after the workflow is completed (use this workflow to control content approval)
    option to true.
    Regards

    Hello,
    It is recommended to select "Start this workflow to approve publishing a major version of an item" when you want to use the workflow to manage content approval for
    a library.
    According to the Notes for “Enable Content Approval” option in
    this reference:
    If you are using this Approval workflow to manage content approval (moderation) for a library, and you selected the Start this workflow to approve publishing a major version
    of an item check box on the Add a Workflow page..
    If you did not select the Start this workflow to approve publishing a major version of an item check box on the Add a Workflow page because you do not want this workflow to
    be the default content approval workflow for a library, you can select the Update the approval status (use this workflow to control content approval) check box to make this workflow a secondary content approval workflow that specific users can
    start manually.
    That means having an approval workflow start automatically when a document is changed or created is not a good practice when you want to use the workflow to manage
    content approval for a library. You should either select "Start this workflow to approve publishing a major version of an item" or give users the option to start the workflow manually at the time they want to submit for an approval.
    Thanks & Regards.
    Lily Wu

Maybe you are looking for

  • How can i check if my apple care is on my name?

    Hello, i have got a mac book from someone and it has already had the apple care on it. I just called apple care to switch the ownership of apple care to my name, but i still wonder if the representative has changed for me. So i do not have to worry i

  • I downloaded the wrong version of a movie HD instead of SD, can I return it without having to purchase another copy?

    Over the weekend I purchased a movie through iTunes, unfortunately the format I meant to purchase was SD and not HD, Unfortunately I purchased the wrong version, and would like to "return" it if possible.  I intend to watch it on a larger screen that

  • My story so far, TROUBLES

    Hi! I know there are a lot of complaints about the MBP in this forum, and unfurtunatly this will add to it somewhat, but most of all i am disapointed with the service of Apple's Techincal Support. So i have a MBP 1.83 gHZ week 12. It has always been

  • .m4p files not playing?

    I want to have a song playing in the background and it's one i got off itunes and it's in .m4p format. However it won't play. Any idea why? thanks!

  • How  do I add a FIM user to BPC?

    Hi guys. I've completed my FIM installation and connected it to the 2 external databases from which I need to pull data in to BPC. However, how do I now add a FIM user to BPC? I'm guessing that this is what needs to be done, as when I enter the BPC U