Displaying calculated field only when data exist

Hello,
Is there a way to display my calculated value only when the data entry field is being used. For instance, if I have several fields vertically aligned, I don't want to display a bunch of zeros if their data fields are not being used.
THANK YOU!!!!

You can check for the rawValue in the Calculate event before any script.
Event: Calculate
//FormCalc
   if(Field1.rawValue ne null) then
     // write your script here
   endif
//JavaScript
if(this.rawValue != null){
   // write your script here
Thanks
Srini

Similar Messages

  • Calculated fields based on data in multiple rows

    Hi,
    I am using SOA Suite 11.1.1.4 for BAM.
    Can someone please help explain to me if and how we can use calculated fields in BAM data objects where the calculations are not only based on the data for that row, but on multiple rows ?
    Like for example, this case can easily be constructed -->
    TestDataObject Layout
    Column1 integer
    Column2 integer
    Column3 calculated = Column1 + Column2
    But if I want to create something like this -->
    TestDataObject Layout
    Column1 integer
    Column2 integer
    Column3 calculated = max(Column1) + avg(Column2)
    Is it possible to do the above ?
    Is it possible to check multiple rows of the other columns while calculating a value ?
    Thanks & Regards,
    Karan.
    Edited by: user8890668 on Mar 9, 2011 3:58 AM

    Hi, Karan.
    Do you know you can do that in reports with calculated fields?
    I guess it is not possible using calculating functions offered in data objects to do that.
    If you, or anybody, discover how do that, please tell us. I would like to know that.
    Luciano Gomes
    user8890668 wrote:
    Hi,
    I am using SOA Suite 11.1.1.4 for BAM.
    Can someone please help explain to me if and how we can use calculated fields in BAM data objects where the calculations are not only based on the data for that row, but on multiple rows ?
    Like for example, this case can easily be constructed -->
    TestDataObject Layout
    Column1 integer
    Column2 integer
    Column3 calculated = Column1 + Column2
    But if I want to create something like this -->
    TestDataObject Layout
    Column1 integer
    Column2 integer
    Column3 calculated = max(Column1) + avg(Column2)
    Is it possible to do the above ?
    Is it possible to check multiple rows of the other columns while calculating a value ?
    Thanks & Regards,
    Karan.
    Edited by: user8890668 on Mar 9, 2011 3:58 AM

  • Mail to RFC is there way to make mail to READ only when data sent to RFC

    Hi friends ,
                        My scenario is Mail to RFC  .  I am reading mails marking as read and sent to  RFC .
                       Due to this , If   for eg 400 mails comes , xi is reading all mails correctly but sometimes  inbound queue getting stuck so , unable to send data to RFC .
               Because of that  many mails which read cannot able to send data  , everything stuck in InBound Queue.
                 Can any body explain how to resolve this issue ?
               <b>   If there way to mark mail as read only when data uploded to RFC ?</b>
              Any suggestions please!
    Regards.,
    V.Rangarajan
    null

    Hi
    Even we did this scenario for one of our clients,but in our case mails were getting deleted by itself once processed.And those that did not get processed due to some reason remained in the mail box.
    Thanks

  • How to update zero to a column value when record does not exist in table but should display the column value when it exists in table?

    Hello Everyone,
    How to update zero to a column value when record does not exist in table  but should display the column value when it exists in table
    Regards
    Regards Gautam S

    As per my understanding...
    You Would like to see this 
    Code:
    SELECT COALESCE(Salary,0) from Employee;
    Regards
    Shivaprasad S
    Please mark as answer if helpful
    Shiv

  • Trigger with Condition problem - insert only when not exists

    Hello experts!
    I have a problem with a trigger I'm trying to create. It compiles but I receive an error message when the trigger fires.
    The scenario is as follows:
    I have a table TBL_PUNKTDATEN. Whenever the status for a record in that table is changed to 3 or 4 I need the trigger to insert a dataset into my target table (TBL_ARBEIT_ZU_GEBIET).
    However, the trigger must only insert data when there's no existing record in the target table. The condition that specifies whether there is a dataset or not, is the field LNG_GEBIET, which exists in the source as well as in the target table. Hence, for each LNG_GEBIET there can be only one dataset in the target table!
    I created a trigger using the following code. However it doesn't work.
    Maybe you'll see what I want to achieve when having a look at my code.
    Can you please help me out on this one?
    Thanks a lot!
    Sebastian
    create or replace
    TRIGGER set_status_arbeit_zu_gebiet AFTER
      UPDATE ON TBL_PUNKTDATEN FOR EACH ROW WHEN(new.INT_STATUS=3 or new.INT_STATUS=4)
    declare
        cursor c is select LNG_GEBIET from TBL_ARBEIT_ZU_GEBIET where PNUM = 1114 and LNG_GEBIET=:new.LNG_GEBIET;
        x number;
    begin
        open c;
        fetch c into x;
        if c%NOTFOUND  then 
        INSERT INTO TBL_ARBEIT_ZU_GEBIET
            LNG_GEBIET,
              LNG_ARBEITSSCHRITT,
              PNUM,
              INT_BEARBEITER,
              DATE_DATUM,
              GEPL_DATUM
            VALUES
            (:new.LNG_GEBIET,
             52,
             1114,
             895,
             sysdate,
             to_date('01.01.1990', 'DD.MM.YYYY')
        end if;
    end;Well, on the first insert the code works properly and inserts the recordset as expected. However, if there is an existing recordset where :new.LNG_GEBIET matches LNG_Gebiet in my target table, I receive the ORA-06502 error!
    Maybe that spcifies it a little bit???
    Hope you can help me!
    Thank you!
    Edited by: skahlert on 23.09.2009 10:26
    Edited by: skahlert on 23.09.2009 10:28

    Thank you very much Peter G!
    That %Rowtype mod did the trick! Great solution! Thanks! The trigger works principally if there wasn't the fact that it fires also when the status of one individual record is 3 or 4.
    I need it to fire only when all records with the same attribute LNG_GEBIET (by the way, you guess was right - it's not a number) are of status 3 or 4.
    Is it possible to use the cursor function for the trigger's when condition?
    Such as:
    declare
        cursor c3 is select COUNT(*) from TBL_PUNKTDATEN where LNG_GEBIET=:new.LNG_GEBIET;and
    declare
        cursor c4 is select COUNT(*) from TBL_PUNKTDATEN where INT_STATUS = 3 and  LNG_GEBIET=:new.LNG_GEBIET or INT_STATUS = 4 and  LNG_GEBIET=:new.LNG_GEBIET;
      And then subsequently somehow compare the results of both cursors?
    ... WHEN c3=c4
    declare
        cursor c2 is select LNG_GEBIET from TBL_ARBEIT_ZU_GEBIET where PNUM = 1114 and LNG_GEBIET=:new.LNG_GEBIET;
        v_c2  c2%ROWTYPE;
    begin
    open c2;
    fetch c2 into v_c2;
    if c2%notfound then
            INSERT INTO TBL_ARBEIT_ZU_GEBIET
            LNG_GEBIET,
              LNG_ARBEITSSCHRITT,
              PNUM,
              INT_BEARBEITER,
              DATE_DATUM,
              GEPL_DATUM
            VALUES
            (:new.LNG_GEBIET,
             52,
             1114,
             895,
             sysdate,
             to_date('01.01.1990', 'DD.MM.YYYY')
            end if;
            close c2;
    end;Please excuse me if the attempt is simply stupid!
    Sebastian
    Edited by: skahlert on 23.09.2009 15:36
    I just saw your reply Max! Thank you! Now I understand far better! Seems to be a successful day! I'm learning a lot! Will also test that method!
    If we could find a solution to the problem I described above it would make it a perfect day! I'm continously trying different attempts to have the trigger only fire when all records are 3 or 4.
    Not that you think I'm just waiting for your answers! That's not the case!
    Thank you all!
    Edited by: skahlert on 23.09.2009 17:30

  • Grey Out a Field only when Creating a New Campaign

    Hi ,
    I Have a requirement to Grey out the  Language Field   when Creating a new Campaign.
    The same field should be in editable mode when we go  and edit an existing  Campaign.
    Method GET_I_LANGU.
    if parent_entity->is_changeable( ) = abap_true.
        rv_disabled = 'FALSE'.
      else.
        rv_disabled = 'TRUE'.
      endif.
    endmethod.
    I tried changing the rv_disabled =  'TRUE'.
    But it will grey out  the field even when editing an existing Campaign also.
    Any Suggestions.
    Regards,
    sijo

    Hi,
    At the Left handside there will be Runtime Repository tree u can see the Campaign in the Root Nodes , under go to the relations and u will get the CPGDescriptionRel (Description) as the relation . Get the attribute EXTERNAL_ID from the parent_entity variable in the GET_I_LANGU method.
    data lv_campaign type CRM_MKTPL_CAMPAIGNID.
      CALL METHOD PARENT_ENTITY->IF_BOL_BO_PROPERTY_ACCESS~GET_PROPERTY_AS_VALUE
        EXPORTING
          IV_ATTR_NAME = 'EXTERNAL_ID'
       IMPORTING
    EV_RESULT    =  lv_campaign.
    now make use of the  lv_campaign .

  • How to insert data into a table only when data has changed its value (when compared to the previous inserted value)

    I wish to insert data into a table only when the value of the inserted data has changed. Thus, in a time series, if the value of the data at time, t-1, is 206 then if the data to be inserted at time t is 206, then it is skipped (not entered).
    If the value of the data at time t+1 is 206, it is skipped also; until the value changes, so if the value at t+1 was 205, then that would be inserted, and if at time t+2 the data is 206, it would be inserted too.
    What is the best way to do it without increasing overheads?

    This view works:
    SELECT
    i.IDNO,i.[Date],i.[Level]
    FROM
    mytable i
    INNER
    JOIN mytable
    d
    ON
    d.IDNO
    = i.IDNO-1
    WHERE
    i.[Level]
    <> d.[Level]
    on this mytable below.  A trigger could be quite useful here although I am cautious using them. However I wish to avoid the overhead by not having a temp table (which could be sizable).  mytable below
    should give 3 lines. The IDNO is an identity column.
    IDNO
    Item
    Date
    Level
    1
    X24
    12/23/13 10:41
    22996
    2
    X24
    12/23/13 10:41
    22996
    3
    X24
    12/23/13 9:21
    23256
    4
    X24
    12/23/13 9:21
    23256
    5
    X24
    12/23/13 9:22
    23256
    6
    X24
    12/23/13 9:22
    23256
    7
    X24
    12/23/13 9:22
    22916

  • Calculated field hidden when field is blank

    This is actually similar to a discussion from a few months ago.Our forms are intended to be filled out online, printed and e-mailed, faxed, or snail-mailed. Many times the customer will simply print out the form and fill it out by hand. When I create forms with calculations the "$" or "0.00" appear; thus making it difficult for someone filling the form out by hand to work around those symbols/numbers. A few months ago, I had a similar situation involving percents and the gurus on this forum (Thank you, gurus!) helped me with the following code and it worked perfectly at hiding the calculated fields unless something was entered in the fields to be calculated.
    For a field with a format of "None" user a Custom validation script:
    if(event.value == 0) {
    event.value = ""; // set field to null;
    AFNumber_Format(0, 0, 0, "", "", true); // set format to number 0 decimals, no currency;
    } else {
    event.value = event.value; // keep value;
    AFPercent_Format(2, 0, 0); // set percent format 2 decimal places.
    This time, the problem involves simple numbers (not percent, not currency). I used the same logic and the fields actually show/hide like I want, but the numbers need to be formated with a comma separating the thousands and a decimal point with two digits after. I can't figure that out! Can someone please offer some advice? Thanks in advance for your help.

    Make sure you are using the correct quotation marks. Use either the double quotation marks or the single quotation marks and not 4 single quotation marks.
    if(event.value == 0) {
    event.value = ''; // set field to null (2 single quotation marks);
    Supress Zero

  • Is it possible to make a calculated field only appear when the result is greater than 0?

    I am using Adobe Acrobat X Standard.  I have created a form that has caculated fields.  However, the fields always show the "$0.00" when it doesnt have anything to calculate.  I would only like a result to appear in this field when the result is greater than 0.  Is this possible?

    The use of currency and percentage signs always behave this way since the display format is a character string and not a plain number.
    You will have to use some custom JavaScript in the Custom JS calculation, the custom format format, or the validation script.
    There is not a lot of documentation for this, but Acrobat JavaScripting Guide Version 6 has some infromation about usin the AFNumber_Format built-in function.
    If your users are using version 8 or below, you will need to adjust the format of the field.

  • Expanding Text Fields, only when printed

    All,
    I have a dynamic form that has many text fields for user input. These fields have a fixed height, however allow multiple lines beyond the visible area. I don't want these text fields to expand when the field is exited, but rather when the form is printed. The form is set up neatly on 7 pages, and I'd like it continue to be 7 when the user is working, however I'd like it to expand to accomodate the extra text upon printing.
    How can I make it so when I print, the fields expand and the data flows onto the next page(s)?
    Thanks!
    Aaron

    Thank you. I'll also have to make sure the subforms are set to "flowed" to make sure the expansion works appropriately, correct?
    I can get everything to work correctly until my last page. When flowing the subform it compresses all of my fields and won't let me resize or move. Is there any easy way to resize a subform or adjust the locations of the fields within it?

  • How to display a field only in the last page

    hi all
    i am using reports 6i
    i ve created summary column and i need to get it displayed only on the last page of the report
    is it possible
    kindly guide
    thanking in advance

    Dear Friend,
    where you created the summary coloumn? If your summary column in at top level you can do this just placing summary field bottom all repeating frame (all frames).
    Regards
    Ahamed Rafeeque Cherkala

  • Display Community Names, only when Current User is a Member of that Community

    Greetings,
    I have a Community Site Collection(say ABC). Within that I have many Community Sub-sites(say X,Y,Z). I want to display the Community Sub-site Names in Community Home-page for the Condition,
                      When Current User name Exists in "Community Members".
    1.For that i have to access "Community Members" list from all Sub-sites(say X,Y,Z) within Community Site Collection(say ABC).
    2.Display Community Sub-sites Name Queried for Current-user Name Exists in "Member" Column of "Community Members" List
    Is this the Correct Solution for my Requirement? Or any Best Practice available? 
    Thanks in Advance for help

    Thanks for your Reply
    You mean I need to use Custom Webpart and Content Editor in my Community Homepage.
    1.Custom Webpart for displaying all Subsites within SiteCollection and
    2.Content Editor to hide Community name(By Using JavaScript)
    I can display all Subsites within SiteCollection using Spweb.getsubwebsforcurrentUser()
    But it seems complex to hide non-member community names. The reason is that for a particular user itself i need to filter out "Is this Current User Member of this Community?" for all Subsites
    Any better Solution? Hope it would be
    Thanks,
    Vinnarasi

  • How retrieve custom fields only when using SPListItemCollection?

    Hi with following code I am retrieving a DataTable from a List:
    using (SPSite site = new SPSite("http://..."))
    using(SPWeb web = site.OpenWeb())
    SPList oList = web.Lists.TryGetList("Serverliste");
    if(oList != null)
    DataTable dt = oList.Items.GetDataTable();
    This works fine. My problem is that I only want to get custom ListFields. When working with Fields one can simply call
    FromBaseType which will show if a Field is custom or not. The only value which seems right is
    IsCustomType. Though it is listed under Not public members, which makes it unaccessable via code for me, right?
    Well a dirty approach would be to iterate through ListFields, match them with DataColumns and check whether they are custom or not.
    Is there any clean, efficient solution for this? Is this possible using CamlQueries? If yes, how would that query look like?
    Algorithmen und Datenstrukturen in C#:
    TechNet Wiki

    Hi,
    To retrieve the custom fields, CAML query is incapable, do a iteration with SPField.FromBaseType or the SPField.SourceId property seems the only way at this moment.
    Thanks
    Patrick Liang
    Forum Support
    Please remember to mark the replies as answers if they
    help and unmark them if they provide no help. If you have feedback for TechNet
    Subscriber Support, contact [email protected]
    Patrick Liang
    TechNet Community Support

  • No_data_found raised when data exists

    Hi
    I have a function which is returning no data found in forms 10g (Forms [32 Bit] Version 10.1.2.3.0 (Production))
    FUNCTION get_orderno RETURN VARCHAR2 IS
    cursor x_cur (c_picklist in varchar) is
    select distinct order_no
    from x where picklist_no in (c_picklist);
    c_plist varchar2(100) := '80H059071','80H059083' ; <--for argument sakes this is what c_plist should be and is returning after some processsing
    c_rlist varchar2(100);
    begin
    open x_cur(c_plist);
    fetch x_cur into c_rlist;
    close x_cur;
    message(c_rlist); pause;
    return c_rlist;
    end;
    when i call this function, c_rlist is NULL
    and the value used to call this function is also null;
    *** in sql*plus
    SQL> SELECT distinct order_no
    2 FROM x
    3 WHERE pick_list_no in (&list);
    Enter value for list: '80H059071','80H059083'
    old 3: WHERE pick_list_no in (&list)
    new 3: WHERE pick_list_no in ('80H059071','80H059083')
    ORDER_NO
    R7115829
    1) I am connected to same database
    2) if i hard code those values in '80H059071','80H059083' in my cursor it returns correct order no
    Any suggestions please
    Cheers

    hi, thanks for replying. I just tested in ToAD
    declare
    c_picklist varchar2(100);
    l_picklist varchar2(100);
    begin
    dbms_output.put_line('here');
    c_picklist := ''''||('80H059071'',''80H059083')||'''';
    dbms_output.put_line('val of input picklist is '||c_picklist);
    SELECT distinct order_no
    into l_picklist
    FROM x
    WHERE pick_list_no in (c_picklist);
    dbms_output.put_line('val of output picklist is '||l_picklist);
    exception when no_data_found then
    dbms_output.put_line('val of picklist input is '||c_picklist);
    dbms_output.put_line('val of picklist output is '||l_picklist);
    end;
    **output***
    here
    val of input picklist is '80H059071','80H059083'
    val of picklist input is '80H059071','80H059083'
    val of picklist output is
    Ok so you are not surprised that I received no values, why is that? is it a feature of Forms? or is there something else I need to do??
    Thanks

  • Display repeated fields label in data form

    I have created an input form with periods & years in columns. One column for current period & year according to user selection and the other for Dec of prior year. Whenever Dec period is selected, the "December" word will not display in other column because it is the same. It seems like system default not to display for repeated fields. However, users would like to see it. Does anybody have any ideas/workarounds for this? currently, i typed in the word "December." with a dot at custom header to make it looks different so that the comparative column header will be displayed.

    Hello Raul,
    where can I change this setting? in workspace?
    Thanks in advance.
    JC

Maybe you are looking for

  • Can SharePoint calendar show more than 3 items on a Day's schedule in Month view? How?

    Hi there, Can SharePoint calendar show more than 3 items on a Day's schedule in Month view? How? Thank you so much.

  • Horizontal Looper not working in CS3

    I recently upgraded to Dreamweaver CS3 from 8 and have been unable to get Horizontal Looper 2 (the version for ASP) to work in this new version. The extension itself and the settings dialog box appear, but the pop-up menu to select a recordset is bla

  • Need help w/migration

    Hi, thanks in advance for any advice you can provide on my circumstances: I have a Rev A Macbook Air running Snow Leopard 10.6.8 I have also just bought a new MacMini that was just released a couple weeks ago, w/Lion pre-installed. I tried (w/Migrati

  • Can I Duplicate a Bus In Logic Express 8?

    I have created a Multitrack project, with various instruments and 4 vocals parts.  Each vocal part is being recorded with multiple takes. I create new audio tracks for each take.  Once all the takes for a vocal part are completed, I assign all takes

  • SQL in Input Tables

    I have an input table in a mapping and I need to override the default select query with my own custom query having some filter criteria and some nvls and decode's and other such things. Can anyone let me know where to write the source query override