Change value of one row

Microsoft SQL Server 2014 - 12.0.2254.0 (X64)
 Jul 25 2014 18:52:51
 Copyright (c) Microsoft Corporation
 Enterprise Edition (64-bit) on Windows NT 6.3 <X64> (Build 9600: )
Hi,
I have a little bit problem. I would like to change the value of one row calculated in this way:
SELECT distinct ID,s7.Name_Account ,
sum (s7.Y2006* 1.0 / t7.Y2006) as V2006,sum (s7.Y2007* 1.0 / t7.Y2007) as V2007,sum (s7.Y2008* 1.0/ t7.Y2008) as V2008,sum (s7.Y2009* 1.0/ t7.Y2009) as V2009,
sum (s7.Y2010* 1.0/ t7.Y2010) as V2010,sum (s7.Y2011* 1.0 / t7.Y2011) as V2011,sum (s7.Y2012* 1.0/ t7.Y2012) as V2012,sum (s7.Y2013* 1.0/ t7.Y2013) as V2013
FROM sumas7 as s7 , total1 as t7
Where ID IS NULL and Name_Account IS NULL
GROUP BY Name_Account, ID
WITH ROLLUP
As we know this Transact- SQL produce a NULL value as total. My intention is to change this value (NULL) by text value, for example, "NON Current Assets" . Is it possible?  and if it is possible How could I do it?
Thanks in advance
Un saludo

which column has NULLs
as per posted code I guess it should be Name_Account
in which case what you need is this
Also distinct here is meaningless as you're already applying GROUP BY
SELECT ID,
COALESCE(s7.Name_Account,'Non Current Assets') AS Name_Account,
sum (s7.Y2006* 1.0 / t7.Y2006) as V2006,sum (s7.Y2007* 1.0 / t7.Y2007) as V2007,sum (s7.Y2008* 1.0/ t7.Y2008) as V2008,sum (s7.Y2009* 1.0/ t7.Y2009) as V2009,
sum (s7.Y2010* 1.0/ t7.Y2010) as V2010,sum (s7.Y2011* 1.0 / t7.Y2011) as V2011,sum (s7.Y2012* 1.0/ t7.Y2012) as V2012,sum (s7.Y2013* 1.0/ t7.Y2013) as V2013
FROM sumas7 as s7 , total1 as t7
Where ID IS NULL and Name_Account IS NULL
GROUP BY Name_Account, ID
WITH ROLLUP
Please Mark This As Answer if it solved your issue
Please Vote This As Helpful if it helps to solve your issue
Visakh
My Wiki User Page
My MSDN Page
My Personal Blog
My Facebook Page

Similar Messages

  • How to drill down another one report on one field value of one row

    Hi,
    I have two reports that can link together on one field of respective database query command. The effect i want to reach is that when user clicks this field value on some row of one report, which i call source object, another report, target object, would use this value as input parameter and the page would jump to this linked report. I can see Format Editor provides Hyperlink feature when one field is edited, but i don't know how to associate another report as what i described here.
    What if one the following conditions is met:
    1.one of two objects, source object, is one chart object
    2.target object is  one chart object
    3.two objects are both chart objects
    Note: two objects is separately from different reports.
    Additionally, is it possible to code for hyperlink functionality under both .NET WinForm and WebForm? what if under RDC?
    Thank you
    Zhi
    Edited by: zhi li on Sep 24, 2008 11:53 AM
    Edited by: zhi li on Sep 24, 2008 11:57 AM
    Edited by: zhi li on Sep 24, 2008 11:58 AM

    I don't know if you can use the hyperlink to call a subreport but the following has worked for me in Crystal 10:
    1. In your main report create a group on the field you want to pass to the subreport.
    2. In the Group Footer, use the "Insert Section below" menu command so that you have a Group Footer 1a and a Group Footer 1b.
    3. Put your table fields in the Group Footer 1b section (this would be similar to your Details data).
    4. Put the sub report in the Group Footer 1a section. Set up the links to the subreport from a table field in your main report.
    5. Right-click on the sub-report, select "Format Sub-report". Click on the "x-2" button to the right of the Suppress option and enter "DrillDownGroupLevel = 0" in the "Formula Workshop-Formula Format Editor-Suppress" window and save it.
    When you double-click on your data field (i.e. the field in Group footer 1b) it should drill-down and run your subreport.

  • Concatenating values in one row

    I need to write a function that will give me a concatenated list of all the records where gurmail_matl_code_mod like '8%'
    This query is giving me those results:
    GURMAIL_PIDM     CODE1     CODE2
    1135711          
    1135711          8IBD
    1135711     8IBW     
    I want something like this 1135711 8IBW 8IBD in one row.
    select
    gurmail_pidm,
    max(decode(rn,1,gurmail_matl_code_mod )) code1,
    max(decode(rn,2,gurmail_matl_code_mod )) code2
    from (select gurmail_pidm,
                  gurmail_matl_code_mod,
                  row_number() over (partition by gurmail_pidm order by gurmail_matl_code_mod desc) rn
                  from
                      (select  gurmail_pidm,gurmail_matl_code_mod
                               from saturn.spriden,
                                    general.gurmail
                                    where spriden_pidm = gurmail_pidm
                                    and spriden_change_ind is null
                                    and gurmail_matl_code_mod  like '8%'
                                    and gurmail_pidm = 1135711
                                    and GURMAIL_DATE_PRINTED is null
                                    and gurmail_matl_code_mod is not null))
                                    group by gurmail_pidm, gurmail_matl_code_mod   How I can modify this query or let me know if you have other ideas..
    Thank you

    Hello
    try this,
    SQL>  with tab as(Select 1135711 GURMAIL_PIDM, Null CODE1 from dual Union All
      2               Select 1135711 GURMAIL_PIDM, '8IBD' CODE1 from dual Union All
      3               Select 1135711 GURMAIL_PIDM, '8IBW' CODE1 from dual)
      4  SELECT GURMAIL_PIDM || sys_connect_by_path(CODE1,' ') Result
      5    FROM (SELECT GURMAIL_PIDM
      6                ,code1
      7                ,row_number() over(Partition BY GURMAIL_PIDM Order BY GURMAIL_PIDM) rn
      8            FROM tab)
      9   WHERE connect_by_isleaf = 1
    10   Start With rn = 1
    11  Connect BY Prior rn = rn - 1;
    RESULT
    1135711  8IBW 8IBDHope this helps
    Christian Balz

  • How to get higher and second higher value in one row?

    Hello world,
    I want to get higher and second higher sal from emp in one row ,,
    Thanks

      1  select e.empno, e.ename,  e.sal,  lag(sal) over (order by sal) next_sal    from emp e
      2* order by sal
    SQL> /
         EMPNO ENAME             SAL   NEXT_SAL
          7369 SMITH             800
          7900 JAMES             950        800
          7876 ADAMS            1100        950
          7521 WARD             1250       1100
          7654 MARTIN           1250       1250
          7934 MILLER           1300       1250
          7844 TURNER           1500       1300
          7499 ALLEN            1600       1500
          7782 CLARK            2450       1600
          7698 BLAKE            2850       2450
          7566 JONES            2975       2850
         EMPNO ENAME             SAL   NEXT_SAL
          7788 SCOTT            3000       2975
          7902 FORD             3000       3000
          7839 KING             5000       3000

  • Interchange values from one row with another row

    Dear Oracle Guru's
    While Migrating data from legacy system, there was a confusion and data in two columns got jumbled
    Ex The data should be like this
    Custcode leaseno
    1034 A234
    1035 A235
    1036 A236
    whereas the table has data like this
    Custcode leaseno
    1034 A235
    1035 A234
    1036 A237
    1037 A236
    How do we swap values between two rows
    Kindly guide me on this
    With Warm Regards
    ssr

    >
    Ex The data should be like this
    Custcode leaseno
    1034 A234
    1035 A235
    1036 A236
    whereas the table has data like this
    Custcode leaseno
    1034 A235
    1035 A234
    1036 A237
    1037 A236
    How do we swap values between two rows And now, time for yet another guess... ;)
    My guess is that your migration program interchanged "leaseno" value in pairs from the top - the top being the least value of "custcode".
    So, the "leaseno" values of Row 1 and Row 2 were swapped.
    The "leaseno" values of Row 3 and Row 4 were swapped.
    And so on.
    Which also means that if the total number of rows in your table is even, then the swap would be "complete". Otherwise, the last row would be left out. I don't know what you want to do with that.
    test@XE>
    test@XE> select * from t;
      CUSTCODE LEAS
          1034 A235
          1035 A234  <= you want to swap A235 and A234
          1036 A237
          1037 A236  <= you want to swap A237 and A236
          1038 A238  <= let's leave it hanging there...
    5 rows selected.
    test@XE>
    test@XE> And of course, swapping from "top to bottom" means swapping from the least to highest value of "custcode".
    Here's the SELECT statement for that -
    test@XE>
    test@XE> -- show the records in the table t
    test@XE>
    test@XE> select * from t;
      CUSTCODE LEASENO
          1034 A235
          1035 A234
          1036 A237
          1037 A236
          1038 A238
    5 rows selected.
    test@XE>
    test@XE> -- the SELECT statement for swapping leaseno values
    test@XE>
    test@XE> @test7a
    test@XE> --
    test@XE> select custcode,
      2         leaseno,
      3         case
      4           when mod(row_number() over (order by custcode),2) = 1 and
      5                lead(leaseno) over (order by custcode) is null
      6           then leaseno
      7           when mod(row_number() over (order by custcode),2) = 1
      8           then lead(leaseno) over (order by custcode)
      9           else lag(leaseno) over (order by custcode)
    10         end as new_leaseno
    11  from t;
      CUSTCODE LEASENO NEW_LEASENO
          1034 A235    A234
          1035 A234    A235
          1036 A237    A236
          1037 A236    A237
          1038 A238    A238
    5 rows selected.
    test@XE>
    test@XE> And here's the update statement -
    test@XE>
    test@XE> -- the UPDATE statement for updating leaseno values in pairs from the top
    test@XE>
    test@XE> @test7b
    test@XE> --
    test@XE> update t t1
      2  set t1.leaseno = (
      3    select new_leaseno
      4    from (
      5      select custcode,
      6             leaseno,
      7             case
      8             when mod(row_number() over (order by custcode),2) = 1 and
      9                  lead(leaseno) over (order by custcode) is null
    10             then leaseno
    11             when mod(row_number() over (order by custcode),2) = 1
    12             then lead(leaseno) over (order by custcode)
    13             else lag(leaseno) over (order by custcode)
    14           end as new_leaseno
    15      from t
    16    ) t2
    17    where t2.custcode = t1.custcode
    18  );
    5 rows updated.
    test@XE>
    test@XE>
    test@XE> select * from t;
      CUSTCODE LEASENO
          1034 A234
          1035 A235
          1036 A236
          1037 A237
          1038 A238
    5 rows selected.
    test@XE>
    test@XE> HTH,
    isotope

  • How I can display the values in one row when they come from the same colum

    This query
    SELECT
    sorints_ints_code
    FROM
    saturn.sorints a,
    connman.cc_adm_prospect_master
    WHERE
    sorints_ints_code like 'Z%'
    and sorints_pidm = prospect_pidm
    give me the results of
    ZA
    ZB
    ZC
    I want to use this query in a cursor to update a column in another table, the problem is that I need to update the table concatenating the values ZA,ZB,ZC
    I have 24 different codes stored in the column sorints_ints_code, so I don’t want to use 24 different cursors and I don’t to use cross reference, It is there any way that I DON’T know to display the data like this za,zb,zc without using cross reference, I don’t want to use the table 24 times…
    Like THIS, this is only for two values…
    SELECT
    a.sorints_ints_code,
    b. sorints_ints_code
    FROM
    saturn.sorints a,
    saturn.sorints b
    connman.cc_adm_prospect_master
    WHERE
    a.sorints_ints_code = ‘ZA’
    AND a.sorints_ints_code = ‘ZB’
    and a.sorints_pidm = prospect_pidm
    and b.sorints_pidm = prospect_pidm
    REMEMBER, I have 24 different values
    I am trying to write a procedure like this;
    Someone suggest this v_int_code1 := v_int_code1||interest_coach_rec.sorints_ints_code;
    BUT IT IS NOT WORKING!!!
    PROCEDURE prospect_coach_interest_upd
    p_prospect_term_code IN srbrecr.srbrecr_term_code%TYPE,
    p_prospect_admin_err_code OUT VARCHAR2,
    p_ora_err_code OUT NUMBER,
    p_ora_err_msg OUT VARCHAR2
    ) IS
    v_out_path VARCHAR2(40) := '/home/connman/student';
    v_out_file VARCHAR2(40) := 'cc_adm_prospect_'||p_prospect_term_code||'_'||TO_CHAR(SYSDATE,'YYYYMMDDHH');
    v_file_handle UTL_FILE.FILE_TYPE;
    v_pidm NUMBER;
    v_int_code1 varchar2(30);
    v_int_code2 varchar2(2);
    v_int_code3 varchar2(2);
    CURSOR cur_pidms IS
    SELECT prospect_pidm
    FROM connman.cc_adm_prospect_master
    WHERE prospect_term_code = p_prospect_term_code
    FOR UPDATE;
    CURSOR interest_coach_cur is
    SELECT
    sorints_ints_code
    FROM
    saturn.sorints
    WHERE
    sorints_ints_code like 'Z%'
    and sorints_pidm = v_pidm ;
    interest_coach_rec interest_coach_cur%ROWTYPE;
    BEGIN
    UTL_FILE.FCLOSE_ALL;
    v_file_handle := UTL_FILE.FOPEN (v_out_path, v_out_file, 'a');
    UTL_FILE.PUT_LINE (v_file_handle,
    CHR (10) || TO_CHAR (SYSDATE, 'DD-MON-YYYY HH:MI:SS')
    UTL_FILE.PUT_LINE (v_file_handle, 'Entering the Admin Name procedure.');
    --- BEGIN
    FOR rec_pidms IN cur_pidms
    LOOP
    EXIT WHEN cur_pidms%NOTFOUND;
    v_pidm := rec_pidms.PROSPECT_pidm;
    v_int_code1 := v_int_code1||interest_coach_rec.sorints_ints_code;
    IF interest_coach_cur%ISOPEN
    THEN
    CLOSE interest_coach_cur;
    END IF;
    OPEN interest_coach_cur;
    FETCH interest_coach_cur
    INTO interest_coach_rec;
    IF interest_coach_cur%FOUND
    THEN
    UPDATE
    connman.cc_adm_prospect_master
    SET
    PROSPECT_COACH_INTEREST = interest_coach_rec.sorints_ints_code
    WHERE CURRENT OF cur_pidms;
    END IF;
    END LOOP;
    COMMIT;
    p_prospect_admin_err_code := '0';
    UTL_FILE.put_line (v_file_handle, 'Successful Completion.');
    EXCEPTION
    WHEN OTHERS
    THEN
    p_prospect_admin_err_code := '1';
    p_ora_err_msg := SUBSTR (SQLERRM, 1, 2000);
    p_ora_err_code := SQLCODE;
    END; -- prospect_coach_interest_upd;

    Search in the forum or web you will find many solutions
    Return multi-row result as one comma-delimited row
    http://www.oracle-developer.net/display.php?id=412

  • Change forecolor of one row in a matrix

    Hi, can I change the color of the text in a row of a matrix?
    I've tried with
    matrix.column.item("idcol").forecolor = 555555
    In this mode I change the color of all the row in column idcol. I would like to change the color to one of the row of the column idcol.
    Can I do?
    Thank you
    Regards
    Marco

    Hi Marco Trestini
    Unfortunatly you can NOT change the row colour or the text row colour. We can only do colour modification by columns only. Hopefully in future versions we can.
    Hope this helps

  • XSLT List View Web part with Inline Editing changing value for one field changes the other lookup field

    Hi
    It's a bit of a weird one. In an XSLT List View web part when Inline editing is enabled if I change the date column, it changes the lookup field column as well. This behavior only occurs if the lookup list has more than 20 entries. Below 20 and we are
    OK.
    Let me explain by example:
    MileStones List - Having more than 20 items
    Tasks List - having a lookup to the Title field from MileStones list. Also having a due date field.
    Simple web part page with one XSLT List View web part for Tasks having inline editing enabled.
    When I edit the first record's due date and press enter (which saves the changes and moves onto next record) and change the due date on second record without even touching the MileStone field. Press enter to commit changes and you see the milestone changing
    on first record!
    The wierd thing is that if the MileStone list has less than 20 items all works as expected.
    Any pointers will be appreciated
    Thanks

    Hi,
    This is a known limitation when working with complex fields like Lookup field.
    A workaround is that we can avoid using the inline edit feature when there are
    complex fields in a list.
    You can take a look at this KB from Microsoft Support to get more details:
    http://support.microsoft.com/kb/2600186/en-us
    A similar thread for your reference:
    http://social.technet.microsoft.com/Forums/sharepoint/en-US/3d369611-ee79-4b5c-86bb-c0f3878cd746/standard-list-view-with-inline-editing-lookup-column-copies-preceding-or-following-items-related?forum=sharepointgeneralprevious
    Thanks
    Patrick Liang
    TechNet Community Support

  • Changing value of one input field based on other.

    Hello All,
    I am having this interesting situation with changing a value of a INPUT form in jsp based on another INPUT.
    Lets say my form has 3 INPUT variables.
    1. YEAR (COMBOBOX) (using the SELECT OPTION)
    2. MONTH (COMBOBOX)(using the SELECT OPTION)
    3. TEXT
    If the user sets the year to 2003, I want to show all 12 months. But if the user sets the year to 2004, I want to show only the month of Jan and then not allow the user to change the value.
    I also need both these values to go as form input when the user hits submit.
    After reading the JSP/Javascript issues other people are having with regard to accessing variables across these two(i.e jsp and javascript), it looks like ther is no easy way to achieve this using
    "onChange=setValue()" on the YEAR field.
    What would be the best way to do this?
    Thanks,
    Chhaya

    u can use javascript funtion
    u can pass day month and year wiich will return false if wrong date was selected like leap year,selecting 31 feb etc.
    function validatedate(dd,mm,yy)
              cday=dd
              aday=dd
              cmonth=mm
              cyear=yy
    leapyearcal=cyear%400
              if(leapyearcal==0)
                   leapyear="OK"
              else
              {     leapyearcal=cyear%100
                   if(leapyearcal==0)
                        leapyear="no"
                   else
                        leapyearcal=cyear%4
                        if(leapyearcal==0)
                             leapyear="OK"
                        else
                             leapyear="no"
              if ((cmonth==1)||(cmonth==3) || (cmonth==5) || (cmonth==7) || (cmonth==8)|| (cmonth==10) || (cmonth==12))
                   aday=31
              if ((cmonth==4)||(cmonth==6) || (cmonth==9) || (cmonth==11))
                   aday=30     
              if ((cmonth==2)&& (leapyear=="OK"))
                   aday=29
              else if (cmonth==2)
                        aday=28
              if (cday>aday)
                        return true
              else
                        return false
    }

  • Change Value in one LOV depending on value in another LOV

    hi forum.
    i have two Lov's. The first has continents and second has countries. my design is when user select continent, related countries should show up. now i can do that when i submit on the change of continent LOV very easily but, i dont want to refresh or reload the page as some other functions are disturbed by this, i want the countries values to change with out page being reloaded. please let me know how can i do it. i m a dumb ass so answers like "use dynamic action" or "user java script" are no different than ancient Greek to me. so plz reply elaborately as a matter of compassion.
    thanks in advance.

    Hi
    Can u pls try like this,
    Two Lov's Namely P1_Continent and P1_Country
    In the second Lov P1_country Please refer Cascading LOV Parent Item(s)="P1_continent" and make Optimal refresh as yes.
    and are using the select statement for second lov like this
    Select country from table_name where continent=:P1_country.
    Can pls make change in the List lov ie P1_continent Null Display Value=- select Continent-.
    Hopes this might you.
    Thanks & Regards
    Srikkanth.M

  • Query produces duplicate values in successive rows. Can I null them out?

    I've had very good success (Thanks Andy) in getting detailed responses to my posted questions, and I'm wondering whether there is a way in a report region join query that produces successive rows with duplicate values that I can suppress(replace) the print of the duplicate values in those rows. In case I've managed to twist the question into an unintelligible mess (One of my specialties), let me provide an example:
    We're trying to list the undergraduate institutions that an applicant has attended, and display information about dates of attendence, gpa, and major(s)/minor(s) taken. The rub is that there can be multiple major(s)/minor(s) for a given undergraduate institution, so the following is produced by the query:
    University of Hard Knox 01/02 01/06 4.00 Knitting
    University of Hard Knox 01/02 01/06 4.00 Cloth Repair
    Advanced University 02/06 01/08 3.75 Clothing Design
    Really Advanced U 02/08 01/09 4.00 Sports Clothing
    Really Advanced U 02/08 01/09 4.00 Tennis Shoe Burlap
    I want it to look like this:
    University of Hard Knox 01/02 01/06 4.00 Knitting
    Cloth Repair
    Advanced University 02/06 01/08 3.75 Clothing Design
    Really Advanced U 02/08 01/09 4.00 Sports Clothing
    Tennis Shoe Burlap
    * (edit) Please note that the cloth repair and tennis shoe repair rows would be correctly positioned in a table, but unfortunately got space suppresed here for some reason. *
    Under Andy's tuteage, I'd say the answer is probably javascript looping through the DOM looking for the innerHTML of specific TDs in the table, but I'd like to confirm that, or, does Apex provide a checkbox that I can check that will produce the same results? Thanks in advance guys, and sorry for all the questions. We've been tasked to use Apex for our next project and to learn it by using it, since the training budget is non-existant this year. I love unfunded mandates ;)
    Phil
    Edited by: Phil McDermott on Aug 13, 2009 9:34 AM

    Hi Phil,
    Javascript is useful, as is the column break functionality within Report Attributes (which would be my first choice if poss).
    If you need to go past 3 columns, I would suggest doing something in the SQL statement itself. This will mean that the sorting would probably having to be controlled, but it is doable.
    Here's a fairly old thread on the subject: Re: Grouping on reports (not interactive) - with an example here: [http://htmldb.oracle.com/pls/otn/f?p=33642:112] (I've even used a custom template for the report, but you don't need to go that far!)
    This uses the LAG functionality within SQL to compare the values on one row to the values on the preceeding row - being able to compare these values allows you to determine which ones to display or hide.
    Andy

  • Retrieve the same value for all rows

    Hi Folks,
    I am a newbie to Kodo JDO. I have a little but important problem. I use a
    query to retrieve data with a simple filter like PName=='A'. Normally it
    should retrieve 3 rows with 3 different values but it does not. Instead I
    got 3 rows but with all the same value of one row???
    Do I have a configuration problem?? Oh, I forgot, I use postgresql 8.0 on
    Windows...
    Thx a lot....
    Juergen

    Hi,
    You may want to turn on the SQL log (use the kodo.Log property, and set
    the SQL channel to TRACE... for more details on logging, check out
    chapter 3 in the Kodo Ref Guide) and see what SQL is being generated.
    Once you see the SQL, does it look right? If you run the generated SQL
    in your SQL command line, do the results match what you expect? If that
    doesn't help, maybe post the SQL and some info about your mapping.
    Thanks,
    Greg
    J wrote:
    Hi Folks,
    I am a newbie to Kodo JDO. I have a little but important problem. I use a
    query to retrieve data with a simple filter like PName=='A'. Normally it
    should retrieve 3 rows with 3 different values but it does not. Instead I
    got 3 rows but with all the same value of one row???
    Do I have a configuration problem?? Oh, I forgot, I use postgresql 8.0 on
    Windows...
    Thx a lot....
    Juergen

  • Merging different values into one column

    Hi all,
    If my report has two columns A and B. For one value of A, there are multiple values coming from database for B.
    So, report displays them like this:
    A     B
    1     x
    1     y
    1     z
    Is it possible somehow that i can merge all possible values of B in one row instead of many. i.e. report should look like this:
    A     B
    1     x,y,z
    Please reply with your suggestions.

    Hi,
    It is possible that can merge all B column values in one row.
    Steps:-
    1. First you create an object for B using @aggregate_Aware() function like
    @Aggregate_Aware(TableName.B,TableName.B)+', '
    Object qualification should be measure. Here B is the column name.
    2. In WebI report drag and drop A and B objects
    3. Run the report
    Now you will get the result.
    Edited by: Swarna K on Mar 11, 2011 5:27 AM
    Edited by: Swarna K on Mar 11, 2011 7:20 AM

  • Changing value of a field in mapping as per condition

    Hi Experts,
    I have one requirement in IDoc mapping to EDI structure.
    I want to change the value of a field depending on the condition. But the problem is the field is mapped at higher level than the condition.
    For example:
    Say i have a source structure in IDoc with name Source1 and target structure Target1. Source1 is mapped to Target1. Both of these structures have multiple occurances. So in general out structure will look something like below:
    Source1-> Target1
    Source2->Target2
    Source3->Target3
    Now i want to change value of one field from Target1 structure depending on Value of one field from Source3. At the runtime when Target1 structure is getting filled Source3 value is not visible so I am not able to set a proper condition.
    When at lower level we get value of Source3 can we change value of already filled structure Target1?
    Thanks,
    Atul

    Hi Aamir,
    Thanks for your reply.
    If possible can you give any sample code for this kind of UDF?
    Thanks,
    Atul Patil

  • How to use bind variable value of one VO as initial value for other VO row?

    JDeveloper 10.1.3.3, ADF Faces, ADF BC
    Hi,
    I have two View Objects: one read only with several bound variables and another editable entity based. Correspondingly there are two ADF Faces pages: first contains search form based on the read-only VO and second create form based on the editable VO. The search form has several hidden fields for some of bound variables because they aren't edited directly by user. These fields are updated with PPR when user selects other search criteria from LOV.
    There is a command button in the first page that navigates to the second form. Is there any way to transfer values of bound variables from the first VO to the second VO as initial values of the new row?
    I tried to set custom controller for the second page and retrieve search criteria values from request parameter map but values from hidden fields are missing. I think because that these fields are updated by PPR. Of course I can add custom action method to the navigation button and in the method put these values to request parameter map but I hope there is better solution.
    Thanks,
    Marius

    To summarize, given a bind variable value for one VO, on creating a row in a second VO, for 1 of the attributes of the second VO, you want to use the first VO's bind variable value. Correct?
    A potential solution ADF BC driven:
    1) Ensure you have an AppModuleImpl for your AM
    2) Ensure you have a ViewImpl for your 1st VO (where the bind variable will exist) - lets refer to that VO as "Alpha"
    3) Ensure you have a ViewRowImpl for your 2nd VO (the one you want to default the value in) - lets refer to that VO as "Beta"
    4) For your first VO "Alpha" create the bind variable (say pValue)
    5) In your second VO "Beta" ViewRomImpl add following code:
    @Override
    protected void create(AttributeList attributeList) {
      super.create(attributeList);
      AppModuleImpl am = (AppModuleImpl)this.getApplicationModule();
      String someValue = am.getAlphaView1().getpValue();
      setSecondVOAttr(someValue); // change this code to whatever your setter is for the field you want to initialize.
    }Hope this helps. Let us know how you go.
    Regards,
    CM.

Maybe you are looking for

  • Hard Drive makes Airport Extreme Restart. HELP PLEASE!

    It's been more than a month since I startes trying to tackle this problem, now I'm pulling my hair out. My small 60GB Lacie (non powered) works fine, mounts, etc. but my big WD 320BG Lightes Combo makes the Extreme's status light go solid amber when

  • Windowboxing

    I recently edited some footage using FCE HD and exported it as a Quicktime file in order to open it in IMovie and burn a DVD in IDVD. Prior to importing it into IMovie, I made sure Windowboxing and Letterboxing was unchecked (I don't need letterboxin

  • Problems connecting til TV

    I have a 21" iMac from (mid 2008) that I have connected to my 50" Samsung TV using a DVI-toHDMI cable. This has worked great. But yesterday morning I turned of "syncronized screens", this caused both screens to display distorted pictures. I managed t

  • Date field in Dashboard Prompt

    Hi, Still try to find how I can format date in dashboard prompt. I have created prompt for Invoice cleared date using calendar format in control. After pressing go button the format is changed to MM/DD/YYYY HH:MI:SS I want format should always remain

  • ITunes won't quit to allow upgrade

    Current iTunes stubbornly refuses to quit. I cannot upgrade to the latest version.