Validate one column based on another column

I am using a table view with LINEEDIT mode where 2 coulmns quantity and unit are open for edit. I want the unit field to be mandatory only when the quantity is entered. Is it possible to do this at the client level? if so, can someone post a sample code? Thanks!
M~

Asked and responded here:
http://discussions.apple.com/thread.jspa?messageID=8367522
Yvan KOENIG (from FRANCE vendredi 14 novembre 2008 14:22:47)

Similar Messages

  • Find duplicates in one column based on another column

    Does anyone know if there is a way to have Numbers do the following:
    Column A contains a list of email address
    Column B contains another list of email address.
    I want to compare Column A against Column B to find the duplicates in Column A.
    Thanks,
    Awfers

    Asked and responded here:
    http://discussions.apple.com/thread.jspa?messageID=8367522
    Yvan KOENIG (from FRANCE vendredi 14 novembre 2008 14:22:47)

  • Filter column based on another column - OBIEE 11g

    Hi, I have kind of a strange requirement. I'm trying to build a dashboard that lets a user see data for the current day, last week, last month, or last year. I'm going to create a presentation variable called "date_range" where the user can choose one of those 4 options.
    Based on this, I've defined a column in answers with the following formula:
    cast
    case
    when 1 = 0 then "Query Time"."Date"
    when @{date_range}{'Day'} = 'Day' then Current_Date
    when @{date_range}{'Week'} = 'Week' then TIMESTAMPADD(SQL_TSI_DAY, -7, CURRENT_DATE)
    when @{date_range}{'Day'} = 'Month' then TIMESTAMPADD(SQL_TSI_DAY, -30, CURRENT_DATE)
    when @{date_range}{'Day'} = 'Year' then TIMESTAMPADD(SQL_TSI_DAY, -365, CURRENT_DATE)
    else TIMESTAMPADD(SQL_TSI_DAY, -10000, CURRENT_DATE)
    end as DATE
    Based on the 4 presentation variable, this should give the proper "start date" of when to pull data.
    Now I've added the actual date column from the date dimension. But I need to put a filter on the date dimension date column that says it's greater than or equal to the calculated column above. How do I do that?
    Thanks,
    Scott

    I always expect what you're expecting, but you can't filter a column on another column. The solution is just to write one formula that returns a literal, so it will be
    case when (your date column) >= (your long formula) then 'Y' else 'N' end
    Then filter that column on 'Y'.
    Regards,
    Robert

  • Sql to break one field based on another column

    sample data :
    --DROP TABLE XXCNC.TEST_FREIGHT_CLASS;
    CREATE TABLE XXCNC.TEST_FREIGHT_CLASS
      ITEM_ID        NUMBER,
      UOM varchar2(3),
      FREIGHT_CLASS  VARCHAR2(250 BYTE)
    SET DEFINE OFF;
    Insert into XXCNC.TEST_FREIGHT_CLASS
       (ITEM_ID, UOM, FREIGHT_CLASS)
    Values
       (1, 'CS', '[CS|100|CREAM SUBSTITUTE O.T. MILK CREAM][EA|100|ITEMS TO BE REBOXED]');
    Insert into XXCNC.TEST_FREIGHT_CLASS
       (ITEM_ID, UOM, FREIGHT_CLASS)
    Values
       (2, 'EA', '[CS|100|SOLUBLE COFFEE|73725][EA|100|ITEMS TO BE REBOXED]');
    Insert into XXCNC.TEST_FREIGHT_CLASS
       (ITEM_ID, UOM, FREIGHT_CLASS)
    Values
       (3, 'CS', '[CS|150|LUGGAGE AND TRAVEL ACCESSORIES|187645-04][EA|100|ITEMS TO BE REBOXED]');
    Insert into XXCNC.TEST_FREIGHT_CLASS
       (ITEM_ID, UOM, FREIGHT_CLASS)
    Values
       (4, 'EA', '[EA|65|ITEMS TO BE REBOXED|NMFC#XXXXX][CS|60|FOOD ITEMS |12345  ]');
    Insert into XXCNC.TEST_FREIGHT_CLASS
       (ITEM_ID, UOM, FREIGHT_CLASS)
    Values
       (5, 'CS', '[EA|100|SHOWER CURTAINS AND ACCESSORIES][CS|60|ITEMS TO BE REBOXED]');
    COMMIT;
    desired result :
    ITEM    UOM     freight_class_code                                                             class     description                     code
    1     CS     [CS|100|CREAM SUBSTITUTE O.T. MILK CREAM][EA|100|ITEMS TO BE REBOXED]           100   CREAM SUBSTITUTE O.T. MILK CREAM   null
    2     EA     [CS|100|SOLUBLE COFFEE|73725][EA|100|ITEMS TO BE REBOXED]                       100   ITEMS TO BE REBOXED                73725
    3     CS     [CS|150|LUGGAGE AND TRAVEL ACCESSORIES|187645-04][EA|100|ITEMS TO BE REBOXED]   150   LUGGAGE AND TRAVEL ACCESSORIES     187645-04
    4     EA     [EA|65|ITEMS TO BE REBOXED|NMFC#XXXXX][CS|60|FOOD ITEMS |12345  ]               65    ITEMS TO BE REBOXED                NMFC#XXXXX
    5     CS     [EA|100|SHOWER CURTAINS AND ACCESSORIES][CS|60|ITEMS TO BE REBOXED]             60    ITEMS TO BE REBOXED                null
    using substr and instr I was able to extract data for one item_id, but since all the items have different freight_class_code, I dont know how to hit this problem.
    structure of freigh_class_code = [CS|...|.................|.....][EA|...|..................|....]
    Logic: for item=1 , if UOM = CS , get the values corresponding to CS in = [CS|100|CREAM SUBSTITUTE O.T. MILK CREAM] .
    print ... '100'  'CREAM SUB..........CREAM' and if there is no "|" after the description then print nullI would appreciate any help
    Thanks

    That's really poor design, storing multiple items in one column value like that. Any chance you can redesign the database to make it store the data properly?
    SQL> ed
    Wrote file afiedt.buf
      1  with t as (select 1 as item_id, 'CS' as uom, '[CS|100|CREAM SUBSTITUTE O.T. MILK CREAM][EA|100|ITEMS TO BE REBOXED]' as freight_class from dual union all
      2             select 2, 'EA', '[CS|100|SOLUBLE COFFEE|73725][EA|100|ITEMS TO BE REBOXED]' from dual union all
      3             select 3, 'CS', '[CS|150|LUGGAGE AND TRAVEL ACCESSORIES|187645-04][EA|100|ITEMS TO BE REBOXED]' from dual union all
      4             select 4, 'EA', '[EA|65|ITEMS TO BE REBOXED|NMFC#XXXXX][CS|60|FOOD ITEMS |12345  ]' from dual union all
      5             select 5, 'CS', '[EA|100|SHOWER CURTAINS AND ACCESSORIES][CS|60|ITEMS TO BE REBOXED]' from dual)
      6  --
      7  -- end of test data
      8  --
      9  select item_id, uom, freight_class
    10        ,regexp_replace(regexp_substr(class,'[^|]+',1,2),'\]') as class
    11        ,regexp_replace(regexp_substr(class,'[^|]+',1,3),'\]') as description
    12        ,regexp_replace(regexp_substr(class,'[^|]+',1,4),'\]') as code
    13  from (
    14        select item_id
    15              ,uom
    16              ,freight_class
    17              ,case when uom = substr(regexp_substr(freight_class,'\[.*?\]',1,1),2,2) then regexp_substr(freight_class,'\[.*?\]',1,1)
    18               else regexp_substr(freight_class,'\[.*?\]',1,2)
    19               end as class
    20        from t
    21       )
    22* order by item_id
    SQL> /
       ITEM_ID UOM FREIGHT_CLASS                                                                 CLASS DESCRIPTION                              CODE
             1 CS  [CS|100|CREAM SUBSTITUTE O.T. MILK CREAM][EA|100|ITEMS TO BE REBOXED]         100   CREAM SUBSTITUTE O.T. MILK CREAM
             2 EA  [CS|100|SOLUBLE COFFEE|73725][EA|100|ITEMS TO BE REBOXED]                     100   ITEMS TO BE REBOXED
             3 CS  [CS|150|LUGGAGE AND TRAVEL ACCESSORIES|187645-04][EA|100|ITEMS TO BE REBOXED] 150   LUGGAGE AND TRAVEL ACCESSORIES           187645-04
             4 EA  [EA|65|ITEMS TO BE REBOXED|NMFC#XXXXX][CS|60|FOOD ITEMS |12345  ]             65    ITEMS TO BE REBOXED                      NMFC#XXXXX
             5 CS  [EA|100|SHOWER CURTAINS AND ACCESSORIES][CS|60|ITEMS TO BE REBOXED]           60    ITEMS TO BE REBOXED

  • Tabular Form: Conditional column based on another column in table/form?

    Hi!
    I have 4 columns in table A:
    number (the question number)
    question (the question to be asked)
    type (TEXT, LOV are the 2 valid values)
    answer (the answer with text or a selection from the lov table below)
    I have 2 columns in table B:
    number (the question number)
    values (a single value for the lov's)
    In table B there can be mutiple rows for each number. Table A and table B
    join on the number.
    I want to build a tablular form on table A where for each row either a text
    box or a select list is displayed depending on the contents of the type column.
    So row 1 would display a text box when the type value is text; row 2 would
    display a select list when the type value is lov.
    Is this even possible? How do I refer to the type column in the conditional for the
    answer column? I am guessing that I will need to have 2 answer columns one
    that displays when the type column is TEXT and one that displays when the
    type column contains LOV. This is OK. Setting up the conditional is display is the issue at this point.
    Hopefully I have explained this well enough! :)
    Thanks!
    Dave Venus

    Hi Dave,
    Sorry for not responding sooner - I finish work at 3pm GMT.
    I'll take your first question first (3:28PM posting according to my display - not sure if you are on GMT time?):
    As far as I understand it, using the select_list_from_query() function generates the options that are required in the select list as HTML tags. Each instance of this function should create a SELECT tag and the results of the query should generate one or more OPTION tags within it.
    Second question (4:20PM posting):
    The HTMLDB_ITEM functions are listed in the documentation - here's a link to the online version:
    http://download-east.oracle.com/docs/cd/B19306_01/appdev.102/b14303/api.htm#sthref2524
    Most of the examples that I have seen have been on this forum - simply search for HTMLDB_ITEM or one of its functions.
    I tend to leave the generation of tabular forms to the wizard as much as possible. The only exceptions are when I need to have access to more than the Primary Key for a row but don't want to show the field on screen. There are examples on the forum about concatenating the HTMLDB_ITEM functions into a single value - this hides ID fields from the user but makes them available to PL/SQL code.
    Third question (5:29PM posting)
    I did try using DECODE in my questionnaire but not for the feature that you needed. Originally, I wanted to use this to display one of a number of different fields (ie, my date, number or string field as appropriate to the question) but this didn't help as I couldn't get back to the right field during the update. If you have decode working for the select lists, then that's great!
    The first column should be hidden or sitting behind a checkbox as this should be the Primary Key for the row and should not be editable by the user nor would it normally be displayed.
    As long as your select statement creates the correct output (albeit that you may need to work on the layout!), you should have an updatable form. However, you will need to have the MRU processes in place and the appropriate buttons that trigger these. When I did my questionnaire, I created the form using a wizard to get all of the processes and buttons and then changed the select statement. If you haven't got the processes and/or buttons, we can go through adding these onto your page.
    Last question (9:08PM posting)
    As explained above, column 1 should normally be hidden. The INPUT tag you detail above is what I would expect to see. The value="6" attribute indicates that 6 is the Primary Key for that row - every row will have the same tag but different values for the "value" attribute. So, if it is hidden and these are the tags you see doing a View Source on the page, then everything is correct.
    OK. So now we have the data on screen and (hopefully?) we have the correct processes and buttons on the page.
    The next step would be validation and update of the data.
    Validation of the data can be handled by a normal page process - I can let you have example code if you want to validate the data (this will also explain how to loop through the rows - there are also methods that you can use to do this in javascript if you want). Updates should be handled by the processes and buttons on the page - again, if you haven't got these we can go through adding them in (although, if you haven't yet formatted your page, you may find it quicker to copy your select statement and create the page again using the same select statement).
    ORA-20001 errors are user defined errors. Do you mean the "data has changed" errors? If so, you will probably need to include the MD5 checksum functionality (it's shown in the document linked above).
    Finally, we'll keep this thread going so that you have all of your workings and my responses in one place, if that's ok with you?
    Regards
    Andy

  • Af:table how to conditionally disable a column based on another column

    Hi,
    I have an update able af:table of Employees record.
    I'm trying to disable(make read only) the "Salary" column if the manager_id is '146' on loading of the table
    Can this be done?
    Edited by: srihari manian on Aug 5, 2009 1:37 AM

    Hi Joseba,
    I tried the above approach,but getting the following error:
    java.lang.IllegalArgumentException: Cannot convert 100 of type class oracle.jbo.domain.Number to class java.lang.Long
         at com.sun.el.lang.ELSupport.coerceToNumber(ELSupport.java:293)
         at com.sun.el.lang.ELSupport.equals(ELSupport.java:154)
         at com.sun.el.parser.AstEqual.getValue(AstEqual.java:43)
         at com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:192)
         at org.apache.myfaces.trinidad.bean.FacesBeanImpl.getProperty(FacesBeanImpl.java:68)
         at oracle.adfinternal.view.faces.renderkit.rich.LabeledInputRenderer.isDisabled(LabeledInputRenderer.java:220)
         at oracle.adfinternal.view.faces.renderkit.rich.LabeledInputRenderer.getRootStateStyleClasses(LabeledInputRenderer.java:187)
         at oracle.adf.view.rich.render.RichRenderer.renderRootStyleAttributes(RichRenderer.java:803)
         at oracle.adf.view.rich.render.RichRenderer.renderRootStyleAttributes(RichRenderer.java:781)
         at oracle.adf.view.rich.render.RichRenderer.renderRootStyleAttributes(RichRenderer.java:748)
         at oracle.adf.view.rich.render.RichRenderer.renderAllRootAttributes(RichRenderer.java:710)
         at oracle.adf.view.rich.render.RichRenderer.renderAllRootAttributes(RichRenderer.java:689)
         at oracle.adfinternal.view.faces.renderkit.rich.LabelLayoutRenderer.encodeAll(LabelLayoutRenderer.java:233)
         at oracle.adfinternal.view.faces.renderkit.rich.LabeledInputRenderer.encodeAll(LabeledInputRenderer.java:164)
         at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1187)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:335)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:751)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:415)
         at oracle.adfinternal.view.faces.renderkit.rich.table.BaseColumnRenderer.renderDataCell(BaseColumnRenderer.java:1133)
         at oracle.adfinternal.view.faces.renderkit.rich.table.BaseColumnRenderer.encodeAll(BaseColumnRenderer.java:104)
         at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1187)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:335)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:751)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:415)
         at oracle.adfinternal.view.faces.renderkit.rich.TableRenderer.renderDataBlockRows(TableRenderer.java:1852)
         at oracle.adfinternal.view.faces.renderkit.rich.TableRenderer._renderSingleDataBlock(TableRenderer.java:1552)
         at oracle.adfinternal.view.faces.renderkit.rich.TableRenderer._handleDataFetch(TableRenderer.java:964)
         at oracle.adfinternal.view.faces.renderkit.rich.TableRenderer.encodeAll(TableRenderer.java:494)
         at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1187)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:335)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:751)
         at org.apache.myfaces.trinidad.component.UIXCollection.encodeEnd(UIXCollection.java:527)
         at org.apache.myfaces.trinidad.render.RenderUtils.encodeRecursive(RenderUtils.java:70)
         at oracle.adfinternal.view.faces.util.rich.InvokeOnComponentUtils$RenderCallback.invokeContextCallback(InvokeOnComponentUtils.java:97)
         at org.apache.myfaces.trinidad.component.UIXCollection.invokeOnComponent(UIXCollection.java:1024)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.invokeOnChildrenComponents(UIXComponentBase.java:1312)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.invokeOnComponent(UIXComponentBase.java:1406)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.invokeOnChildrenComponents(UIXComponentBase.java:1312)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.invokeOnComponent(UIXComponentBase.java:1406)
         at oracle.adf.view.rich.component.rich.RichDocument.invokeOnComponent(RichDocument.java:159)
         at javax.faces.component.UIComponent.invokeOnComponent(UIComponent.java:731)
         at javax.faces.component.UIComponentBase.invokeOnComponent(UIComponentBase.java:675)
         at oracle.adfinternal.view.faces.util.rich.InvokeOnComponentUtils.renderChild(InvokeOnComponentUtils.java:29)
         at oracle.adfinternal.view.faces.streaming.StreamingDataManager._pprComponent(StreamingDataManager.java:616)
         at oracle.adfinternal.view.faces.streaming.StreamingDataManager.execute(StreamingDataManager.java:465)
         at oracle.adfinternal.view.faces.renderkit.rich.DocumentRenderer._encodeStreamingResponse(DocumentRenderer.java:2608)
         at oracle.adfinternal.view.faces.renderkit.rich.DocumentRenderer.encodeAll(DocumentRenderer.java:969)
         at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1187)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:335)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:751)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.__encodeRecursive(UIXComponentBase.java:1494)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeAll(UIXComponentBase.java:771)
         at javax.faces.component.UIComponent.encodeAll(UIComponent.java:942)
         at com.sun.faces.application.ViewHandlerImpl.doRenderView(ViewHandlerImpl.java:271)
         at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:202)
         at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:189)
         at org.apache.myfaces.trinidadinternal.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:193)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._renderResponse(LifecycleImpl.java:685)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:261)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:193)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:266)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:191)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:85)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:420)
         at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:54)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:420)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:247)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:157)
         at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.security.jps.wls.JpsWlsFilter$1.run(JpsWlsFilter.java:96)
         at java.security.AccessController.doPrivileged(Native Method)
         at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
         at oracle.security.jps.wls.util.JpsWlsUtil.runJaasMode(JpsWlsUtil.java:146)
         at oracle.security.jps.wls.JpsWlsFilter.doFilter(JpsWlsFilter.java:140)
         at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:70)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.dms.wls.DMSServletFilter.doFilter(DMSServletFilter.java:202)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3588)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2200)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2106)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1428)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    Any suggestions
    Thanks,
    Srihari
    Edited by: srihari manian on Aug 5, 2009 1:56 AM

  • SharePoint 2013: Hide/Unhide column based on another column.

    Dear all,
    I have a dropdown list "Correspondence Type".  What I want is to display/hide some fields when "Correspondence Type" is selected.
    In the drop down list I have the following choices:  "IN" , "OUT".
    What is happening is, when i am selecting "IN", the columns are being hidden/displayed as should be.  But when I am selecting "OUT", the approprite columns are not being hidden/displayed.
    Please find below the code:
    ////////////////-----Code Starts here----/////////////
    $(document).ready(function(){
        // -----  Hide the field at the begin if the default value is other.
        // Get a single select dropdown field
        var countryField = SPUtility.GetSPField('Correspondence Type');
        var countryFieldValue = countryField.GetValue();
        // Hide the City field if the selected value is Other
        if(countryFieldValue == 'IN') {
            SPUtility.GetSPField('Date Sent').Hide();
            SPUtility.GetSPField('Date Received').Show();
        else if (countryFieldValue == 'OUT'){
            SPUtility.GetSPField('Date Sent').Show();
            SPUtility.GetSPField('Date Received').Hide();
       $("select[title='Correspondence Type']").change(function() {
    if ($("select[title='Correspondence Type']").val() == 'IN') {
    $('nobr:contains("Date Sent")').closest('tr').hide();
    $('nobr:contains("Date Received")').closest('tr').show();
    } else if($("select[Correspondence Type']").val() == 'OUT'){
    $('nobr:contains("Date Received")').closest('tr').hide();
    $('nobr:contains("Date Sent")').closest('tr').show();
    ////////////////-----Code Ends here----/////////////
    Anyone can help me out.
    Many Thanks & Regards
    Vinay

    The issue is in this statement else
    if($("select[Correspondence Type']").val() == 'OUT')
    It should be 
    else if($("select[title='Correspondence Type']").val() == 'OUT')
    Nadeem Yousuf

  • Manipulating report column based on another column value?

    Here is what I am trying to do.
    1.     I have a report region which has 2 columns.
    2.     Both the columns are setup as links to navigate to a different page. I am using <img src="#IMAGE_PREFIX#e2.gif" alt="Edit"> for link text report item attribute.
    3.     The value can be either in column 1 or 2 but not in both the columns at the same time.
    4.     If the value is existing in column1, the column 2 should display as null, which I have trouble with. I can see the images even though the value is null.
    Appreciate if you can let me know how to achieve this?
    Edited by: user552288 on Jul 15, 2009 7:45 AM

    Could you please post the current query which you are using?
    Instead of using the image display attribute in the report attributes column, can you include that part of the query.
    Something like:
    select
    (case when col1!=NULL then <img src="#IMAGE_PREFIX#e2.gif" alt="Edit">) else 'NULL' as Column1,
    (case when col2!=NULL then <img src="#IMAGE_PREFIX#e2.gif" alt="Edit"> ) else 'NULL' as Column2
    from table

  • Is it possible to create an invoive that keeps a running total in one column and in another column keep total of monies spent from a starting amount of funding?

    Is it possible to create an invoive that keeps a running total in one column and in another column keep total of monies spent from a starting amount of funding?

    Hi Sara,
    Many thanks for your reply.  We just brought Adobe Acrobat XI Pro complete
    with Adobe Forms Central, My manager asked whether I could use the forms
    part to create a summary tracking sheet for all of our contracts.
    Having looked at it I could see how to create a table that in the first
    column deleted costs from a starting fund, and in the last keeps a running
    total of all monies spent.
    I agree, Excel does seem to be much better suited to the task.  I was try
    trying to comply with her request
    Regards,

  • How to Fill list in excel based on another columns cell value

    Hello,
    I am facing issue while binding data to list i want to bind list or filter list based on another columns cell value

    If your list is a series of rows with column headers like the following:
    Column A
    Column B
    1
    Apple
    1
    Banana
    1
    Orange
    2
    Pineapple
    2
    Cucumber
    2
    Watermelon
    Then you can do this will Excel's built in filter functions. If you select the entire data table and then go to "DATA" then click the "FILTER" button a drop down will appear next to both headers (Column A and Column B in this case). You
    can then select the data you would like filtered from either column and Excel will hide that entire row.
    If this is not what you are looking for please post some examples of what you are trying to see.

  • How to update one table based on another table ??

    Hello Friends:
    I am trying to run the following query in oracle but it won't run.
    UPDATE BOYS
    SET
    BOYS.AGE = GIRLS.AGE
    FROM GIRLS
    WHERE
    BOYS.FIRSTNAME = GIRLS.FIRSTNAME AND
    BOYS.LASTNAME = GIRLS.LASTNAME;
    This query runs fine in sql server but in oracle its saying can't find "SET". PLease tell me what is the correct syntax in oracle to update one table based on another table.
    thanks

    See if this helps.
    If you wrote an SQL statement:
    update boys set age = 10;
    Every row in the boys table will get updated with an age of 10. But if you wrote:
    update boys set age = 10
    where firstname = 'Joe';
    Then only the rows where the firstname is Joe would be updated with an age of 10.
    Now replace the 10 in the above statements with (select g.age from girls g where g.firstname = b.firstname and g.lastname = b.lastname) and replace where firstname = 'Joe' in the second statement with where exists (select null from girls g where g.firstname = b.firstname and g.lastname = b.lastname). The same concepts apply whether 10 is an actual value or a query and whether you have a where clause with the update statement to limit rows being updated.
    About the select null question regarding the outer where clause:
    Since the query is checking to see if the row in the girls table exists in the boys table what the column is in this select statement doesn't matter, this column isn't being used anywhere. In this case Todd chose to use null. He could have also used a column name from the table or a lot of times you'll see the literal value 1 used here.

  • Radio group in classic report based on another column on the same row.

    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    Application Express 4.1.0.00.32
    How can I have a radio group column based on an LOV utilizing another column on the same row of the report?
    For example: what if I had a survey application and depending on the likert scale that was assigned to the question there would be different possible answer choices:
    Question 1 on row 1 of the report: The class instructor was friendly?
    Likert scale choice is Agreement.
    Choices on Radio Group: Strongly Agree, Agree, Undecided, Strongly Disagree
    Question 2 on row 2 of the report: The class offered good materials?
    Likert scale choice is Quality.
    Choices on Radio Group: Excellent, Below Average, Average, Above Average, Excellent
    The radio group can change per row depending on the Likert scale assigned to the question which is assigned to a different column on the row.
    Can LOV utilize the column? :
    SELECT scale_text
    FROM scale_choices
    WHERE scale_category_choice_id = 2 <<= this would be the Likert scale identifier
    ORDER
    BY display_order

    Here is the answer:
    APEX_ITEM.SELECT_LIST_FROM_QUERY(
    p_idx IN NUMBER,
    p_value IN VARCHAR2 DEFAULT NULL,
    p_query IN VARCHAR2,
    p_attributes IN VARCHAR2 DEFAULT NULL,
    p_show_null IN VARCHAR2 DEFAULT 'YES',
    p_null_value IN VARCHAR2 DEFAULT '%NULL%',
    p_null_text IN VARCHAR2 DEFAULT '%',
    p_item_id IN VARCHAR2 DEFAULT NULL,
    p_item_label IN VARCHAR2 DEFAULT NULL,
    p_show_extra IN VARCHAR2 DEFAULT 'YES')
    RETURN VARCHAR2;

  • Auto populating a column prompt based on another column prompt

    Hi,
    Is it possible to auto-populate a column prompt, using the value of another column prompt?
    My situation is described as below.
    I have created a new dashboard prompt. This contains 2 column prompts, for example say col1 and col2. Both are multi-select prompts.
    col1 values - a,b,c,d.....
    col2 values - 5,2,8,7.....
    col1 and col2 values are picked from different tables. Also we have a mapping table which maps col1 and col2. Say a-5, b-10, c-1, d-3 etc...
    My requirement is, if a user selects values "a,d" for col1 prompt, col2 prompt must be automatically populated by values "5,3".
    Is this possible? If so, please help.
    Thanks,
    kc.

    If the actual filter criteria is only col1 the instead of displaying the values in the second prompt, make a separate report and only choose only the 2nd col in that report and make col1 as prompted and select appropriate title for that report.Place the report above the actual report in dashboard. So it will display only those records which are chosen in col1 from the prompt.

  • How to set column value to blank based on another column's condition in validation settings in sharepoint 2010?

    I need to set a field to be blank when another field is blank:
    when [Return Date] is blank [when item has not been returned]
    [Received by]  should be set to blank
    I tried this:
    =IF(ISBLANK([Return Date]),ISBLANK([Received by]),TRUE)
    But it failed.
    Is this possible through list validation settings?

    Hi
    you cannot reference another column in a formula that creates a default value for a column.
    PF below link for the same.
    http://ricardoramirezblog.wordpress.com/2013/05/02/calculated-field-formulas-for-default-value/
    Regards,
    Rajendra Singh
    If a post answers your question, please click Mark As Answer on that post and Vote as Helpful
    http://sharepointundefind.wordpress.com/

  • Simple query to find difference between 2 numbers in one column relative to another column

    Hello,
    I want to find the difference between 2 numbers from same column corresponding to some condition of another column. How do i that?
    Eg: Say I have a table with 3 columns A, B & C.
    A -> Varchar2
    B -> Varchar2
    C -> Number
    A
    B
    C
    A
    D
    1
    B
    C
    2
    C
    B
    3
    D
    A
    4
    I want something like "value of column C corresponding to min(col A) - value of column C corresponding to min(col B) = result (number)" without having to write 2 select statements. How do I do that?
    Thanks in advance
    aBBy007
    System notes:
    2-node 11.2.0.3.4 GI/RDBMS running on RHEL5.

    Thank you.
    That solved part of a problem. Now what if I want to satisfy a condition?
    Considering the same above table, say I want to "value of Col_C when value of Col_A='D' - value of Col_C when value of Col_B='C'"?
    abby007
    I am trying to query the v$archived_log view. And currently 'm running the below 2 queries to find out the updated archives on the DR site and then manually subtracting it:
    PhyStdby: SQL > select thread#, max(sequence#) "Last Standby Seq Received"
    from v$archived_log val, v$database vdb
    where val.resetlogs_change# = vdb.resetlogs_change#
    group by thread# order by 1;
    PhyStdby: SQL > select thread#, max(sequence#) "Last Standby Seq Applied"
    from v$archived_log val, v$database vdb
    where val.resetlogs_change# = vdb.resetlogs_change#
    and applied='YES'
    group by thread# order by 1;
    I want to combine the above 2 queries so that I get a response like:
    Thread#
    Last Standby Seq Received
    Last Standby Seq Applied
    Total Lag
    1
    33778
    33770
    8
    2
    70244
    70242
    2
    3
    46972
    46971
    1

Maybe you are looking for