Refresh Cell Value Of Column Based On Condition

Hi Experts,
I m working on UI5 grid.
This my grid:
My requirement is:
On change of "Actual Value ", if value is in between UL and LL then "Sub Test" column should be refreshed with image(ex.green ! mark)
Till Now i achieved upto comarision in columns:
But now i stucked with ,how to refresh image in "Sub Test" column based on valued entered in "Actual Value" column.
Request your ideas.
Regards,
Neha

You can also use CalcFields to bind to your data if you don't want the Icon column to be part of you model.
Documentation/AdvancedTopics/DataBinding/CalcFields – SAPUI5 Wiki (TIP CORE User Interface)
I've modified Dennis' example slightly to use a CalcField, notice the paths are defined to create a composite binding, the data is the automatically passed to the formatter function.
http://jsbin.com/poren/1/edit
Regards,
Jason

Similar Messages

  • 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

  • Hide column based on condition on other column in table

    hi,
    am using BIP 10.1.3.2 to generate reports.In the template i need to hide one column based on condition on other.am using SQL query as my data source type.can anybody help me ?

    Use <?if:?> condition in the RTF, but its mainly for the rows not column. You can work around this by handeling in backend. Or take two separate tables, one with the column which you want to hide and another table without that column and before calling that table use IF condition.
    Regards,
    Amit D
    Persistent Systems Ltd.

  • How to? Suppress Crosstab Total column, based on condition, Please help!

    Hi All,
    Please give an advice on the following:
    My problem I have an item stock and value by depo by region report, with the following structure:
    http://img29.imageshack.us/img29/5289/ctab.jpg
    Row 1 is Items
    Column 1 is region, has six values (value 1->6), but its grouped in specified order like: value 1, value 2, other (all other values as one, with the name of "other")
    Column2 is depo.
    I need to hide the sum next to depo (highlited whit thin red on the pic), but only where column 1 (region)  is "other".
    i tried useing suppress, and conditional highlighting (its acceptable if the column is made blank by useing white as text color)
    if GridRowColumnValue("Region") = "other"
    Region is set for the Column1 grouping as alias in Crosstab expert.
    I usualy get the error: "This is not a name for a grid group for the field being formated."
    or if it's no error in it, it simply stays on the form.
    What am I missing? Is it even possible to do this?
    Thank you, for all of your help in advance.
    Regards,
    Daniel
    Edited by: Daniel Omaisz Takacs on Sep 14, 2010 2:49 PM

    The only way to suppress a "column" is to not pull that data.
    You can turn the column header white as well - highlight with
    if CurrentFieldValue="your value" then white else black
    or
    CurrentFieldValue="your value"   // conditional suppression

  • How to Hide Columns Based on Condition

    Hi All,
    i have an SSRS Report with below four columns.
    Product_Name , Year , Credit_Amount , Debt_Amount
    I want to hide the Credit_Amount Column if that column all values are Zero.
    In the same way needs to hide Debt_Amount Column if that column all values are Zero.
    Thanks in advance.
    bala krishna

    Step 1- Right click on your required Column here in below example: I wanted to hide
    Name column
    and select Column Visibility
    Step 2- From the
     Column Visibility window , select Show or hide based on an expression and
    then click on fx button as shown in below screenshot
    Step 3- Write Your expression in expression windows as below
    =IIF(Fields!Credit_Amount.Value = 0, True, False)
    Repeat step 1 to Step 3  for Debt_Amount column .
    Sandip Pani http://SQLCommitted.com

  • Wrong value of qty based excise condition in migo

    Dear all,
       I am using taxinn procedure. Condition type JMIQ/JMOQ is maintained in po. Calculations are correct at po level but while doing migo the condition value gets doubled. What could be the reason? I've already checked for duplicate records.
    Thanks in anticipation.

    Hello,
    have u used any calculation type ? if yes then remove that first.Please check in Tax procedure.
    regards,
    sujit

  • SQL Help: Derive "new" columns based on condition

    Hello all,
    Can someone please help me with this ? I am trying to achieve this in a SQL ( not PL/SQL), if it can be done in two different steps, even that is fine too...
    Thanks in advance,
    Chandu
    SELECT * FROM
    SELECT 2765 BTCH_ID,'payroll' BTCH_NM,'payroll~EUR~EUR~DE'NEW_BTCH_NM,'1234'TMPLT_ID FROM DUAL
    UNION
    SELECT 2765,'payroll','payroll~USD~USD~US','1235' FROM DUAL
    UNION
    SELECT 2765,'payroll','payroll~USD~USD~US','1236' FROM DUAL
    UNION
    SELECT 2765,'payroll','payroll~GBP~GBP~GB','1237' FROM DUAL
    UNION
    SELECT 2766,'SALARY','SALARY~USD~USD~US','1238' FROM DUAL
    UNION
    SELECT 2766,'SALARY','SALARY~USD~USD~US','1239' FROM DUAL
    ) T_BATCH;For a "Batch-id" there exists multiple Transactions which are denoted by ( cr_crncy_cd , dr_crncy_cd , recvr_cntry_cd), and "NEW_BTCH_NM" column is basically a concatenation of "BTCH_NM" + above 3 columns ( with a ~)
    I am trying to derive two new columns 'SEQ' & 'Output_Batch_name'
    SEQ column:
    For every batch_id, the first row will be assigned by sequence.nextval.
        For all transactions within BTCH_ID,
                       all the rows with same NEW_BTCH_NM, share the same sequence number
                        if different, then SEQ.nextval for all distinct rows
    Output_BTCH_NM:
       for a given batch_id,
             if the NEW_BTCH_NM is the same for all transactions ( batch_id 2766 in the below example) , 
                             then Output_BTCH_NM = BTCH_NM should be marked for All transactions which belong to this Batch_id,
            Else
                Output_BTCH_NM = New_BTCH_NM
         END if
    Expected OUTPUT
    *BTCH_ID     BTCH_NM             NEW_BTCH_NM          TMPLT_ID     SEQ         Output_BTCH_NM*
    2765       payroll                payroll~EUR~EUR~DE     1234         1          payroll~EUR~EUR~DE
    2765       payroll                payroll~GBP~GBP~GB     1237         2          payroll~GBP~GBP~GB
    2765       payroll                payroll~USD~USD~US     1235         3          payroll~USD~USD~US
    2765       payroll                payroll~USD~USD~US     1236         3          payroll~USD~USD~US
    2766       SALARY                SALARY~USD~USD~US     1238         4          SALARY
    2766       SALARY                SALARY~USD~USD~US     1239         4          SALARYEdited by: user10711957 on Sep 25, 2010 4:37 PM

    Can someone please help me with this ? I am trying to achieve this in a SQL ( not PL/SQL), if it can be done in two different steps, even that is fine too...
    Thanks in advance,
    Chandu
    SELECT * FROM
    SELECT 2765 BTCH_ID,'payroll' BTCH_NM,'payroll~EUR~EUR~DE'NEW_BTCH_NM,'1234'TMPLT_ID FROM DUAL
    UNION
    SELECT 2765,'payroll','payroll~USD~USD~US','1235' FROM DUAL
    UNION
    SELECT 2765,'payroll','payroll~USD~USD~US','1236' FROM DUAL
    UNION
    SELECT 2765,'payroll','payroll~GBP~GBP~GB','1237' FROM DUAL
    UNION
    SELECT 2766,'SALARY','SALARY~USD~USD~US','1238' FROM DUAL
    UNION
    SELECT 2766,'SALARY','SALARY~USD~USD~US','1239' FROM DUAL
    ) T_BATCH;For a "Batch-id" there exists multiple Transactions which are denoted by ( cr_crncy_cd , dr_crncy_cd , recvr_cntry_cd), and "NEW_BTCH_NM" column is basically a concatenation of "BTCH_NM" + above 3 columns ( with a ~)
    I am trying to derive two new columns 'SEQ' & 'Output_Batch_name'
    SEQ column:
    For every batch_id, the first row will be assigned by sequence.nextval.
        For all transactions within BTCH_ID,
                       all the rows with same NEW_BTCH_NM, share the same sequence number
                        if different, then SEQ.nextval for all distinct rows
    Output_BTCH_NM:
       for a given batch_id,
             if the NEW_BTCH_NM is the same for all transactions ( batch_id 2766 in the below example) , 
                             then Output_BTCH_NM = BTCH_NM should be marked for All transactions which belong to this Batch_id,
            Else
                Output_BTCH_NM = New_BTCH_NM
         END if
    Expected OUTPUT
    *BTCH_ID     BTCH_NM             NEW_BTCH_NM          TMPLT_ID     SEQ         Output_BTCH_NM*
    2765       payroll                payroll~EUR~EUR~DE     1234         1          payroll~EUR~EUR~DE
    2765       payroll                payroll~GBP~GBP~GB     1237         2          payroll~GBP~GBP~GB
    2765       payroll                payroll~USD~USD~US     1235         3          payroll~USD~USD~US
    2765       payroll                payroll~USD~USD~US     1236         3          payroll~USD~USD~US
    2766       SALARY                SALARY~USD~USD~US     1238         4          SALARY
    2766       SALARY                SALARY~USD~USD~US     1239         4          SALARY

  • Dragging one cell value(copy) across columns or across rows in ALV layout

    Hi friends,
    In bps layouts, data is displayed in ALV grid as interface. At plng folder level, can i incorporate excel feature like dragging one cell value across columns or across rows?  Simply if user enter one value in cell of ALV grid, that should be copied automatically across rows/columns while dragging?
    Second question, even i chose in layout builder excel as interface, that layout showed in plng folder as ALV grid layout. Why it happens so. I read documentation in UPSPM of that particular plng folder, it tells same thing(even if u choose excel, it will show in ALV only). So how can i get excel interface in plng folder?
    Regards,
    Kumar

    requested property is not possible at ALV layout level. Provided text document load facility to user. So user can directly load excel to plng folder.
    Issue resolved.

  • Setting default value to columns on tabular form is not working.

    Hi,
    I created a tabular form and i want to set some default values to columns based on the values in page items.
    so i set the page item to column value in tabular form attributes by selecting the Default type as PLSQL Expression & Function DEFAULT value &P24_ISSUE_ID. it worked fine but
    in the similar way i tried for the another column by selecting the default type as pl/sql expression & function and default value &P24_CASE_NAME.
    but it throwing an error for this like failed to parse SQL query:    ORA-00904: "C254DB": invalid identifier
    i don't understand where i gone wrong even i checked for the data types of the columns, everything is fine.
    so please help me out of this problem.

    Tulasi 1243 wrote:
    for the first column
    i selected
    DEFAULT TYPE as PL/SQL Expression & FUNCTION
    Default as *&P24_ISSUE_ID.* This is a number data type column
    2nd column
    Default Type as PL/SQL Expression & Function
    Default as *&P24_CASE_NAME.* This is Varchar2 data type column.The appropriate options for a default value from a page item are Item (application or page item name) for Default Type and the item name ( P24_ISSUE_ID, P24_CASE_NAME etc) for Default.
    *&P24_ISSUE_ID.* is not a "PL/SQL Expression or Function".
    but it throwing an error for this like failed to parse SQL query: ORA-00904: "C254DB": invalid identifierWhat you are doing results in the APEX engine substituting the P24_CASE_NAME value "C254DB" into the default value and then trying to evaluate this string as a piece of PL/SQL. Outside of a block in which it is defined as a variable, constant or function "C254DB" is not a valid PL/SQL expression.

  • Need help in WAD 7.0 - anaylsis item cell value as filter to another web...

    Hi ,
    I need help in WAD 7.0
    i have 2 web items, analyis item 1 & 2
    when user clicks any cell value in column xxx of analysis item1, then i need to filter the analysis item 2 values for  column xxx  , for that user clicked value.
    how do i enable this ?

    Hi.
    You can try the nxt approach:
    1. in analysis item A (first) properties define in "behaviour" -> "row selection" = "single with command".
    2. set this command to "SET_SELECTION_STATE_BY_BINDING".
    3. define "data provider affected" = your second data provider for analysis item B.
    4. in "selection binding" set needed variables to binding type "VARIABLE"
    In this case, when you select any row in analysis item A some variables will be populatd from this row and affect on analys item B (dataprovider B).
    Regards.

  • Is it possible to apply conditional formatting to a cell (or range) based upon a LOOKUP query to cell values in another sheet.? I want to alter the formatting (i.e., text and/or cell background color), but not cell content.

    Is it possible to apply conditional formatting to a cell (or range) based upon a LOOKUP query to cell values in another sheet.?
    I want to alter the formatting (i.e., text and/or cell background color), but not the content, of the target cell(s).

    Hi Tom,
    Your LOOKUP formula will return a value that it finds in the "other" table. That value can be used in conditional highlighting rules. (Numbers 3 calls it conditional highlighting, not conditional formatting. Just to keep us awake, I guess, but it works the same).
    Please explain what you are trying to do.
    Regards,
    Ian.

  • Conditional Format based on cell value

    For example; want to turn a cell yellow if its value is less than another cell value.
    Is this possible?
    Conditional format rules don't seem to like cell references.

    There are many ways to call attention to a value that needs to be emphasized because of its relationship to other values. What you decide to do will be influenced by how particular you are about the end result vs. the trouble that you will have to go through to achieve it. When other cells need to reference a cell that may be either text or numeric, you can use the TRIM function, or other text functions, to remove interfering characters. Here's an example, where you can see the last row multiplying the previous, manipulated row, by 2.
    Also, all the cells are formatted as Currency, with to ill effect. In the example I left the cells with the conditional format in default alignment so you could see the added space character against the left margin of the cell.
    I think the easiest way to call attention to a cell is to add an adjacent row of column with a conditional expression that 'lights-up' when there is an alarm condition.
    Jerry

  • Conditional Formatting - how to change cell colour based on cell value

    I am in the process of moving some Excel spreadsheets into Numbers on my iPad. The Excel spreadsheet had conditional formatting in certain cells. If the cell value was less than a certain amount (<46 for example), the cell background would automatically turn yellow.
    Is there any way to make Numbers on iPad do this?
    Thanks for any help you can provide.
    Scott

    I beleive this is one of those doable tings on desktop that gets taken out on ipad. If you would like to suggest this as an idea for apple to put in, please go to http://www.apple.com/feedback

  • Custom itemRenderer component based on cell value: error 1009

    I'm working on an item renderer for a dataGrid that has different states depending on the cell and row values.
    The cell value is a toggle (true or null), and sets whether content should be shown in the cell or not
    The row properties determine what is shown when the cell value is true.
    The dataGrid dataProvider is populated based on user id input.
    I created the itemRenderer as a custom actionscript component, closely following this example:
    360Flex Sample: Implementing IDropInListItemRenderer to create a reusable itemRenderer
    However, my component results in Error #1009 (Cannot access a property or method of a null object reference) when a user id is submitted.
    package components
         import mx.containers.VBox;
         import mx.controls.*;     import mx.controls.dataGridClasses.DataGridListData;
         import mx.controls.listClasses.BaseListData;
         import mx.core.*;
         public class toggleCellRenderer extends VBox
              public function ToggleCellRenderer()
              {super();}
              private var _listData:BaseListData;   
                   private var cellState:String;
                   private var cellIcon:Image;
                   private var imagePath:String;
                   private var imageHeight:int;
                   private var qty:String = data.qtyPerTime;
                   private var typ:String = data.type;
              public function get listData():BaseListData
                   {return _listData;}
              public function set listData(value:BaseListData):void
                   {_listData = value;}
              override public function set data(value:Object):void {
                   super.data = value;
                   if (value != null)
                   //errors on next line: Error #1009: Cannot access a property or method of a null object reference.
                   {cellState = value[DataGridListData(_listData).dataField]}
              override protected function createChildren():void {
                   removeAllChildren();
                   if(cellState=='true'){
                        cellIcon = new Image();
                        addChild(cellIcon);
                   //there is another state here that adds another child...
              //next overrides commitProperties()...
    There are no errors if I don't use an itemRenderer--the cells correctly toggle between "true" and empty when clicked.
    I also tried a simple itemRenderer component that disregards the cell value and shows in image based off row data--this works fine without errors or crashing. But I need to tie it to the cell value!
    I have very limited experience programming, in Flex or any other language. Any help would be appreciated.

    Your assumption that the xml file either loads with "true" or nothing  is right.
    After modifying the code to the following, I don't get the error, but it's still not reading the cell value correctly.
    package components
         import mx.containers.VBox;
         import mx.controls.*;   
         import mx.controls.dataGridClasses.DataGridListData;
         import mx.controls.listClasses.BaseListData;
         import mx.core.*;
         public class toggleCellRenderer extends VBox
              public function ToggleCellRenderer()
               super();
              private var _listData:BaseListData;   
              private var cellState:Boolean;
              private var cellIcon:Image;
              private var imagePath:String;
              private var imageHeight:int;
              private var qty:String;
              private var typ:String;
               public function get listData():BaseListData
                 return _listData;
              override public function set data(value:Object):void {
                   cellState = false;
                   if (listData && listData is DataGridListData && DataGridListData(listData).dataField != null){
                       super.data = value;
                       if (value[DataGridListData(this.listData).dataField] == "true"){
                           cellState = true;
              override protected function createChildren():void {
                   removeAllChildren();
                   if(cellState==true){
                        cellIcon = new Image();
                        addChild(cellIcon);
                   //there is another state here that adds another child...
              //next overrides commitProperties()...
    - didn't set the value of qty or typ in the variable declarations (error 1009 by this too--I removed this before but wanted to point out in case its useful)
    - added back in the get listData() function so I could use the listData
    - changed the null check
    All cells are still returning cellState = false when some are set to true, even if I comment out [if (value[DataGridListData(this.listData).dataField] == "true")] and just have it look for non-null data. That shouldn't make a difference anyway, but it confirms that all cells are returning null value.
    Swapping out the first if statement in set data with different variables results in the following:
    [if (listData != null)]  all cells return null (cellState=false for all)
    both [if (value != null)] and  [if (DataGridListData != null)]  results in error 1009 on a line following the if, so I assume they return non-null values.
    All rows have data, just not all fields in all rows, so shouldn't listData be non-null?  Could it be that the xml file hasn't fully loaded before the itemRenderer kicks in?
    I also realized  I had removed the item renderer from many of the columns for testing, and since some columns are hidden by default only one column in the view was using the itemRenderer--hence the single alert per row I was worried about earlier.
    Thanks for your help so far.

  • Render a column based on other column value in the same table

    JDev 11.1.1.6.0
    This may be a silly question but I am stuck
    I need to conditionally render a column say A. Condition is like if the value in the other column B of same table is equal to F. I should render column A only when this condition is satisfied. I have tried the following code:
    <af:column sortProperty="PhoneNumber1"
    sortable="false"
    headerText="#{bindings.A.hints.PhoneNumber1.label}"
    id="c146"
    rendered="#{row.PhoneNumber1ResponseFlag eq 'F'}">
    <af:outputText value="#{row.PhoneNumber1}"
    id="ot130"/>
    </af:column>
    <af:column sortProperty="PhoneNumber1ResponseFlag"
    sortable="false"
    headerText="#{bindings.B.hints.PhoneNumber1ResponseFlag.label}"
    id="c80" rendered="true">
    <af:outputText value="#{row.PhoneNumber1ResponseFlag}"
    id="ot129"/>
    </af:column>
    The data shown in the table for column  PhoneNumber1ResponseFlag is F. Still my condition is not working.

    Timo was saying that it is not possible to render the column in some situations and not in anothers, you will always have to render the column.
    The best way to do this is instead of showing a column with the text ' ', show something meaningfull to the user. This is a DataWarehouse advice to you and may be usefull since you're using ADF in a area that uses DataWarehouse..
    So the code could be something like this (based on Timo's code):
    <af:column sortProperty="PhoneNumber1"
    sortable="false"
    headerText="#{bindings.A.hints.PhoneNumber1.label}"
    id="c146">
    <af:outputText value="#{row.PhoneNumber1ResponseFlag eq 'False.' ? row.PhoneNumber1 : 'No value applied.'"
        id="ot130"/>
    </af:column>
    <af:column sortProperty="PhoneNumber1ResponseFlag"
    sortable="false"
    headerText="#{bindings.B.hints.PhoneNumber1ResponseFlag.label}"
    id="c80">
    <af:outputText value="#{row.PhoneNumber1ResponseFlag}"
        id="ot129"/>
    </af:column>
    Hope that helps,
    Frederico.

Maybe you are looking for