Numbers set cell value

Hi Guys, might be a weird question but here goes.
am trying to create a formula that sets the values of other cells
meaning:
if A1 = 2
in B1 i will put: =IF(A1=2,C1=2,D1=0) which will check if cell A1 has the value of 2 and if so put the value 2 in cell C1 and if not will put the value of 0 in D1.
is that possible in numbers?
is there a way to do the same but with 2 cells changed at the same time?
meaning:
=IF(A1=2,C1=2 AND D1=2,D1=0)
thanks
ben

Hi Hubert (Ben),
A formula can not put a value into another cell.
Try this:
B2 =IF(A2=2,2,0) and fill down
In English:
IF A2 is equal to 2, then make me (B2) equal to 2, else make me equal to 0
To test for several conditions in the one formula, use one IF inside another (nested IFs), or use the AND() function.
Have a look at the Function Browser on the toolbar in Numbers.
Also the Numbers User Guide and the Formulas and Functions User Guide available from the Help Menu in Numbers
Regards,
Ian.

Similar Messages

  • Labview/excel: erreur -2147352567 dans Set Cell Value.vi

    Bonjour à tous,
    Je suis face à un problème insoluble.
    Je n'arrive plus à écrire dans une cellule excel.
    J'ai développé mon programme sous labview 2009 et fait des tests sur deux pc différents.
    Sur un, l'écriture cellule fonctionne  sur l'autre j'ai toujours l'erreur -2147352567 dans Set Cell Value.vi.
    J'ai changé de pc et je suis passé de XP à Seven, installé labview 2009, mon programme bloque toujours sur le vi Set Cell Value.
    Comment puis je solutionner mon problème? recompiler le programme?
    Tous vos retours seront les bienvenus.
    Cdlt
    Solved!
    Go to Solution.
    Attachments:
    test-ecrire-excel.pdf ‏139 KB
    essai_ecrire_excel.vi ‏29 KB

    Bjr à tous,
    Le problème vient des modes de compatibilités d'excel entre 2003 et 2007-2010.
    Vous ne pouvez pas gérer des fichiers en .xls ou .xlsx sur la même application.
    Cela peu fonctionner un temps mais cela ne dure pas.
    La solution ensuite est de convertir tous vos fichiers en extension .xlsx et tout rentre dans l'ordre.
    Tout ceci est la joie d'excel et des logiciels à licence.
    A+ pour un autre sujet de discussion.

  • Set cell value performance...

    Hi,
    I'm trying to find out if any of you have a faster way of setting values in Matrix as for any System cell value like ItemCode, not just UDF's
    My actual code looks like that but I'm wondering if there's a faster way as right now, it is slow and having to set multiple values in matrix makes the addon very slow and unacceptable by customers
    public static object SetCellValue(SAPbouiCOM.Matrix Matrix, object ColumnUID, int Row, object Value)
        SAPbouiCOM.Column Column = Matrix.Columns.Item(ColumnUID);
        SAPError = "";
        object Cell = null;
        switch (Column.Type)
            case (SAPbouiCOM.BoFormItemTypes.it_EDIT):
            case (SAPbouiCOM.BoFormItemTypes.it_EXTEDIT):
            case (SAPbouiCOM.BoFormItemTypes.it_LINKED_BUTTON):
                SAPbouiCOM.EditText Editor = (SAPbouiCOM.EditText)Column.Cells.Item(Row).Specific;
                Cell = Editor;
                Editor.Value = Value.ToString();
                break;
            case (SAPbouiCOM.BoFormItemTypes.it_COMBO_BOX):
                SAPbouiCOM.ComboBox ComboBox = (SAPbouiCOM.ComboBox)Column.Cells.Item(Row).Specific;
                Cell = ComboBox;
                ComboBox.Select(Value, SAPbouiCOM.BoSearchKey.psk_ByDescription);
                break;
            case (SAPbouiCOM.BoFormItemTypes.it_CHECK_BOX):
                SAPbouiCOM.CheckBox chk = (SAPbouiCOM.CheckBox)Column.Cells.Item(Row).Specific;
                Cell = chk;
                chk.Checked = bool.Parse(Value.ToString());
                break;
        return Cell;

    Hi Marc,
    The new method GetCellSpecific of the matrix object is much faster than casting a cell to a particular control type using its Specific property:
    SAPbouiCOM.EditText Editor = (SAPbouiCOM.EditText)Matrix.GetCellSpecific(ColumnUID, Row);
    This should be noticeably faster than the older method and works for system matrices as well as user-defined ones.
    Kind Regards,
    Owen

  • Setting cell values in DataGrid

    I have an application with a custom component called DataEntryDataGrid (which is a subclass of mx:DataGrid) that I based on this blog post:  http://blogs.adobe.com/aharui/2008/03/custom_arraycollections_adding.html
    The component works great, but in this particular datagrid I need some special functionality.   After the first row of data is entered and the user tabs into the next row, I need the first and second columns to be filled in based on the values of the previous row, and then I need it to automatically focus on the third column's cell.  While the first and second columns should be still editable, they will be largely repetitive, and it would help if the users didn't have to enter the same numbers again and again.  The first column in a new row should be the same value as the first column in the last row, and the second column in a new row should be (last row's value +1). Example:
    DataGrid:
    | Slide No. | Specimen No. | Age | Weight | Length |
    |    1      |     1        |  5  |  65    |  40    |  <- This row is manually entered, just text inputs
    |    1*     |     2*       |  #  |        |        |
    * = values set programatically, these cells should still be focusable and editable
    # = this is where the focus should be
    The problem I'm having is that when I tab into the next row, the first column value doesn't get set.  The second column gets set to the correct value and displayed correctly, and the focus is set to the correct cell (the third column), but the first column remains empty.  I'm not sure why this is.  If I set a breakpoint in the code during the function focusNewRow()  (which is called at the dataGrid's "itemFocusIn" event)  the value of "slideNo" (first column) is set to the correct value, but after the "focusNewRow" functions finishes, a trace of dataProvider[the current row].slideNo shows the value is blank.  Not null, just blank.  Traces of all other columns show the correct values.  Anyone have any ideas?  Here's the code for my main application:
    <?xml version="1.0" encoding="utf-8"?>
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
             xmlns:s="library://ns.adobe.com/flex/spark"
             xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600" xmlns:components="components.*">
      <fx:Script>
        <![CDATA[
          import mx.controls.DataGrid;
          import mx.events.DataGridEvent;
          public function traceSlideNo():void {
            var i:int;
            var g:Object = myDataGrid.dataProvider;
            for(i = 0; i < g.length -1; i++) {
              trace("sl: " + g[i].slideNo + ", sp: " + g[i].specimenNo + ", age: " + g[i].age);
          public function focusNewRow(e:DataGridEvent):void {
            if(e.currentTarget.dataProvider.length > 0 && e.rowIndex != 0 && e.columnIndex == 0) {
              var dg:DataGrid = e.currentTarget as DataGrid;
              var lastItem:Object = dg.dataProvider[e.rowIndex - 1];
              var targetItem:Object = dg.dataProvider[e.rowIndex];
              if(targetItem.specimenNo == "") {
                var focusCell:Object = new Object();
                focusCell.rowIndex = e.rowIndex;
                focusCell.columnIndex = 2;
                dg.editedItemPosition = focusCell;
                targetItem.slideNo = int(lastItem.slideNo);
                targetItem.specimenNo = int(lastItem.specimenNo) + 1;
                callLater(dg.dataProvider.refresh);
        ]]>
      </fx:Script>
      <components:DataEntryDataGrid x="10" y="10" width="450" id="myDataGrid" itemFocusIn="focusNewRow(event)"
                      editable="true" rowHeight="25" variableRowHeight="false">
        <components:columns>
          <mx:DataGridColumn headerText="Slide No." dataField="slideNo" editable="true"/>
          <mx:DataGridColumn headerText="Specimen No." dataField="specimenNo" editable="true"/>
          <mx:DataGridColumn headerText="Age" dataField="age" editable="true"/>
          <mx:DataGridColumn headerText="Weight" dataField="weight" editable="true"/>
          <mx:DataGridColumn headerText="Length" dataField="length" editable="true"/>
        </components:columns>
      </components:DataEntryDataGrid>
      <s:Button x="10" y="195" label="Trace Slide Numbers" click="traceSlideNo()"/>
    </s:Application>
    And here's the custom component, DataEntryDataGrid, just for reference (placed in the "components" package in this example) :
    <?xml version="1.0" encoding="utf-8"?>
    <mx:DataGrid xmlns:fx="http://ns.adobe.com/mxml/2009"
           xmlns:s="library://ns.adobe.com/flex/spark"
           xmlns:mx="library://ns.adobe.com/flex/mx" initialize="init(event)"
           editable="true" wordWrap="true" variableRowHeight="true">
      <fx:Declarations>
        <!-- Place non-visual elements (e.g., services, value objects) here -->
      </fx:Declarations>
      <fx:Script>
        <![CDATA[
          import components.NewEntryArrayCollection;
          import mx.controls.Alert;
          import mx.controls.dataGridClasses.DataGridColumn;
          import mx.events.DataGridEvent;
          import mx.events.DataGridEventReason;
          import mx.events.FlexEvent;
          import mx.utils.ObjectUtil;
          private var arr:Array = [];
          private var ac:NewEntryArrayCollection;
          private var dg:DataGrid;
          public var enableDeleteColumn:Boolean;
          private function generateObject():Object
            // Returns a new object to the datagrid with blank entries for all columns
            var obj:Object = new Object();
            for each(var item:Object in this.columns) {
              var df:String = item.dataField.toString();
              obj[df] = "";
            return obj;
          private function isObjectEmpty(obj:Object):Boolean
            // Checks to see if the current row is empty
            var hits:int = 0;
            for each(var item:Object in this.columns) {
              var df:String = item.dataField.toString();
              if(obj[df] != "" || obj[df] !== null) {
                hits++;
            if(hits > 0) {
              return false;
            return true;
          private function init(event:FlexEvent):void
            dg = this;                // Reference to the DataEntryDataGrid
            ac = new NewEntryArrayCollection(arr);  // DataProvider for this DataEntryDataGrid
            ac.factoryFunction = generateObject;
            ac.emptyTestFunction = isObjectEmpty;       
            dg.dataProvider = ac;
            // Renderer for the DELETE column and Delete Button Item Renderer
            if(enableDeleteColumn == true){
              var cols:Array = dg.columns;
              var delColumn:DataGridColumn = new DataGridColumn("del");
              delColumn.editable = false;
              delColumn.width = 35;
              delColumn.headerText = "DEL";
              delColumn.dataField = "delete";
              delColumn.itemRenderer = new ClassFactory(DeleteButton);
              cols.push(delColumn);
              dg.columns = cols;
              dg.addEventListener("deleteRow",deleteClickAccept);
          private function deleteClickAccept(event:Event):void { // Handles deletion of rows based on event dispatched from DeleteButton.mxml
            dg = this;
            ac = dg.dataProvider as NewEntryArrayCollection;
            if(dg.selectedIndex != ac.length - 1) {
              ac.removeItemAt(dg.selectedIndex);
              ac.refresh();
        ]]>
      </fx:Script>
    </mx:DataGrid>
    Also, the file NewEntryArrayCollection.as which is referenced by the custom component.  This also goes in the "components" package:
    package components
      import mx.collections.ArrayCollection;
      public class NewEntryArrayCollection extends ArrayCollection
        private var newEntry:Object;
        // callback to generate a new entry
        public var factoryFunction:Function;
        // callback to test if an entry is empty and should be deleted
        public var emptyTestFunction:Function;
        public function NewEntryArrayCollection(source:Array)
          super(source);
        override public function getItemAt(index:int, prefetch:int=0):Object
          if (index < 0 || index >= length)
            throw new RangeError("invalid index", index);
          if (index < super.length)
            return super.getItemAt(index, prefetch);
          if (!newEntry)
            newEntry = factoryFunction();
          return newEntry;
        override public function get length():int
          return super.length + 1;
        override public function itemUpdated(item:Object, property:Object = null,
                           oldValue:Object = null,
                           newValue:Object = null):void
          super.itemUpdated(item, property, oldValue, newValue);
          if (item != newEntry)
            if (emptyTestFunction != null)
              if (emptyTestFunction(item))
                removeItemAt(getItemIndex(item));
          else
            if (emptyTestFunction != null)
              if (!emptyTestFunction(item))
                newEntry = null;
                addItemAt(item, length - 1);
    Sorry for the length of this post, but I hate seeing people post without including enough information to solve the problem.  If there's anything I've left out, let me know.

    Problem solved.  Actually, the NewEntryArrayCollection pointed to an outside function within the DataEntryDataGrid component to be used as a factory function for new objects.  I just set the factory function to scan the previous row's values and base the new row's values off of them.  Thanks again, Flex!
    New private function generateObject() to replace the previous one in DataEntryDataGrid.mxml, just in case others are curious:
    private function generateObject():Object
      // Returns a new object to the datagrid with filled in slide and
      // specimen no. columns and the rest of the columns blank
      var obj:Object = new Object();
      var thisDP:Object;
      for each(var item:Object in this.columns) {
        var df:String = item.dataField.toString();
        if(df == "slideNo") {
          thisDP = this.dataProvider;
          var newSlideNo:int;
          if(thisDP.length > 1) {
         // looking for the last row of the DataGrid's dataProvider, but as
            // length is calculated differently in NewEntryArrayCollection.as
            // to account for the "dummy" row, we need to go back 2 rows.
            newSlideNo = int(thisDP[thisDP.length -2].slideNo);
          } else {
            newSlideNo = 1;
          obj[df] = newSlideNo;
        } else if(df == "specimenNo") {
          thisDP = this.dataProvider;
          var newSpecimenNo:int;
          if(thisDP.length > 1) {
            newSpecimenNo = int(thisDP[thisDP.length -2].specimenNo) + 1;
          } else {
            newSpecimenNo = 1;
          obj[df] = newSpecimenNo;
        } else {
          obj[df] = "";
      return obj;

  • Iam using a table in numbers to plot daily graph lines. If I fill a cell with a text box  at say zero it plots the graph. I can't actually set the cell value until the actual day but the graph plots it at zero when I don't want it to plot anything. Is tho

    I am using a table in Numbers to plot daily graph lines. Mood swings of how I am on the day, i"m a depressive.
    If I fill a cell with a step box at say zero it plots the graph. I can't actually set the cell value until the actual day but the graph plots it at zero when I don't want it to plot anything. Is there a work around. so thatbgraph only plots on the day?

    The answer is (sort of) in your subject, but edited out of the problem statement in the body of your message.
    When you use a stepper or a slider, the value in the cell is always numeric, and is always placed on the chart if that cell is included in the range graphed by the chart.
    But if you use a pop-up menu cell, you can specify numeric or text values in the list of choices for in the menu. Numeric values will be shown on the chart. Text values will not.
    For the example, the values list for the pop-up menu was:
    5
    3
    1
    Choose
    -1
    -3
    -5
    The first pop-up was set to display Choose, then the cell was filled down the rest of the column. Any text value (including a single space, if you want the cell to appear blank) may be used instead of Choose.
    For charts with negative Y values, the X axis will not automatically appear at Y=0. If your value set will include negative values, I would suggest setting the Y axis maximum and minimum to the maximum and minimum values on your menu list, rather than letting Numbers decide what range to include on the chart. Place a line shape across the chart at the zero level, and choose to NOT show the X axis.
    Regards,
    Barry

  • To set a value in matrix cell which is linked

    In sales order if I enter  form no of TAX TAB as "form c" , each cell of the TAX Code column of the matrix of contents tab should be set the value as "CST". I have tried to set the value, but it is showing "Form item not editable". I have tried to make the cell as editable but still the error message is coming and it is not setting the defined value. How can this be solved?
    Thankx in advance

    Hi Priya Manoj
    Some notes you can find on this [Thread: Set Value in Itemcode in Purchase Order Form|Set Value in Itemcode in Purchase Order Form;.
    There are I has posted some examples in vbcode.
    Hope the notes can help you.
    Regards
    Sierdna S.
    Edited by: Sierdna S on Oct 22, 2008 9:45 AM

  • How to set default value and bg color of cross tab cell?

    Hi all
    Which way can I set default value and background color for a crosstab cell where there are no any data?
    I try to pass it in following way
    if isnull(CurrentFieldValue) then
    But is has no effect.

    Hi,
    If your field is numeric
    if currentfieldvalue =0 then cryellow else crnocolor
    if the field is numeric but you don't see the 0 check check if : Suppress if zero is ticked in the Number format tab.
    Regards

  • Tables - How to get cell value? How to get/set UI controls properties?

    Hi,
    I want to get a the cell's value of row x and col y.
    The table is not bounded so I cannot use:
    Table1.Items(key).DataSourceRow.DataItem("ColID")
    Another question:
    How to I set the properties of a table column which contains UI elemtents that I create dynamically?
    for exmpale:
    c1 is a TableBodyCell
    tr is a tableRow
    c1 = New TableBodyCell(Table1, tr, 0)
    c1.TableCellContent = New InputField
    tr.Cells.Add(c1)
    How do I set/get the properties of the InputField?
    Thanks,
    Omri

    Thanks Reshef,
    My Table's scheme:
    Column 0 - TextView
    Column 1 - InputField
    I was able to get a cell value of type TextView by using what you suggested:
    Write(CType(Table1.Items(0).Cells(0).TableCellContent,TextView).Text)
    However, when I tried to do the exact thing to InputField I didn't get any value (nor error)
    Write(CType(Table1.Items(0).Cells(1).TableCellContent, InputField).Value)
    I fill the Input Field and then push "Execute" button which supposed to write the value.
    About my second question:
    By using the cast (CType) I can access the properties I need (like Width) so it kind of solve my problem.
    for example:
    CType(Table1.Items(1).Cells(1).TableCellContent, InputField).Width = "15px"

  • Permanently set Repeat cell values on table view obiee11g

    Hi,
    By default Analysis presentation Column comes with "Column Value Suppression" but we need to switch "Column Value Suppression" to "Repeat cell values" from source xml reference file
    Note:don't want to do it via analysis table/column properties(its manual work) ..just looking to change permanently by changing xml
    Thanks
    Deva

    Hi,
    What is that datatypeformats.xml ? couldn't find out. once again will explain my requirement
    Creating new analysis(Table/Pivot table view) and applying format as Repeat Cell by changing Table/Pivot Properties to set Enable alternating row "green bar" styling Repeat cell values on table/pivot view (instead of doing manual way)
    Refer the below image --> i just want to avoid manual enabling below Repeat cell option for entire table/pivot view option
    http://i.imgur.com/122wp.jpg?1
    Thanks
    Deva
    Edited by: Devarasu on Nov 26, 2012 5:06 PM

  • How to set ADF table cell value in managed bean

    Hi all,
    I have an ADF table on my page, let's assume with three columns with Input text box: col A, col B and col C where column C is hidden, when I click on Submit is possible to set in managed bean the value of column C for each rows?
    Thk in advance.
    L-

    Hi,
    you can create a button with an ActionListener. In the ActionListener you can iterate over the rows (using the iterator) and set the value on the attribute. If you need to save the changes you can call the commit operation binding.
    Linda

  • Default cell values for column not properly saved in uir file in labwindows 2009 (9.1.0 427)?

    I've run into a strange problem with the table control.  Basically, even though I set default cell values for a particular column as numeric, when I try to add items to the list it tries to add them as strings, and returns an error message that it is expecting *char instead of int.  Furthermore, when I open the uir file that contains the table in question in 2010, it appears as if the default cell values for that column are still set as strings, even though in 2009 when I open the uir file it shows as numbers.  I tried converting the uir to C code, and sure enough the C code indicated that the column still is a string type.
    I've gone ahead and made a small project to show the issue.  If you open this project in labwindows 2009 and click on the table in the table_bug.uir, and edit default cell values for column 1, you will see that the cell settings have type as numeric and data type as int.  When you run the project, however, it will fail with an error message saying that it is looking for a *char.  When this same project is loaded into labwindows 2010, clicking on the table in table_bug.uir and edit default cell values (column 1) shows the type as string.  When I change this to numeric (and change numeric attribute to int), this runs fine in 2010.  I tried simply changing the uir in 2010, and then using it in 2009, but 2009 complains that the uir is from a newer version (understandable).  If there is any workaround that would let me continue to use 2009 for the time that would be great.
    Any help would be greatly appreciated.
    thanks,
    Alex Corwin
    Solved!
    Go to Solution.
    Attachments:
    table_bug.zip ‏324 KB

    I opened the UIR in 2009 (but I have 2009 SP1) and it still showed that the default value for the first column was a string. I didn't have any problems changing it to a numeric int, and then building and running the project without error.
    Here are a few things you can try:
    1) Change the default value to a string. OK out of the dialog, re-enter the dialog, and change it back to Numeric int. Resave and see if the problem has gone away.
    2) You said you get a ".UIR is from a newer version" error when opening the 2010 UIR in 2009. Does the UIR still open if you click okay? Often times this will work just fine. Assuming you don't have any problems with this, make a minor change to the UIR in 2009, such as moving the table to the left, and then back to the right and then re-save. See if your program works now.
    Kevin B.
    National Instruments

  • Setting cell color in ALV

    Hi All
    I would be greatful if someone could please help...
    I am still attempting to get cells painted within a WDA ALV grid display.
    I have tried to use the method stated in the WDA sap press book - but this method is for use with TABLE element and I am using a ViewContainerUIElement for my table. There are mentions of wonderful ways to color cells in a list display - but I cannot understand how this can be achieved. I currently have this working appart from the numeric numbers of the design being set into the relavant column cell.
    If anyone could help that would be great...
    Please see: http://picasaweb.google.co.uk/dave.alexander69/Pictures#5244800978549492338
       LOOP AT lt_zdata INTO ls_zdata.
            lv_index = sy-tabix.
    *       set column values
    *       loop at row data and set colour attributes of individual cells
            LOOP AT lt_columns ASSIGNING <fs_column>.
              lr_col_header = <fs_column>-r_column->get_header( ).
              lr_col_header->set_ddic_binding_field( ).
              CREATE OBJECT lr_input_field EXPORTING value_fieldname = <fs_column>-id.
              lr_column = lr_column_settings->get_column( <fs_column>-id ).
    *         for the date columns only...
              IF <fs_column>-id(4) = 'CELL'.
    *           get and set column dates from select option user input
                READ TABLE lt_dates INTO ls_dates INDEX 1.
                IF lt_dates IS INITIAL.
                  lr_col_header->set_text( 'Date' ).
                ELSE.
                  ls_dates-low = ls_dates-low + lv_incr_date.
                  MOVE ls_dates-low+2(2) TO lv_for_col_date+6(2).   "Year
                  MOVE ls_dates-low+4(2) TO lv_for_col_date+3(2).   "Month
                  MOVE ls_dates-low+6(2) TO lv_for_col_date(2).     "Day
                  MOVE lv_for_col_date   TO lv_col_date.
                  lr_col_header->set_text( lv_col_date ).
                  lv_incr_date = lv_incr_date + 7.
                ENDIF.
                LOOP AT lt_orgdata_dates INTO ls_orgdata_dates
                  WHERE crew = ls_zdata-crew
                    AND position = ls_zdata-position
                    AND name = ls_zdata-person
                    AND trip_arr >= ls_dates-low
                    AND trip_dep <= ls_dates-low.
    *             column heading settings
                  lr_field = lr_table->if_salv_wd_field_settings~get_field( <fs_column>-id ).
                  lr_field->if_salv_wd_sort~set_sort_allowed( abap_false ).
    * trying to set cell variants ?@#??!!???
    *              lr_cv = lr_column->set_key( ls_zdata-variance ).
    *              lr_cv->set_editor( lr_input_field ).
    *              lr_cv->set_cell_design( value = '01').
    *              lr_column->add_cell_variant( lr_cv ).
    * current method of seeting the cell colors... (but puts value in cell!)
                  FIELD-SYMBOLS: <fs> TYPE data.
                  lr_column->set_cell_design_fieldname( value = <fs_column>-id ).
                  ASSIGN COMPONENT <fs_column>-id OF STRUCTURE ls_zdata TO <fs>.
                  WRITE: CL_WD_TABLE_COLUMN=>e_cell_design-one TO <fs>.
                  MODIFY lt_zdata FROM ls_zdata. " INDEX lv_index.
                ENDLOOP.
              ENDIF.
    Kind Regards
    Dave Alexander

    Hi check this code to set cell colors for ALV grid.
    Take a context attribute with type WDUI_TABLE_CELL_DESIGN.
    Here i am populating colors based on some condition.Check the loop of the internal table.
    method get_flight_details .
    data:node_flights type ref to if_wd_context_node,
         it_flights type sflight_tab1,
         ls_flights type sflight,
         it_final type   if_componentcontroller=>elements_flights,
         ls_final type   if_componentcontroller=>element_flights.
        select * from sflight into table it_flights
    up to 100 rows.
        node_flights = wd_context->get_child_node( 'FLIGHTS' ).
        loop at it_flights into ls_flights.
           move-corresponding ls_flights to ls_final.
           if ls_final-price = '185.00'.
              ls_final-readonly = abap_true.
              ls_final-celldesign =
    cl_wd_table_column=>e_cell_design-badvalue_light.
           else.
              ls_final-readonly = ' '.
              ls_final-celldesign =
    cl_wd_table_column=>e_cell_design-goodvalue_light.
           endif.
           append ls_final to it_final.
        endloop.
        node_flights->bind_table(
            new_items            = it_final
            set_initial_elements = abap_true
    *        INDEX                = INDEX
    data: l_ref_cmp_usage type ref to if_wd_component_usage.
    l_ref_cmp_usage =   wd_this->wd_cpuse_alv( ).
    if l_ref_cmp_usage->has_active_component( ) is initial.
       l_ref_cmp_usage->create_component( ).
    endif.
    data: l_ref_interfacecontroller type ref to iwci_salv_wd_table .
    l_ref_interfacecontroller =   wd_this->wd_cpifc_alv( ).
       data:
         l_value type ref to cl_salv_wd_config_table.
       l_value = l_ref_interfacecontroller->get_model(
    * Make Price column editable
    data:l_column type ref to cl_salv_wd_column,
          l_column1 type ref to cl_salv_wd_column,
          lr_input type ref to cl_salv_wd_uie_input_field,
          l_input1 type ref to cl_salv_wd_uie_input_field.
    l_column = l_value->if_salv_wd_column_settings~get_column( 'PRICE' ).
    create object lr_input
      exporting
        value_fieldname = 'PRICE'
    l_column->set_cell_editor( value = lr_input ).
    * to make some cells non editable
    lr_input->set_read_only_fieldname( value = 'READONLY' ).
    l_value->if_salv_wd_column_settings~delete_column( id = 'READONLY'   )
    *Set the table Editable
    l_value->if_salv_wd_table_settings~set_read_only( value = abap_false ).
    *Give colors to cells
    l_column1 = l_value->if_salv_wd_column_settings~get_column( 'CARRID' ).
    l_column1->set_cell_design_fieldname( value = 'CELLDESIGN'  ).
    l_value->if_salv_wd_column_settings~delete_column( id = 'CELLDESIGN' )
    endmethod.
    Thanks
    Suman

  • Ok so i'm trying to do a conditional format on numbers if (cell a2) = greater than or text then make the same cell or another cell do something. Does anybody knows how to do that on numbers. thanks.

    hi I'm from Italy.
    ok so i'm trying to do a conditional format on numbers if "a cell" = greater than or text then make the same cell
    or another cell do something like insert a number or change color.
    Does anybody knows how to do that on numbers?. thanks.

    Among the things you'll learn from the User Guide:
    Conditional formatting can be used to change the style of the text in a cell and/or the fill colour of the cell.
    A formula may be used to set the value in a cell. In both cases, the format rule or the formula affects only the cell to which the rule is attached or which contains the formula. Neither values or formats may be 'pushed' onto another cell.
    Regards,
    Barry

  • Need help with Report Generation Toolkit: Excel Set Cell Format.vi

    Hi people,
    I've been searching and found this old thread of someone asking what is the input parameter "Number format". And I dont know what should I put in there. I've tried so many possibilities, but nothing works so far, such as:
    0,0
    0,?
    0,#
    #,0
    ?,0
    and also with @, doesnt works. Where would I find help about this parameter?
    I'm using Excel2003, german version, thus local decimal separator is a comma.
    I also found this help from NI, but seems doesnt help me either. Do I miss something important?
    thanks,
    Yan. 

    Hi,
    I've used your suggestion and some numbers in excel doesnt need to get "right click, change to numbers" anymore (green indicators on the left-top side in some cells are gone). But, I think its still not a number, because I cant use a simple formula, such as in cell A10 I type "= A1/2" (cell A10 equals cell A1 divided with 2) . I got error which says its not a number.
    Well, but other thing is found, any format-string I put in the input of Excel Set Cell Format.vi, such as #,########, will be shown the same as "customize #,########" if I right click in a cell in excel and click "Zellen formatieren" (formatting cell). But however, the numbers are still depends on the input of the format I put in the Append Table to Report.vi.
    regards,
    Yan.

  • Get Current Selected Cell Value in an af:table

    Using JDeveloper 11.1.1.3.0
    I currently have a requirement where i need to call a server method and pass the value of the current selected Cell value in my af:table.
    The reason why i can't just make use of the currentSelectedRow is because i have a set of Columns (NumericValue1,NumericValue12,...NumericValue1n) and my server method can't really tell which cell i picked.
    So far, what i did is that i utilized F. Nimphius's article about using contextMenu and passing a clientAttribute.
    Re: How to pass parameter to inline popup when mouse over
    I'm hoping to do the same thing but without raising a popup on right click. So basically, i'm hoping to select an outputText in the table and this value will be stored in a pageFlowScopeBean.
    Has anybody encountered something similar?
    Thanks.

    Hi Barbara,
    You're aproach sounds intersting.
    So you mean to say, i'll create a component which has a bindings to my pageDefinition which needs to have it's clientComponent attribute set to true i believe so that my javascript can find this component.
    Then, i'll write a javascript that handles the focus event which then stores the clientAttribute value and stores that in the hidden component mentioned earlier. I'm guessing that once i set the newValue to the hidden component, it should be posted to the pageDef bindings upon hitting server side calls.
    I'll try this out and give an update on it.

Maybe you are looking for

  • Email PDF from SmartForms but it is editable

    In SD, we are emailing the invoice in PDF from SmartForm. The problem we are facing is that PDF is editable and we would like to protect PDF from editting for security reason. is it possible to control attribute of PDF file from SAP at the point of s

  • Beachball on boot with MacBook Air + kernel_task using 138% of CPU

    My wife's MacBook Air has recently become unusable - when you boot, it seemingly operates fine until the Finder launches, at which point the beachball appears and persists indefinitely. No applications can be launched, files accessed, etc - the only

  • Selecting an item twice in JList

    Hy, I have create a JList with some animal's name in it. When I click on one of the animal's name for the FIRST time, it appears in a JTextArea. What I want is that when I click on that same name consecutively, it appears again in that JTextArea. Can

  • Is there a widget with I can open a text frame with a button and close it with the same botton?

    No lightbox, no rollover. Click on the same botton I need to use it in mobile version. I need add text information on the image of my project in the mobile website version. I tried here in the second image but I used 2 button; I can't hide the X butt

  • I want help

    Hello, i want to know on which line at which place my text cursor is moving. i want to access line number. as jn ms word where is your cursor you can get the line number and position. How can i get line number and position of text cursor in JTextPane