Inserting a 'null' value in an IF THEN ELSE statement

Greetings,
I'm using Business Object webi XiR3
I'd like to return a 'null' value in certain cases for an IF THEN ELSE statement.  Depending on if I format the field as a text or a number, I can return blanks ("") and zeros (0).  However, what I really need to do is leave the field / column formatted as a number and return a 'null' value.  You can see the variable below ... this will return a blank but the column is text.
Suggestions?
thanks.
variable:
=If([Comp Rate Mid] = 0 And( ([Market Rate 50th].085) - [Annual Total Targeted Comp] >=0) ; ([Market Rate 50th]0.85) - [Annual Total Targeted Comp]; If([Comp Rate Mid] <> 0 And( ([Comp Rate Mid] 0.85) - [Annual Total Targeted Comp] >=0) ; ([Comp Rate Mid]0.85) - [Annual Total Targeted Comp];""))

I don't think this is possible using a formula, as formulas deal with content, and images can be placed in cells only as 'image fill', which is Format, rather than Content.
Might be possible using an AppleScript, but I'm not the person to advise you on that.
Regards,
Barry

Similar Messages

  • Insert a null value?

    does anyone know how to insert a null value?
    For example:
    insert into tbl_table (col1,col2)
    values (null,null)
    thanks.

    insert into tbl_table (col1,col2)
    values (null,null)
    This query will insert null into the DB, if the column "NOT
    NULL" property is false. Otherwise null can't be inserted into DB.
    If "NOT NULL" is true then,
    insert into tbl_table (col1,col2)
    values ('','') blank value can be inserted, but not null.
    Thanks
    Sankalan
    (www.mindfiresolutions.com)

  • If Then Else Statement in SAP R/3 BW

    Hi,
    Does anyone know how to create an If Then Else statement in BEX?
    Thanks,
    Mounika.

    Hi mounika,
    do this way
    If 'material number' > 0.
    rslt = 'enter into table'.
    else.
    rslt = 15.
    endif.
    A True condition always evaluates to 1, a False condition evaluates to 0.
    for more quieries in bw ..pls go through  the link
    http://sap.ittoolbox.com/groups/technical-functional/sap-bw
    pls reward if helps,
    regards.

  • Java If/Then/Else Statement

    Hello,
    Just wondering if it is possible to call one java file from within another.
    I'm thining wiht an if.then/else statement similar to
    If x==true
    then run file1.java
    else run file2.java
    any examples of this, or if it is even possible would be appreciated.

    This is something like what I would do.
    public class FileRunner {
        public static void main(String [] args) {
            if ( args[0].equals("file1") {
                File1 file1 = new File1();
                file1.init() //method you define in File1 that runs everything that would've been in the File1's main method
            } else if (args[0].equals("file2") {
                File2 file2 = new File2();
                file2.init() //method you define in file2 that runs everything that would've been in the File2's main method
            } else {
                System.err.println("Invalid argument");
                System.exit(1);
    java.exe FileRunner.class file1
    java.exe FileRunner.class file2The other method is to start a new jvm from within java, but that gives you less control than this imo.

  • How to total 2 colums with an -If then else- statement each

    Hello,
    I have 2 colums A en B who generate data based on an “If then else” statement.
    Colum A
    <?xdofx:if (OMZET_YTD_VJ )!='' then ((OMZET_YTD_VJ) * (BM_YTD - BM_YTD_VJ)) div 100 else 0 end if?>
    Colum B
    <?xdofx:if (BM_YTD)!='' then ((BM_YTD) * (OMZET_YTD - OMZET_YTD_VJ)) div 100 else 0 end if?>
    Colum C needs to be the sum of both. Who can help me?
    Thanks a lot.

    Can you send me the RTF template and xml file to [email protected]? I can take a look and try to help.
    Thanks,
    Bipuser

  • Usage of exists in if-then-else statements

    please correct the mistakes in this procedure regarding exists in the use of if then else statement .as i am new to oracle i am unable to do it.
    errors are statement ignored
    exists should be inside the statement;
    CREATE or replace FUNCTION CHECK_FG_Id
    p_LegacyDocumentId VARCHAR2,
    p_LegacyFGroupId VARCHAR2,
    p_TransmissionId INTEGER
    RETURN INTEGER as
    BEGIN
    IF EXISTS
    (Select FG.ControlNo from functionalgroup FG,document D
    WHERE FG.DocumentId=D.Id AND D.TransmissionId=p_TransmissionId
    AND FG.ControlNo=p_LegacyFGroupId AND D.ControlNo=p_LegacyDocumentId ) THEN
    Return 1;
    ELSE
    Return 0;
    END IF;
    end;

    Lots of different ways...One way is as follows:
    CREATE OR REPLACE FUNCTION check_fg_id (
    p_legacydocumentid VARCHAR2,
    p_legacyfgroupid VARCHAR2,
    p_transmissionid INTEGER) RETURN INTEGER AS
    vDoesItExist NUMBER;
    BEGIN
    SELECT COUNT (1)
    INTO vdoesitexist
    FROM functionalgroup fg,
    document d
    WHERE fg.documentid = d.ID
    AND d.transmissionid = p_transmissionid
    AND fg.controlno = p_legacyfgroupid
    AND d.controlno = p_legacydocumentid;
    IF vDoesItExist > 0 THEN
    RETURN 1;
    ELSE
    RETURN 0;
    END IF; /** vDoesItExist > 0 **/
    END check_fg_id;

  • IF THEN ELSE STATEMENT IN BeX Query designer

    Hi,
    I want to write a query as follows:
    IF <Value a> is available THEN <Value a> ELSE <Value b>
    I have written it as follows:
    (X>0)X+(X<=0)Y
    The problem with this equation is,  in case X = 0(number Zero) then Y is not getting displayed. But In case X =NULL (or no values) then Y displayed. This is leading to inconsistency in final result. Please help in rectifying the formula incase it is incorrect or is it because of some program bug in BeX?
    Regards
    Madhav

    This works for me...dont understand y its not working with u!!
    it is simple:
    (X<>0)X+(X==0)Y
    If X is 0, then  0X + 1Y = Y
    else
    1X + 0Y = X.
    What result you are getting in both cases?
    as you thing,X value is may not be 0 in your case. It may be 0.00004...something like that...Set Decimal Places to 5 or 6 to X.
    Message was edited by:
            Muralidhar C

  • How to insert a NULL value in SQL using JDBC Adapter

    Hi All,
    I have a File -> JDBC scenario.
    In the File and in the SQL table  I have a column called "MR_DATE" that needs to be mapped
    I have to do the following:
    If MR_DATE is NOT equal to "00000000"
             then pass MR_DATE to SQL table
    else
              set the MR_DATE column in the table as NULL.
    Please suggest
    regards,
    Piyush

    Hi Piyush,
    In the receiver JDBC adapter select the option Interpretation of Empty String Values as NULL.
    Pass date as empty, it will be interpreted as NULL by adapter and inserted in database.
    Regards,
    Gautam Purohit

  • How to insert a null value to combobox which is bind with datasource

    Hi,
    i am working on c# winforms application. I have 2 comboboxes one is CustomerCbBox and another is OrderCbBox. CustomerCbBox is bind with data source.
    on CustomerCbBox SelectedIndexChanged event data is populated in OrderCbBox from data source. 
    i want to add a null or empty field in CustomerCbBox. all I want is that when the user don't Select Customer Name and OrderNo null or empty data enter in database. but when i click Insert Button it generate error "Object reference is not "object
    reference not set to an instance of an object".
    here is my code.
      private void MainForm_Load(object sender, EventArgs e)
    production pd = new production();
    CustomerCbBox.DataSource = pd.Customer();
    CustomerCbBox.DisplayMember = "Cust";
    CustomerCbBox.ValueMember = "CustId";
     private void CustomerCbBox_SelectedIndexChanged(object sender, EventArgs e)
                      try
                          string PartyName = CustomerCbBox.SelectedIndex.ToString();
                           PONum1.DataSource = pd.GetPOnumActive(PartyName1);
                              PONum1.DisplayMember = "PONum";
                              PONum1.ValueMember = "PONum";
                      catch (Exception ex)
                          MessageBox.Show(ex.Message);
         Please help me to solve this problem thanks.      

    Hello,
    We could check whether the user has selected any items before adding that to database.
    if (CustomerCbBox.SelectedIndex > -1)
    // do something
    }else{//add dbnull to database}
    And for adding null to databse, we could pass DBNull.Value instead.
    Regards,
    Carl
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Use If then else statement to display concatenated values

    Hi,
    I am trying to create a field which will display 2 different names depending on the status of another field.
    Here is the code I have but it returns no data when I try it:
    <?xdofx:if ReportStatus='Approved' then concatenate(DisplayFirstName, DisplayLastName) else concatenate(InvFirstName, InvLastName) end if?>
    (Also I need to solve how to create a space between the first and last names)
    Any help would be appreciated thanks

    Use the following.
    <?choose:?>
    <?when:ReportStatus='Approved' ?>
    <?DisplayFirstName?> aspace <?DisplayLastName?> or <?concat(DisplayFirstName,' ', DisplayLastName)?>
    <?end when?>
    <?otherwise:?>
    <? InvFirstName?> a space <? InvLastName?>  or <?concat(InvFirstName,' ', InvLastName)?>
    <?end otherwise?>
    <?end choose?>

  • Access 2010 - If Then Else Statement to display text within text box upon Check Box True/False condition

    I have a form called myForm. On this form is a check box called myCheckBox. I also have a text box labeled myTextBox. I have assigned a macro, myMacro, to run upon selection/click of myCheckBox. The macro is an If statement which determines if myCheckBox
    is checked or not checked and spits out a value, "Yes" or "No" for example, into the text box.
    I am not able to get text to display into the text box although I am not receiving any errors when I run the macro. This may be a fault in my logic and would like help resolving where the problem lies. I am fairly new to Access so this could be something
    simple.
    My code is as follows:
    If Forms!myForm =  True Then
      Forms!myForm!myTextBox.Value = "Yes!"
    ElseIf Forms!myForm = False Then
      Forms!myForm!myTextBox.Value = "No!"
    Else
      Forms!myForm!myTextBox.Value = " / ERROR / " 
    End if
    Thanks!

    Hi,
    This is the forum to discuss questions and feedback for Microsoft Office, the issue is more related to coding/programing, you'd better post your question to the MSDN forum for Access
    http://social.msdn.microsoft.com/Forums/en-US/home?forum=accessdev&filter=alltypes&sort=lastpostdesc
    The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us. Thank you for your understanding.
    George Zhao
    TechNet Community Support

  • If then Else statement not working under Computation in APEX

    Hi
    Can anyone help me where I am going wrong? I am trying to use the following code in Computation Process on Submit. I am not able to get the value. It's showing nothing.
    Page:
    *Item Name (Value Required)
    Type
    Static Assignment
    PL/SQL Function Body
    SQL Query (return single value)
    SQL Query (return colon separated value)
    SQL Expression
    PLSQL Expression
    Item Value
    Computation Point
    *Sequence (Value Required)
    Computation Point
    On New Instance (new session)
    Before Header
    After Header
    Before Region(s)
    After Region(s)
    Before Footer
    After Footer
    After Submit
    Source
    *Computation (Value Required)
    BEGIN
    IF :P3_AGING_DAYS <= '0' THEN
    :P3_AGING_BUCKET := 'Within due date';
    elsif :P3_AGING_DAYS > '0' AND :P3_AGING_DAYS <= '3' then
    :P3_AGING_BUCKET := 'Within 3 days';
    end if;
    end;

    1efb2968-171d-43f9-9d5d-d38151735ed7 wrote:
    Please update your forum profile with a real handle instead of "1efb2968-171d-43f9-9d5d-d38151735ed7".
    Can anyone help me where I am going wrong? I am trying to use the following code in Computation Process on Submit. I am not able to get the value. It's showing nothing.
    BEGIN
    IF :P3_AGING_DAYS <= '0' THEN
    :P3_AGING_BUCKET := 'Within due date';
    elsif :P3_AGING_DAYS > '0' AND :P3_AGING_DAYS <= '3' then
    :P3_AGING_BUCKET := 'Within 3 days';
    end if;
    end;
    A PL/SQL Function Body computation has to return a value rather than assigning it to an item in the PL/SQL block (APEX turns the block into the body of a function). The item for which the value is to be computed is specified in the computation properties (P3_AGING_BUCKET).
    begin
      return case
               when :p3_aging_days < 1
               then
                 'Within due date'
               when :p3_aging_days between 1 and 3
               then
                 'Within 3 days'
             end;
    end;

  • [BIP Report] Could I use 'like' syntax inside if-then-else statement?

    I have the following contents in my xml, I would like to show the amount of the ChargeAmount, only if the "Code" is starting from "WAF"in my table.
    <Transaction>
         <Account>A</Account>
         <ChargeAmount>200</ChargeAmount>
         <Code>WAF020</Code>
    </Transaction>
    <Transaction>
         <Account>B</Account>
         <ChargeAmount>250</ChargeAmount>
         <Code>WAF003</Code>
    </Transaction>
    <Transaction>
         <Account>C</Account>
         <ChargeAmount>120</ChargeAmount>
         <Code>WNL012</Code>
    </Transaction>
    <Transaction>
         <Account>D</Account>
         <ChargeAmount>200</ChargeAmount>
         <Code>WNL002</Code>
    </Transaction>
    *** Note that the three digits after WAF is variable.
    Display Table:
    Account || ChargeAmount || Code
    A|| 200 ||WAF020
    B|| 250 ||WAF003
    C|| NULL ||NULL
    D|| NULL ||NULL
    In the ChargeAmount column I tried the following syntax, however, both of them does not work well.
    <?if: <xdoxslt:left(Code, 3)>  = 'WAF' ?> then ChargeAmount else ' ' ?end if?>
    <?xdofx if: Code  = 'WAF?' ?> then ChargeAmount else ' ' ?end if?>
    Could any expert provide work around for the above case?
    Thanks!
    Connie

    In the ChargeAmount column I tried the following syntax, however, both of them does not work well.
    <?if: <xdoxslt:left(Code, 3)>  = 'WAF' ?> then ChargeAmount else ' ' ?end if?>
    <?xdofx if: Code  = 'WAF?' ?> then ChargeAmount else ' ' ?end if?>
    incorrect code will not work
    not clear what do you want to do but try
    <?xdoxslt:ifelse(xdoxslt:left(Code,3)='WAF',’yes’,’no’)?>
    or
    <?xdoxslt:ifelse(contains(Code, 'WAF'),’yes’,’no’)?>

  • Help with setting a condition (if-then-else statements)

    Hello,
    In the following data template I am trying to create a condition for
    SUMAMOUNTPERKELEASE when cs_countfund > 1 in my rtf template.
    <dataTemplate dataSourceRef="xmlpdemo" name="cs_ar_kelease">
         <dataQuery>
              <sqlStatement name="Q_1">
                   <![CDATA[
    select     fm.ke
    ,     ltrim(to_char(fm.ke,'000')) || '-'
    ||     ltrim(to_char(fm.lease#,'000000')) || '-'
    ||     ltrim(to_char(fm.lse_code,'00')) kelease
    ,     fm.ar_doc# ar_doc
    ,     fd.fund
    ,     fd.sub
    ,     ro.lname
    ,     fm.billed_from
    ,     fm.billed_thru
    ,     fm.due_date
    ,     sum(decode(trancode,
              10, fd.amount,
              420, fd.amount,
              421, fd.amount,
              100, fd.amount*-1,
              101, fd.amount*-1,
              102, fd.amount*-1,
              109, fd.amount*-1,
              110, fd.amount*-1,
              112, fd.amount*-1,
              120, fd.amount*-1,
              121, fd.amount*-1,
              122, fd.amount*-1,
              130, fd.amount*-1,
              230, fd.amount*-1,
              0 )) amount
    from     finhist_main fm
    ,     rolodex ro
    ,     finhist_detail fd
    where     fd.fund <> 999
    and     fd.sub <> 99
    and     fm.status not in (106,110,120)
    and     fd.trancode <> 11
    and     fm.ar_doc# < 9000000
    and     fm.rolodex# = ro.rolodex#
    and     fm.lse_code = fd.lse_code
    and     fm.lease# = fd.lease#
    and     fm.ke = fd.ke
    and     fm.ar_doc# = fd.ar_doc#
    group by     fm.ke
    ,     fm.lease#
    ,     fm.lse_code
    ,     fm.ar_doc#
    ,     fd.fund
    ,     fd.sub
    ,     ro.lname
    ,     fm.billed_from
    ,     fm.billed_thru
    ,     fm.due_date
    order by     fm.ke, fm.lease#, fm.lse_code
    ,     fm.ar_doc#
    ,     fd.fund
    ,     fd.sub
    ]]>
              </sqlStatement>
         </dataQuery>
         <dataStructure>
              <group name="G_ke" dataType="varchar2" source="Q_1">
                   <element name="ke" dataType="number" value="KE"/>
                   <element name="SumamountPerke" function="sum" dataType="number" value="G_fund.amount"/>
                   <group name="G_kelease" dataType="varchar2" source="Q_1">
                        <element name="kelease" dataType="varchar2" value="KELEASE"/>
                        <element name="ar_doc" dataType="number" value="AR_DOC"/>
                        <element name="lname" dataType="varchar2" value="LNAME"/>
                        <element name="billed_from" dataType="date" value="BILLED_FROM"/>
                        <element name="billed_thru" dataType="date" value="BILLED_THRU"/>
                        <element name="due_date" dataType="date" value="DUE_DATE"/>
                        <element name="CS_countfund" function="count" dataType="number" value="G_fund.fund"/>
                        <element name="SumamountPerkelease" function="sum" dataType="number" value="G_fund.amount"/>                    <group name="G_fund" dataType="varchar2" source="Q_1">
                             <element name="fund" dataType="number" value="FUND"/>
                             <element name="sub" dataType="number" value="SUB"/>
                             <element name="amount" dataType="number" value="AMOUNT"/>
                        </group>
                   </group>
              </group>
         </dataStructure>
    </dataTemplate>
    <element name="CS_countfund" function="count" dataType="number" value="G_fund.fund"/>
    <element name="SumamountPerkelease" function="sum" dataType="number" value="G_fund.amount"/>     
    I have tried the following conditions in the text form field for SUMAMOUNTPERKELEASE
    <?if:cs_countfund > 1?>
    SUMAMOUNTPERKELEASE
    <?end if?>
    <?xdofx: if :cs_countfund > 1 then
    SUMAMOUNTPERKELEASE end if?>
    <?xdofx: if cs_countfund > 1 then
    SUMAMOUNTPERKELEASE end if?>
    <?choose:?>
    <?when: cs_countfund > 1?>
    SUMAMOUNTPERKELEASE
    <?end when?>
    Nothing seems to work. Help...
    Any suggestions would be greatly appreciated.
    Susie

    Hi,
    I assume that in your resulting XML CS_countfund is written in uppercase.
    So try
    <?if:CS_COUNTFUND > 1?>
    <?SUMAMOUNTPERKELEASE?>
    <?end if?>
    Regards
    Rainer

  • Charactersitic values to be used in IFTHEN ELSE STATEMENT IN QUERY

    scenario: i need to use the characteristic values(not the attributes) to be used in an IF THEN ELSE STATEMENT in query. so i created a formula variable for the characteritic of processing type replacement path, replace with key.The values are not fetched in the result and is displayed as X.
    what should i replace with key,lable, constant or other options whereas  my requirement is the all the values present in the characteristc should be used.
    eg. if char name is xyz and has the values 1,2,3,4,5 till -
    20.
    then in a calculated key figure :(formulavariable =1)* kefig1keyfig2 +not(formulavariable =1)kef2keyfig3.
    this formula variable should have all the values of the characteristic values ie 1,2,3---20.
    2. how should i do get the values of characterstics values in the equation give me the steps in detail..
    3. i do not want to use the attributes, though i tried initally while creating the formual variable i replaced with attribute value, there is was an error and there were no reult.
    i tried to create char. variable  for the characteristic  of manual entr , not ready for input values and gave all the values 1,2,3 --20 as default values and then created formaul variable and repalce with the variable, however this characteristic variable is not at all displayed from the list of variables which will be displayed while creating the formula variable.
    help me out.
    Thanks

    hi srini,
    i have includedthe char in rows. i want you to explain in detail how to use these values in the if then else statement in query.
    i have created a calculated key figure 2= (formual variable =1 & keyfig a =0)* keyfig1kefig2 +not(formual variable =1 & keyfig a =0)keyfig2 *calculated keyfig1.
    so this formula variable of replacement path have ref. to then char. and with what value should it replace, key, name, external char or attribut etc so that i should get the values of the char from 1 to20.
    i donot to repalce with the attribute. i just want the char. values and not thier attributes (1. description 2. the second attribute has the values say abc1,efg2,ghi3 for respective charteristic values.
    ie
    char value               desc                 2nd attrib
    1                            hi                     abc1
    2                            bye                  defg2
    3                            ciao                  ghi3

Maybe you are looking for

  • KDE Frameworks 5 not working?

    I installed kde framworks 5 (kf5 and kf5-aids) packages and seems to be installed fine. But when I login I get the same old kde 4.13.x system, how do I switch to kf5? Nor I see any changes to apps design and layout. Regads

  • One calendar is not shown in sunbird

    Hi, I set up the ical server and sunbird. There are 4 calendars for one user that work fine for iCal client. When these calendars are integrated in sunbird there are only 3 of 'em shown. The fourth one is not shown at all which is maybe because of th

  • Oracle 10g Query Format

    0 down vote favorite I am using oracle 10g. I have a temp table TEMP. TEMP has following structure:- USER COUNT TYPE 1 10 T1 2 21 T2 3 45 T1 1 7 T1 I need a query which will show all types has column names,and types can be any value like T1,T2,..Tn a

  • Mail 3.6 Leopard 10.5.8 Issues ?

    I just updated my Tiger Powerbook to Leopard 10.5.8. When i open mail nothing opens and it says unexpectedly quit. I can't get it to launch. Ideas ?

  • Assign Joystick (on a KORG Synth) to control velocity

    I would like to be able to control velocity by a joystick on one of my Korg synth, so that it alters global velocity on a Port. I have a huge library of samples and wish to know quickly how they sound with various velocities applied - I normally try