Dynamically change cell properties in a table

Hi,
I have read all forum posts about changing table cell properties, but I can't find the solution to my problem.
I have a table that derives its structure from a table which is the output of an RFC.
The rows are provided by the model.
When displaying the result of the RFC call, I want to add a colored row between certain sections with totals of that particular section.
I managed to add the row in the appropriate place, however I cannot change the color of this row (or even better: the particular cell).
Can anyone tell me how to proceed? And what property determines backgroundcolor of a tablecell? TextViewSemanticColor determines the text color, I want to change the background color.
Here is a fragment from my wdDoModifyView:
i=0;
IPrivateResultView.IEp_OpportunitiesNode node = wdContext.nodeEp_Opportunities();
while (i<node.size()) {
     total1 += <some value>;
     total2 += <some value>;
     if (<start of new section>) {
          IPrivateResultView.IEp_OpportunitiesElement el = (IPrivateResultView.IEp_OpportunitiesElement) node.createElement(new Zopportunities());
          el.setAttributeValue("Exp_Revenue", new BigDecimal(total1));
          el.setAttributeValue("Chancevalue", new BigDecimal(total2));
//     totals row is added here:                    
          node.addElement(i, el);
//     how can I make this work for background color?
          el.node().getNodeInfo().addAttribute("TextViewSemanticColor", "ddic:com.sap.ide.webdynpro.uielementdefinitions.TextViewSemanticColor");
          el.setAttributeValue("TextViewSemanticColor", WDTextViewSemanticColor.NEGATIVE);
          total1 = 0;
          total2 = 0;
     i++;
Thanks in advance,
Roelof

Hello Knibbe,
One can play with the readOnly of table cell editor (Input Field) to acheive the expected result.
Let us take a specific case where your table has four columns say col1, col2, col3, col4 and each of these columns have Input field as the table cell editor.
Then depending upon the condition specified below choose your option.
<u>If you have bound the table to the model node</u>
1. Create a new value node and create a bolean value attribute under it.
2. Set the cardinality of the value node to 1:1 and singleton to false.
3. Bind this attribute to the Table cell editor <b>(Inputfield)</b> in col1, col2, col3 and col4.
4. set the value of this attribute to TRUE when the table gets filled up initially i.e for the elements/rows in which you want to display the total, as per your requirement.
5. set the value of this attribute to FALSE for the other rows where you want the user to edit the data.
<u>If you have bound the table to a value node</u>
1. Create a value attribute of type boolean under the value node and follow the ONLY the steps 3, 4 and 5
Please reward appropriate points.
Bala
Message was edited by: Bala Krishnan

Similar Messages

  • How to dynamically changes items properties

    How to dynamically changes items properties likes position order in tabular view, width, prompt

    Many object properties can be set programmatically at runtime. For example, each window object has a Visible property that can be set to either Yes or No to show and hide the window. At runtime, you can call the built-in procedure SET_WINDOW_PROPERTY to show or hide the window dynamically, as shown here:
    Set_Window_Property('my_window',VISIBLE, PROPERTY_ON);
    The following built-in procedures are available for setting object properties at runtime:
    -     SET_BLOCK_PROPERTY
    -     SET_CANVAS_PROPERTY
    -     SET_FORM_PROPERTY
    -     SET_ITEM_PROPERTY
    -     SET_LOV_PROPERTY
    -     SET_MENU_ITEM_PROPERTY
    -     SET_PARAMETER_ATTR
    -     SET_RADIO_BUTTON_PROPERTY
    -     SET_RECORD_PROPERTY
    -     SET_RELATION_PROPERTY
    -     SET_VIEW_PROPERTY
    -     SET_WINDOW_PROPERTY
    The built-in procedure SET_ITEM_PROPERTY can be used to set the properties of any type of item, including buttons, text items, check boxes, radio groups, etc.
    Note: Radio group items include individual radio buttons; use SET_ITEM_PROPERTY to set the properties of the radio group, and SET_RADIO_BUTTON_PROPERTY to set the properties of the individual buttons in the group.
    Each built-in SET procedure has a corresponding GET function that allows you to programmatically determine the current setting of an object's properties. The following example uses GET_WINDOW_PROPERTY to determine if a window is currently hidden (VISIBLE = FALSE). If the window is hidden, SET_WINDOW_PROPERTY is called to show the window.
    If Get_Window_Property('my_window',VISIBLE) = 'FALSE' THEN
    Set_Window_Property('my_window',VISIBLE,PROPERTY_ON);
    To determine if a particular property can be set programmatically, refer to the property descriptions in online Help.

  • Dynamically changing single to multiselect in Table in OAF

    Hi,
    I am trying to programmaticallychange single selection to multiple selection of Table in Controler. From UI point of view everything is replaced correctly, but when I am trying to get values of selected rows ALWAYS only the first row is returned as selected (I think it is a default value of singleselection). I have also set rendered option to false for singleselection using personalisation page. Do you know what I am doing wrong or what I should check?
    The second issue is a dialog page. As I noticed the page context (table selection values) are lost when I am using confirmation page (dialog page with yes/no option). How should I pass page context to dialog page (table multiselection)?
    Controler Code:
        public void processRequest(OAPageContext pageContext, OAWebBean webBean) {
            super.processRequest(pageContext, webBean);
            OATableBean tableBean = (OATableBean)webBean;
            tableBean.prepareForRendering(pageContext);
            // Define new table selection (multi)
            OAMultipleSelectionBean mySelection = (OAMultipleSelectionBean)createWebBean(pageContext, MULTIPLE_SELECTION_BEAN);
            mySelection.setViewUsageName("EventResultsVO1");
            mySelection.setViewAttributeName("SelectFlag");
            //String sEventSelectText = pageContext.getMessage("XLA", "XX_XLA_EVENT_SELECT", null);
            tableBean.setTableSelection(mySelection);
            /* Workaround selection works - not satisfied
                OAMessageCheckBoxBean checkboxSelection = (OAMessageCheckBoxBean)createWebBean(pageContext, OAWebBeanConstants.MESSAGE_CHECKBOX_BEAN);
                checkboxSelection.setViewUsageName("EventResultsVO1");
                checkboxSelection.setViewAttributeName("SelectFlag");
                checkboxSelection.setChecked(false);
                checkboxSelection.setLabel("Wybierz");
                tableBean.addIndexedChild(0,checkboxSelection);
             /* Workaround selection */
            // FireAction for Change Status Button
            OAFlowLayoutBean tableActionBean = (OAFlowLayoutBean)tableBean.getTableActions();
            FireAction FireActionAddGroup = new FireAction();
            FireActionAddGroup.setEvent("ChangeStatusEvent");
            // Change Status Button
            OASubmitButtonBean myButtonBean = (OASubmitButtonBean)createWebBean(pageContext, BUTTON_SUBMIT_BEAN);
            myButtonBean.setPrimaryClientAction(FireActionAddGroup);
            String sChangeStatusButton = pageContext.getMessage("XLA", "XX_XLA_CHANGE_STATUS", null);
            myButtonBean.setText(sChangeStatusButton);
            // Text Item
            OAMessagePromptBean myMessagePromptBean = (OAMessagePromptBean)createWebBean(pageContext, MESSAGE_PROMPT_BEAN);
            String sSpecifyReasonText = pageContext.getMessage("XLA", "XX_XLA_SPECIFY_REASON", null);
            myMessagePromptBean.setPrompt(sSpecifyReasonText+": ");
            myMessagePromptBean.setCSSClass("OraDataText");
            // Text Field Item
            OATextInputBean myTextInputBean = (OATextInputBean)createWebBean(pageContext, TEXT_INPUT_BEAN);
            myTextInputBean.setName("xxPrzyczynaZmianyStatusu");
            myTextInputBean.setID("xxPrzyczynaZmianyStatusu");
            myTextInputBean.setLabel("Przyczyna zmiany statusu");
            myTextInputBean.setMaximumLength(240);
            // Table Action Bean
            tableActionBean.addIndexedChild(0,myMessagePromptBean);
            tableActionBean.addIndexedChild(1,myTextInputBean);
            tableActionBean.addIndexedChild(2,myButtonBean);
        public void processFormRequest(OAPageContext pageContext, OAWebBean webBean) {
              super.processFormRequest(pageContext, webBean);
              String event = pageContext.getParameter(EVENT_PARAM);
              if (event != null && "ChangeStatusEvent".equals(event)) {
                  String statusChangeReasonField = pageContext.getParameter("xxPrzyczynaZmianyStatusu");
                  if ((statusChangeReasonField != null) && (!"".equals(statusChangeReasonField))) {
                      //Prepare Dialog Page
                      String sChangeConfirmationText = pageContext.getMessage("XLA", "XX_XLA_CHNG_CONF", null);
                      OAException message = new OAException(sChangeConfirmationText);
                      OADialogPage dialogPage = new OADialogPage(OAException.CONFIRMATION, message, null, "","");
                      dialogPage.setOkButtonItemName("ChangeSelectedYesButton");
                      dialogPage.setNoButtonItemName("ChangeSelectedNoButton");
                      dialogPage.setOkButtonToPost(true);
                      dialogPage.setNoButtonToPost(true);
                      dialogPage.setPostToCallingPage(true);
                      String yes = pageContext.getMessage("AK", "FWK_TBX_T_YES", null);
                      String no = pageContext.getMessage("AK", "FWK_TBX_T_NO", null);
                      dialogPage.setOkButtonLabel(yes);
                      dialogPage.setNoButtonLabel(no);
                      //Pass changeReason argument to dialogPage
                      Hashtable formParams = new Hashtable(1);
                      formParams.put("statusChangeReasonField", statusChangeReasonField);
                      dialogPage.setFormParameters(formParams);
                      pageContext.redirectToDialogPage(dialogPage);
                  } else {
                      //ChangeReason empty
                      String sSpecifyReasonText = pageContext.getMessage("XLA", "XX_XLA_SPECIFY_REASON", null);
                      throw new OAException(sSpecifyReasonText+"!", OAException.WARNING);
              else if(pageContext.getParameter("ChangeSelectedYesButton")!=null) {
                    OAApplicationModule am = pageContext.getApplicationModule(webBean);
                    String changeReason = pageContext.getParameter("statusChangeReasonField");
                    Serializable parameters[] = {changeReason};
                    am.invokeMethod("XXchangeSelectedEvents", parameters);
                    OAException confMessage = new OAException("XLA","XX_XLA_DIALOG_MESSAGE", null, OAException.CONFIRMATION, null);
                    pageContext.putDialogMessage(confMessage);
    Application Module code:
    public class xxEventsInquiryAMImpl extends EventsInquiryAMImpl {
        /**This is the default constructor (do not remove)
        public xxEventsInquiryAMImpl() {
        /**Sample main for debugging Business Components code using the tester.
        public static void main(String[] args) {
            launchTester("pzu.oracle.apps.xla.eventsinquiry.server", /* package name */
          "xxEventsInquiryAMLocal" /* Configuration Name */);
        public void XXchangeSelectedEvents(String changeReason) {
            OAViewObject vo = (OAViewObject)getEventResultsVO1();
            EventResultsVORowImpl row = null;
            int fetchedRowCount = vo.getFetchedRowCount();
            RowSetIterator updateIter = vo.createRowSetIterator("updateIter");
            if (fetchedRowCount > 0) {
                updateIter.setRangeStart(0);
                updateIter.setRangeSize(fetchedRowCount);
                    // TEST - get number of selected rows
                    Row[] selectedRows = updateIter.getFilteredRows("SelectFlag","Y");
                    int numRows=selectedRows.length;
                for (int i = 0; i < fetchedRowCount; i++) {
                  row = (EventResultsVORowImpl)updateIter.getRowAtRangeIndex(i);
                  if (row != null && row.getSelectFlag() != null && row.getSelectFlag().equals("Y") ) {
                      Number rowEventId = (Number)row.getAttribute("EventId");
                      if (rowEventId != null) {
                          CallableStatement st = null;
                          try {
                              String stmt = "begin XX_DSP_FAH_010_API.set_no_action(:1, :2); end;";
                              //XX_DSP_FAH_010_API.set_no_action(p_event_id,p_reason,p_error_code,p_error_desc)
                              OADBTransaction tr = getOADBTransaction();
                              st = tr.createCallableStatement(stmt, 1);
                              st.setInt(1, rowEventId.intValue());
                              st.setString(2, changeReason);
                              st.close();
                              OAExceptionUtils.checkErrors(tr);
                          catch(SQLException sqle) {
                              throw OAException.wrapperException(sqle);
            updateIter.closeRowSetIterator();

    Hi,
    you can do this by surrounding the cell components (outputText, inputText, checkBox etc) with e.g. a panelLabelAndMessage component. Then on this component inlineStyle property use EL to reference a managed bean property. The managed bean property can now evaluate the check box select state. The trick part in your question is to tell upon rendering of the previous and next row that the check box in the row between has been selected. So you need to find a way to tell this. One option would be to apply logic like below
    JUCtrlHierNodeBinding currentRenderedAdfRow = ... use facesContext --> getApplication --> getExpressionFactory --> createValueExpression to create a handle to the #{row} expression
    Row rw = currentRenderedAdfRow.getRow();
    BindingContext bctx = BindingContext.getCurrent();
    BindingContainer bindings = bctx.getCurrentBindingEntries();
    DCIteratorBinding dciterator = (DCIteratorBinding ) bindings.get("Name of iterator used by table ");
    RowSetIterator rsIterator = dciterator .getRowSetIterator();
    Row prevRow = rsIterator.setCurrentRow(rw);
    int currRowIndex = rsIterator.getCurrentRowIndex();
    Row prevRow = getRowAtRangeIndex(currRowIndex-1); 
    Row nextRow = getRowAtRangeIndex(currRowIndex-1); 
    //return CSS that colors the background if the following conditions are true
    if ( ((DataType) rw.getAttribute("checkBoxAttr")) ||  ((DataType) prevRow .getAttribute("checkBoxAttr")) |  ((DataType) nextRow .getAttribute("checkBoxAttr"))){
      //color background returning CSS
    else{
      return empty string
    }I wrote this code from the top of my head, so ensure you check for null pointers (e.g. if a prev-row doesn't exist). Also consider caching of the calculation so that it doesn't need to be performed for each cell in a row but only once per row. E.g. you can save the color and the row key in a managed bean in view scope and then compare the key with this managed bean before performing the calculation
    Frank

  • Dynamic Creation of cells or change of cell behaviour of a table at runtime

    Hello all,
    Can anybody tell me how can we change the cell behaviour of a table at runtime or creating the table row with different cell properties dynamically at runtime in ABAP webdynpro.
    for ex the table at runtime can be like...
    The 1st row the 1st cell can be a check box.
    The 2nd row the 1st cell can be a input field.
    The 3rd row the 1st cell can be a radio selection field.
    Business Ex : Dynamic Attributes in BID Invitation
    Thanks in advance in clarifying the doubt.

    Hi Mani,
    You could use code similar to the following code in your WDDOMODIFY method of the view in which the table is placed.
    data wd_table_cell_editor type ref to cl_Wd_view_element.
      data wd_table_column      type ref to cl_wd_table_column.
    wd_table_cell_editor ?= view->get_element( ID ). (Or any other way to get the refernce to the table cell editor)
    wd_table_column ?= wd_table_cell_editor->get__parent( ).
    (Get a refernce to table column throught table cell editor or directly)
    Now use the set_cell_editor method of wd_table_column to set the column to check box or input or any other field of your requirement.
    Also, I suggest you to use ALV as it is simpler change the cell editor and it provides many other improved functionalities.
    Regards,
    Srini.

  • Merging of 2 Cells in WD ABAP ALV Header & Dynamically change the header

    Hello Experts,
    I have two main requirements with respect to WD ABAP - ALV report creation
    1) Two feilds in the  header of ALV GRID created in the WD ABAP screen must be merged as shown below(Month Column) ,
    |     January         |     February         |  
    |   Col 1 | Col2      |   Col 1 | Col2        |     
    2) The header value(Month) should dynamically change based on the current date.
    For Eg: If June 2011 is the current month , the ALV table should start from June 2011 and displayed till May 2012.
    Looking forward for your valuable inputs @ the earliest
    Regards,
    Sriram

    Hi Sriram,
    For merging..
    Pleaese go through this
    Merge of Cells in ALV table in ABAP webdynpro.
    ABAP WD: ALV merge cells
    For Header Change..
    How to set title/text for ALV table column header in WD ABAP
    Change column header in ALV to another DDIC Element type
    Change label of a column in ALV
    Cheers,
    Kris.

  • Dynamically changing internal table in 'gui_download'

    Hi Experts,
                     i have to download 4 internal tables, each with different structures, to the presentation server using 'gui_download', based on which radio-button is selected in the selection screen. I am hoping to use a single 'form' and 4 'perform' calls. how can I dynamically change the tables in the 'gui_download' function modules.
    plz help.....................

    Hi ,
    Build the field catalog dynamically based on the internal table structure based on the radio button selected.Use the dynamic internal table generated from the filedcatalog and use in GUI_DOWNLOAD.
    See the below code:
    *& Report  ZRAJESH02
    REPORT  zrajesh02.
    Dynamic internal table
    TYPE-POOLS: slis.
    FIELD-SYMBOLS: <dyn_table> TYPE STANDARD TABLE,
                  <dyn_wa>.
    DATA: alv_fldcat TYPE slis_t_fieldcat_alv,
          it_fldcat TYPE lvc_t_fcat.
    DATA: lv_monate TYPE f,
          lv_months TYPE i,
          lv_date TYPE sy-datum,
          p_check1 type n value '1'.
    lv_date = sy-datum + 360.
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    PARAMETERS: p_check TYPE c.
    SELECTION-SCREEN END OF BLOCK b1.
    START-OF-SELECTION.
      CALL FUNCTION 'MONTHS_BETWEEN_TWO_DATES'
        EXPORTING
          i_datum_bis   = lv_date
          i_datum_von   = sy-datum
          i_kz_incl_bis = ' '
        IMPORTING
          e_monate      = lv_monate.
      lv_months = lv_monate.
      PERFORM f_fcat USING 'AUFNR' 'CHAR' '12'.
      PERFORM f_fcat USING 'POSNR' 'CHAR' '06'.
      while p_check1 LE p_check.
      PERFORM f_fcat USING p_check1 'CHAR' '1'.
      p_check1 = p_check1 + 1.
      endwhile.
      PERFORM build_dyn_itab.
      LOOP AT <dyn_table> INTO <dyn_wa>.
        WRITE:/ <dyn_wa>.
      ENDLOOP.
    FORM f_fcat USING fieldname dattyp length.
      DATA:wa_it_fldcat TYPE lvc_s_fcat.
      CLEAR wa_it_fldcat.
      wa_it_fldcat-fieldname = fieldname.
      wa_it_fldcat-datatype = dattyp.
      wa_it_fldcat-intlen = length.
      APPEND wa_it_fldcat TO it_fldcat .
    ENDFORM.                    "f_fcat
    *&      Form  build_dyn_itab
          text
    FORM build_dyn_itab.
      DATA: new_table TYPE REF TO data,
      new_line TYPE REF TO data.
    wa_it_fldcat TYPE lvc_s_fcat.
    CLEAR wa_it_fldcat.
    wa_it_fldcat-fieldname = 'AUFNR'.
    wa_it_fldcat-datatype = 'CHAR'.
    wa_it_fldcat-intlen = 12.
    APPEND wa_it_fldcat TO it_fldcat .
    CLEAR wa_it_fldcat.
    wa_it_fldcat-fieldname = 'POSNR'.
    wa_it_fldcat-datatype = 'CHAR'.
    wa_it_fldcat-intlen = 6.
    APPEND wa_it_fldcat TO it_fldcat .
    Create dynamic internal table and assign to FS
      CALL METHOD cl_alv_table_create=>create_dynamic_table
        EXPORTING
          it_fieldcatalog = it_fldcat
        IMPORTING
          ep_table        = new_table.
      ASSIGN new_table->* TO <dyn_table>.
    Create dynamic work area and assign to FS
      CREATE DATA new_line LIKE LINE OF <dyn_table>.
      ASSIGN new_line->* TO <dyn_wa>.
    ENDFORM.                    "build_dyn_itab
    Thanks,
    Rajesh.

  • Dynamically change the Priority Group of Logical Table Sources in OBIEE 11g

    Hi All,
    I have 2 Logical Table Sources(LTS 1 and LTS 2 for a Logical Table in BMM Layer).
    Example: Logical Table : Sample
    LTS Source 1 : Sample 1(Priority Group Set to 1)
    LTS Source 2 : Sample 2(Priority Group Set to 0)
    I have set the Priority Group of Sample 1 LTS Source to 1 and Priority Group of Sample 2 LTS Source to 0.
    I need to dynamically change the Priority Group of Sample 1 LTS Source to 0 if my role is DEVELOPER where role is a column in database.
    If my role is not equal to DEVELOPER then the Priority Group of Sample 1 LTS Source will remain same(1).
    Please suggest how can i achieve this.
    Thanks,
    Soukath Ali

    hello Soukath Ali,
    didi you find a way to dinamically changing Priority Group?
    thanks,
    Maria Teresa Marchetti

  • Dynamically change table selecting from

    in 3.2 on 11g database is there a way to dynamically change the table used in a select statement for an interactive report? I have a series of similar tables, one for each month of the year. I want to click a month on one page and bring up a report from the table for that month. I want to use one page for this report and have all links from previous page link to the same page, just different result based on what month was clicked.
    I know I could just setup 12 different reports and conditionally display each region based on a value passed to the that page, but I'd prefer to only create one page & one report on that page.
    Thanks for any ideas or solutions.

    Your function will have the code dynamically built.. What you do is you build your sql and pass in the table name and any other items that will change based upon your requirements..
    here is an example...
    function inventory_report (p_State IN VARCHAR2) RETURN VARCHAR2 IS
    declare
      q varchar2(4000);
    begin
      q:='   select p.category, ';
      q:=q||'       p.product_name, ';
      q:=q||'       p.quantity, ';
      q:=q||'       p.unit_price '; 
    -- Here is where we substitute the passed in state name for the data table we extract data from
      q:=q||'  from ' || V('p_State') || ' p, ';
      q:=q||' where p.product_quantity > 0 ';
      return q;
    end;Thank you,
    Tony Miller
    Webster, TX

  • Changing link properties between tables

    Hello,
    Is it possible to change somehow properties for the links between tables?
    We have about 2000 reports and we should change most of the links, it would be very convenient to write short program to do this instead of destroying couple mouses and wrists etc...
    Currently we are using VB6 and RDC to work with reports but we are open for all ideas to solve this problem we have.
    Thanks in advance for any help!
    Timo

    Hi Timo,
    Unless you know exactly how all are going to change exactly it may be easier to hire a student to this for you.
    Here's a bit of code that should get you going, it's old but should work for you also. You'll need to know what fields are mapped etc... It actually adds the tables at runtime and what you'll want to do is get your existing tables and links and save the info in an array.
    Dim db As Database
    Set db = rep.Database
    Dim tables As ICRDatabaseTables
    Set tables = db.tables
    Dim desTable As ICRDatabaseTable
    Dim path As String
    Dim srcTable As ICRDatabaseTable
    Dim subloc As String
    ' Add a table.
    subloc = "Orders"
    Set srcTable = tables.Add(subloc, CRDTRecurringFile, "crdb_ODBC.DLL", "MS SQL Tsvanfps01", "nwind", "vantech", "vantech", subloc)
    ' Add a table.
    subloc = "Employees"
    Set desTable = tables.Add(subloc, CRDTRecurringFile, "crdb_ODBC.DLL", "MS SQL Tsvanfps01", "nwind", "vantech", "vantech", subloc)
    Dim links As ICRDatabaseLinks
    Set links = db.links
    Dim count As Long
    count = links.count
    Dim joinType As CRJoinType
    Dim lookType As CRLookUpType
    Dim pm As Boolean
    Dim indexInUse As Integer
    joinType = 5    ' set to Left Outer Join
    lookType = 2
    pm = False      ' used for Access tables
    indexInUse = 0  ' used for Access tables
    Dim vas As Variant
    Dim vbs As Variant
    vas = Array(2)  ' pointer to the field position in the source Table
    vbs = Array(0)  ' pointer to the field position in the destination Table
    Dim newdblink As ICRDatabaseLink
    Set newdblink = links.Add(srcTable, desTable, vas, vbs, joinType, lookType, pm, indexInUse)
    Have fun
    Don

  • Cell references to other tables, keep from changing

    Here's what I am trying to do. I have two tables, in two sheets. Sheet 1::Table 1 and Sheet 2::Table 2.
    The cells in Table 2 are all referenced to cells in Table 1 (with a formula that looks like =Table 1::X7).
    I want to be able to move the rows in Table 1 around but have the formulas in Table 2 not change their reference. Now it seems they follow along. So the reference in Table 2 is =Table 1::X7 and I move row 7 in Table 1 so that it becomes row 6, my reference in Table 2 changes to =Table 1::X6. I don't want it to change. Changing the reference from relative to absolute doesn't seem to change this.
    Any suggestions?
    Thanks! Brian

    "I looked at INDEX and OFFSET but from what I can tell they don't accept a parameter for a different table."
    OFFSET's base can be set as a cell on a different table. If that cell is in a Header row, it will not be included in sorts of the table, so in many cases cell A1 is chosen as 'base' (with row 1 set as a Header row), and offsets are calculated from that cell.
    The example below shows results using OFFSET in columns B and C, and INDEX and OFFSET in column D, all of Table 2, to retrieve values from column X of Table 1. The yellow-filled row on Table 2 retrieves the values from the same cell as your =Table 1::X7 formula above. X7 is in the green filled row of Table 1.
    The second pair of tables shows duplicates of the same pair of tables. Table 1 in this row has been sorted on the values in column B. Note that what was Row 7 of Table 1 is now Row 4 (although it is still labeled Row 7 in column A). Table 2 has not been sorted. The yellow-filled row is still in the same position and the formula in each of the three cells remains the same as it was in the first version of the table. The value retrieved is from cell X7 on the sorted Table 1.
    Formulas (all in Table 2, entered in row 2, then filled down to row 10):
    B2: =OFFSET(Table 1 :: $A$1,ROW()-1,23)
    C2: =OFFSET(Table 1 :: $X$1,ROW()-1,0)
    These two are pretty much the same.
    The first uses A1 as the base, and requires a column offset of 23 steps to arrive at column X.
    The second uses X1 as the base, and requires a column offset of 0 to remain in column X.
    The row offset for both is set by the row in which the formula resides. ROW() returns the row number, from which 1 is subtracted to give an offset from row 1 of one step less than the row number of the formula's position.
    D2: =INDEX(OFFSET(Table 1 :: $X$1,0,0,ROWS(Table 1 :: $X)),ROW())
    This one uses OFFSET's ability to capture several values in an internal array, triggered here by adding a fourth argument to the function ( ROWS(Table 1::$X) ), to define the row-range as 'all of the rows in column X'. The values are extracted using INDEX.
    Although INDEX has its uses, here I think it is redundant, and would use either of the two previous examples.
    Regards,
    Barry

  • Dynamically changing row color in an ADF table?

    Hi,
    I am using Build JDEVADF_11.1.1.3.PS2_GENERIC_100408.2356.5660. Can anyone please let me know the code for dynamically changing the row color of an ADF table?
    Thanks,
    Vik

    well you can use EL on af:column inlineStyle property to change the color on condition
    e.g
    inlineStyle='#{(row.SelectedRow)?"background-color: Silver":""};a example can be found here it is changing color based on Checkbox selection http://baigsorcl.blogspot.com/2010/06/deleting-multi-selected-rows-from-adf.html

  • Dynamically changing table headers

    I already know the answer to this since I have spent couple of days previously trying to make this work but thought of putting this on the forum either way.
    Has anyone sucessfully been able to create dynamically changing headers before using a date column "MONYY"? Requirement is that the user is given a prompt selector for "MONYY" and the table will have values for "MONYY + and - 2 months". This "+ and -" 2 months needs to be dispayed as table headers
    E.g. User selects NOV12 and the table header needs to show "SEP12 Sales, OCT12 Sales, NOV12 Sales, DEC12 Sales, JAN13 Sales"
    I have tried everything possible by using the presentation variable in all sorts of functions, trying to pass a variable to a hidden prompt that automatically refreshes on a prompt application. This has been tawing with me and I want to put it to rest knowing that it cannot be acheived.

    It can't. At least not in that way. You could put the value (retrieved from a column or a varaible, your choice) into a column formula though and put it as a table section. Not the same as column headers, I know, but may be worth proposing as a workaround.

  • Dynamic change Rootuielement's properties such as swfFile value in WdDoModi

    Hi experts,
    I need to dynamically change one of the view's Rootuielement's properties - SWFFILE in WDDOMODIFYVIEW method.  I did some research, and could not figure out what the field is called (such as whether it is considered as an elemement), and how it is referernced in the WD programming.  As a result, I am able to search for reusable class and method for my need.  Could you please shine some light on me?  By the way, I am on basis 7.02 release. 
    Thank you very much,
    Debbie

    Hi Debbie,
    As how mentioned by Pooja the ROOTUIELEMENTCONTAINER is of type CL_WD_TRANSPARENT_CONTAINER. You can obtain its reference from within your WDDOMODIFYVIEW by saying as:
    data: lr_root type ref to cl_wd_uielement_container.
    lr_root ?= view->get_element( id = 'ROOTUIELEMENTCONTAINER'  ).
    Or
    You can directly use the below method to skip passing any id:
    lr_root ?= view->get_root_element(  ).
    Regards,
    Uday

  • Change background color of a table based on table cell values quickly.

    Is there a more effecient way to change the background color of a table based on the cell values of the table?
    I can do this cell-by-cell using the property node, but it is very slow. It helps a little by deferring panel update, but it is still slow. Is there a better way? 
    Thanks.
    Ian

    If you want to color each cell according to the value, you need to do it one cell at a time and the above answers don't apply.
    You can dramatically speed up things by defering front panel updates for the duration of the operation.
    (sample code can be seen in the top picture here)
    EDIT: I noticed you tried this already. Can you show us your code?
    How many cells need to be colored on average?  If there are not that many, first write the background color using -2,-2, the only write the few cells to be colored, skipping the rest.
    How big is the table? If it is much bigger than the table indicator, all you need is to color the visible parts whenever the data or the scroll position changes.
    LabVIEW Champion . Do more with less code and in less time .

  • Dynamically change waveform's y scale properties

    I have 8 stacked plots on a waveform. I would like to dynamically change the y scale name and min/max values for each plot (the user selects these). 
    Is it possible? Changing any of these properties only seem to effect the first plot. I have also tried setting Active Plot dynamically but it only effects the plot related properties (eg: Plot name).

    Hello abdel2,
    Please post the version of LabVIEW you are using as well as a screenshot of what you would like to achieve on the Front Panel.  Please also attach your VI for review and suggestions.
    Regards,
    George T.
    Applications Engineering Specialist
    National Instruments UK and Ireland

Maybe you are looking for

  • Firefox has been crashing a lot lately. All of this started with the 2nd-to-last Firefox update -- I refuse to do the new update because I'll lose an invaluable --to me-- add-on, ljlogin).

    It does happen when I have multiple tabs open, but I generally have a LOT of tabs open so this is not new behavior from my browsing, Firefox is just not handling it anymore. All of this started with the 2nd-to-last Firefox update -- I refuse to do th

  • Odd preview issue with pdf

    I have a pdf I created from Quark 7. There are a number of items with .5pt rules or boxes around them (for example, business card sized ads with a half point rule). Some rules show fine and others require me to zoom in very close to see them. If I zo

  • Bluetooth a2dp/avrcp

    Ever since a week after the first Iphones were released (when I bought my first one), I've been waiting for Iphone to support bluetooth a2dp/avrcp. I bought a 3G-S yesterday. I have 3 different a2dp/avrcp products I've paired it with: my Sony car ste

  • Use of external Aironet Antennas

    When comparing between the 2 models of external antennas (AIR-ANT5170P-R and AIR-ANT2460P-R), I noticed that they comes with different number of connectors (RP-TNC). The AIR-ANT5170P-R comes with two connectors, while the AIR-ANT2460P-R comes with on

  • Reverse play with audio

    Hi all In another place I frequent a poster has asked for suggestions for a media player or software that can play a file forwards and backwards with audio. He needs this feature to help his autistic son. Ideally it would be a simple player that inst