SharePoint 2013 Make Calculated Column based on Custom Column

In SharePoint 2013, I am trying to create a Calculated Column that is a shortened display of another Custom Column. The Calculated Column would just show the first 100 characters concatenated with "..." like in the following formula:
=LEFT([CustomColumn],100)&"..."
However, every time that I go to create this calculated column, SharePoint doesn't provide my [CustomColumn] in the "Insert Column:" list. If I type it in anyway, SharePoint throws an error.
Details on my Column, List, and Site below:
    Col. Type: Multiple lines of text
    Col. Group: Custom Columns
    Col. Text Type: Enhanced rich text
    List Content Type: Custom Type Inherits from Event
    Site Type: Publishing
Also, to no avail, I found this similar post (link below), but creating the Site Column and Calculated Column
before adding it to the Content Type did not work for me. 
http://social.technet.microsoft.com/Forums/sharepoint/en-US/26a7517e-ba43-4c49-95aa-3e6f7f4207ba/calculated-field-in-content-type-not-working
Anyone out there know how to coax SharePoint into submission?!

Multi lines of text are one of the types of columns which can't be used by calculated columns/fields. Among such unusable columns are also Lookup columns, People columns, External Columns, MMS columns, etc.
Scott Brickey
MCTS, MCPD, MCITP
www.sbrickey.com
Strategic Data Systems - for all your SharePoint needs

Similar Messages

  • Column name of custom columns is possible of translating automatic

    In SharePoint 2013 is possible of translating automatic the column name of custom columns with machine translation services or it is necessary create resource files or source site and target site?

    Hi,
    When you create a column, the name you enter is just a constant string. SharePoint does not do translation based on known words. Internationalization is based on resource files.
    Here are the steps I would take for creating international-able columns through the browser:
    Create the column with the name you want as the internal name (ie, no spaces or symbols to avoid
    _x0020_ and other encoding replacements).
    Edit the column by changing the column name to a resource string that you know if defined in each language you want to support.
    Here are similar posts, you can use as a reference:
    https://social.msdn.microsoft.com/Forums/sqlserver/pt-BR/06742b53-ccc9-4d2c-ac61-fbba37e60be1/how-to-translate-custom-column-names-in-the-target-variation-site-in-sharepoint-2013?forum=sharepointdevelopment
    http://sharepoint.stackexchange.com/questions/30226/how-to-display-column-names-in-several-languages-in-sharepoint
    Best Regards,
    Lisa Chen
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • Remote upload into sharepoint 2013 document library (cloud based)

    We have a sharepoint 2013 in the cloud.
    Is it possible to have some kind of service (windows or web based) that can access a document library on said cloud server and put files into said document library?
    I don't think we have a lot of behind the scenes access to the cloud instance of 2013.

    Hi,
    As I said above, we could use the Client Object Model to upload the files without the user having to go to SharePoint in the browser first and logging in.
    We can use the credentials in the code as below, the code would copy files to SharePoint online, it worked well in my environment, you can check whether it works.
    public static void CopyDocuments(string srcUrl, string srcLibrary, string destUrl, string destLibrary)
    // set up the src client
    ClientContext srcContext = new ClientContext(srcUrl);
    SecureString passWord1 = new SecureString();
    foreach (char c in "Password01!".ToCharArray()) passWord1.AppendChar(c);
    srcContext.Credentials = new SharePointOnlineCredentials("[email protected]", passWord1);
    Web srcWeb = srcContext.Web;
    List srcList = srcWeb.Lists.GetByTitle(srcLibrary);
    ListItemCollection itemColl = srcList.GetItems(new CamlQuery());
    srcContext.Load(itemColl);
    srcContext.ExecuteQuery();
    // set up the destination context
    ClientContext destContext = new ClientContext(destUrl);
    SecureString passWord = new SecureString();
    foreach (char c in "Password01!".ToCharArray()) passWord.AppendChar(c);
    destContext.Credentials = new SharePointOnlineCredentials("[email protected]", passWord);
    // get the destination list
    Web destWeb = destContext.Web;
    destContext.Load(destWeb);
    destContext.ExecuteQuery();
    foreach (var doc in itemColl)
    try
    //if (doc.FileSystemObjectType == FileSystemObjectType.File) //Field or Property "FileAttachement not found."
    // get the file
    File file = doc.File;
    srcContext.Load(file);
    srcContext.ExecuteQuery();
    // build destination url
    string nLocation = destWeb.ServerRelativeUrl.TrimEnd('/') + "/" + destLibrary.Replace(" ", "") + "/" + file.Name;
    // read the file, copy the content to new file at new location
    FileInformation fileInfo = File.OpenBinaryDirect(srcContext, file.ServerRelativeUrl);
    File.SaveBinaryDirect(destContext, nLocation, fileInfo.Stream, true);
    catch (Exception ex)
    http://blog.blumshapiro.com/blog/2012/08/22/sharepoint-2010-using-the-client-object-model-to-move-files-and-folders-across-site-collections-and-subsites/
    Thanks,
    Jason
    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].
    Jason Guo
    TechNet Community Support

  • How to create new calculated column based on filtered columns?

    Dear All,
    I'm using Oracle Analysis.
    I have two column, each one have different formula.
    My Formula based on filter.
    Column1
    FILTER("DW"."SUM_PLAN_MONTH_AMOUNT" USING ("DW"."PLAN_YEAR" BETWEEN YEAR(DATE'@{P_BEGIN_DATE}') and YEAR(DATE'@{P_END_DATE}')))Column2
    FILTER("PAYMENTS"."SUM_PAY_AMOUNT" / 1000 USING ("PAYMENTS"."PAY_DATE_PAID" BETWEEN DATE'@{P_BEGIN_DATE}' AND DATE'@{P_END_DATE}'))How to add new calculated column based on those two column?
    For example:
    Column1 | Column2 | NewColumn
    5 | 10 | 10 / 5 * 100
    7 | 12 | 12 / 7 * 100
    Regards,
    Eba
    Edited by: Erdenebayar on Apr 19, 2012 1:42 PM
    Edited by: Erdenebayar on Apr 19, 2012 3:37 PM

    Hello MK,
    I have a tried following formula. It is working, but result is not filtered.
    I filtered "PAYMENTS"."SUM_PAY_AMOUNT" and "DW"."SUM_PLAN_MONTH_AMOUNT" columns.
    "PAYMENTS"."SUM_PAY_AMOUNT" / "DW"."SUM_PLAN_MONTH_AMOUNT" * 100Can you share me some tutorial?
    BR,
    Eba
    Edited by: Erdenebayar on Apr 19, 2012 3:43 PM
    Edited by: Erdenebayar on Apr 19, 2012 3:43 PM
    Edited by: Erdenebayar on Apr 19, 2012 3:43 PM

  • How to insert into date column based on other columns?

    Hi
    I have four columns in a table called game named as
    R_Day - Type - Number
    R_Month - Type - Number
    R_Year - Type - Number
    R_Date - Type - Date
    I have around 1000 records and i want to fill R_Date column based on the data in the R_Day,R_Month,R_Year.
    How to write a query to fill the R_Date column based on other three columns.
    Thanks
    srinivas

    select
    to_date(R_Day||'-'||R_Month||'-'||R_Year,'DD-MM-YYYY')
    dt from (select 23 R_Day,07 R_Month,2007 R_Year from
    dual);
    Hi,
    Update <Table Name> set R_Date=select
    to_date(R_Day||'-'||R_Month||'-'||R_Year,'DD-MM-YYYY')
    from <Table Name>
    Regds.
    Nirmal
    SQL>  select * from test;
         R_DAY    R_MONTH     R_YEAR R_DATE
             1          1       2007
            21         11       2007
    SQL> update test
      2  set r_date = select to_date(R_Day||'-'||R_Month||'-'||R_Year,'DD-MM-YYYY')
      3  from test;
    set r_date = select to_date(R_Day||'-'||R_Month||'-'||R_Year,'DD-MM-YYYY')
    ERROR at line 2:
    ORA-00936: missing expression
    SQL> update test
      2  set r_date = to_date(r_day||'-'||r_month||'-'||r_year,'dd-mm-yyyy');
    2 rows updated.
    SQL> select * from test;
         R_DAY    R_MONTH     R_YEAR R_DATE
             1          1       2007 01-JAN-07
            21         11       2007 21-NOV-07
    NB:Please test before posting..                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Update column based on two columns

    Hi,
    MinValue     MaxValue    Desc
    -1                -1    
    -1                 1    
    -1                 2    
    0                  0    
    0                  1    
    0                  2 
    The above is my table which is having three columns MinValue, MaxValue, Desc. First two columns have data and I need to update the 3rd column 'Desc' based on two columns data.
    I need to update like,
    when MinValue=-1 and MaxValue=-1 then 'NotSpecified'
    when MinValue=-1 and MaxValue=1 then 'Up to 1'
    when MinValue=-1 and MaxValue=2 then 'Upto 2'
    when MinValue=0 and MaxValue=1 then 'At lest 1'
    when MinValue=0 and MaxValue=2 then 'At least 2'
    when MinValue=0 and MaxValue=3 then 'At least 3'
    The data in 'MaxValue' is like 1,2,3,4,5...50. So for each description it should append this value as mentioned above(till 'Up to 50', 'At least 50'). How can I do this with case statement?
    Thanks,
    Gangadhar

    declare @T table ( MinValue int,MaxValue int, [Desc] nvarchar(100) );
    insert @T ( MinValue, MaxValue )
    values ( -1, 1 ) , ( -1, 1 ) , ( -1, 2), ( 0, 0), ( 0, 1), ( 0, 2)
    select *
    from @T
    update @T
    set [Desc] = case
    when MinValue=-1 and MaxValue=-1 then 'NotSpecified'
    when MinValue=-1 and MaxValue=1 then 'Up to 1'
    when MinValue=-1 and MaxValue=2 then 'Upto 2'
    when MinValue=0 and MaxValue=1 then 'At lest 1'
    when MinValue=0 and MaxValue=2 then 'At least 2'
    when MinValue=0 and MaxValue=3 then 'At least 3'
    end
    select *
    from @T
    T-SQL Articles
    T-SQL e-book by TechNet Wiki Community
    T-SQL blog

  • 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

  • Sharepoint 2013 (Danish): Deploying site from a custom template fails with error "Duplicate content type"

    I cannot create a site-template in my own language (danish) and deploy a site based on the template.
    I created a template from a "fresh" SharePoint project site with no tampering.
    When trying to deploy a new site based on the templat I get the following error:
    In Danish:
    Beklager, men noget gik galt
    Det blev fundet et navn på en dubletindholdstype "billede".
    Tekniske oplysninger
    Fejlfinding af problemer med Microsoft SharePoint Foundation.
    Korrelations-id: 96646c9c-3213-a088-c6c4-537b0815313c
    Dato og klokkeslæt: 21-06-2014 10:23:36
    In English:
    Sorry, something went wrong
    A duplicate content type name "billede" was found.
    Technical Details
    Troubleshoot issues with Microsoft SharePoint Foundation.
    Correlation ID: 0b656c9c-52ee-a088-c6c4-5132070e3c4e
    Date and Time: 21-06-2014 10:31:35

    Need details from ULS logs about Correlation ID: 0b656c9c-52ee-a088-c6c4-5132070e3c4e
    Check below:
    http://social.technet.microsoft.com/Forums/sharepoint/en-US/e955e737-e12e-4afa-b446-bb6e0f05e9b1/duplicated-content-type-error-creating-a-sharepoint-2010-site-from-a-custom-site-template?forum=sharepointgeneralprevious
    http://aramacciotti.wordpress.com/2012/04/04/the-case-of-the-duplicated-contenttype/
    http://community.office365.com/en-us/f/154/t/69416.aspx
    If this helped you resolve your issue, please mark it Answered

  • SharePoint 2013 WCF Reading a list with a column to allow multiple lookup values

    Hi Team,
    I'm using SP2013 default WCF in _vti/bin/ListData.svc to read a list.
    This list has a look up column and it allows multiple values. While I read the list, I'm not able to retrieve this column as list.
    For Example, my parent list is 'VehicleList' and this has a column called-ColorLookUp (lookup with allow multiple values) linked to the 'ColorsList'.
    Pseudo Code:
    var vehicleItemsList=spcontext.VehicleList.toList(); 
    foreach(var item in vehicleItemsList)
    var colorItemList=item.ColorLookUp
    I'm expecting the 'colorItemList' should have values but it always gives me the count=0. But the same lookup column works if I dont allow multiple values.
    Please help me on this.
    thanks

    Hi,
    For the Lookup column, “Expand” is required if you want to get it through ListData.svc.
    A code snippet for your reference:
    var items = dc.List1.Expand("MyLookupColumn1");
    foreach (var item in items)
    Console.WriteLine(item.Title);
    foreach (var lk in item.MyLookupColumn1)
    Console.WriteLine(lk.Title + "---" + lk.Path);
    Feel free to reply if there still any questions.
    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

  • Logical (Business) Column based on physical column value

    Hello everyone,
    I'm new to here. I've been more of a reader than poster so far, but hopefully, I could offer some advice too.
    My question today is the following - let's say I have brought 2 columns to the physical layer (in the same table or in different, but joined - it doesn't really matter). 1 column is defining EXPENSE_TYPE (such as "Air Travel", "Car rental", "Hotel"...Another column is simply EXPENSE_AMT.
    I'd like to create 3 logical columns name AIR_TRAVEL_AMT, CAR_RENTAL_AMT, HOTEL_AMT in the busines layer based on the EXPENSE_AMT and EXPENSE_TYPE (AIR_TRAVEL_AMT= EXPENSE_AMT Where EXPENSE_TYPE="Air Travel")
    I know that best practices would make me create those columns in the fact table during in ETL process, however, I have no choice here now.
    My question is - how do I do it (I think it could be either variable/initialization block item - or possible I could write a CASE statement?).
    Is this method going to affect performance negatively?
    Thank you in advance.
    UPD: I think it's possible to do this using something like
    CASE WHEN Expense_Type = "AirType" THEN 1 else 0
    am I on correct path on figuring this one out?
    Message was edited by:
    wildmight

    Hi Wildmight,
    you´re right, you can do it with a CASE statement:
    For AIR_TRAVEL_AMT:
    CASE WHEN EXPENSE_TYPE="Air Travel" THEN EXPENSE_AMT ELSE 0 END
    Regards.

  • 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

  • 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

  • How to create a dynamic RTF report which creates dynamic columns based on dynamic column selection from a table?

    Hi All,
    Suppose I have table, whose structure changes frequently on daily basis.
    For eg. desc my_table gives you following column name on Day 1
    SQL > desc my_table;
    Output
    Name
    Age
    Phone
    On Day 2, two more columns are added, viz, Address and Salary.
    SQL > desc my_table;
    Output
    Name
    Age
    Phone
    Address
    Salary
    Now I want to create an Dynnamic RTF report which would fetch data from ALL columns from my_table on daily basis. For that I have defined a concurrent program with XML as output type and have attached a data template/data definition to it which takes in XML as input and gives final output of conc program in EXCEL layout. I am able to do this for constant number of columns, but dont know how to do it when the number of columns to be displayed changes dynamically.
    For Day 1 my XML file should be like this.
    <?xml version="1.0" encoding="UTF-8"?>
    <dataTemplate name="XYZ" description="iExpenses Report" Version="1.0">
    <dataQuery>
    <sqlStatement name="Q2">
    <![CDATA[
    SELECT Name
    ,Age
    ,Phone
    FROM my_table
    ]]>
    </sqlStatement>
    </dataQuery>
    <dataStructure>
    <group name="G_my_table" source="Q2">
      <element name="Name" value="Name" />
      <element name="Age" value="Age" />
      <element name="Phone" value="Phone" />
    </group>
    </dataStructure>
    </dataTemplate>
    And my Day 1, EXCEL output from RTF template should be like this.
    Name     Age     Phone
    Swapnill     23     12345
    For Day 2 my XML file should be like this. With 2 new columns selected in SELECT clause.
    <?xml version="1.0" encoding="UTF-8"?>
    <dataTemplate name="XYZ" description="iExpenses Report" Version="1.0">
    <dataQuery>
    <sqlStatement name="Q2">
    <![CDATA[
    SELECT Name
    ,Age
    ,Phone
    ,Address
    ,Salary
    FROM my_table
    ]]>
    </sqlStatement>
    </dataQuery>
    <dataStructure>
    <group name="G_my_table" source="Q2">
      <element name="Name" value="Name" />
      <element name="Age" value="Age" />
      <element name="Phone" value="Phone" />
      <element name="Address" value="Address" />
      <element name="Salary" value="Salary" />
    </group>
    </dataStructure>
    </dataTemplate>
    And my Day 2, EXCEL output from RTF template should be like this.
    Name     Age     Phone     Address     Salary
    Swapnill     23     12345         Madrid     100000
    Now, I dont know below things.
    Make the XML dynamic as in on Day 1 there must be 3 columns in the SELECT statement and on Day 2, 5 columns. I want to create one dynamic XML which should not be required to be changed if new columns are added in my_table. I dont know how to create this query and also create their corresponding elements below.
    Make the RTF template dyanamic as in Day1 there must 3 columns in EXCEL output and on Day 2, 5 columns. I want to create a Dynamic RTF template which would show all the columns selected in Dynamic XML.I dont know how the RTF will create new XML tags and how it will know where to place it in the report. Means, I can create RTF template on Day 1, by loading XML data for 3 columns and placing 3 XML tags in template. But how will it create and place tags for new columns on Day 2?
    Hope, you got my requirement, its a challenging one. Please let me know how I can implement the required solution using RTF dynamically without any manual intervention.
    Regards,
    Swapnil K.
    Message was edited by: SwapnilK

    Hi All,
    I am able to fulfil above requirement. Now I am stuck at below point. Need your help!
    Is there any way to UPDATE the XML file attached to a Data Definition (XML Publisher > Data Definition) using a standard package or procedure call or may be an API from backend? I am creating an XML dynamically and I want to attach it to its Data Definition programmatically using SQL.
    Please let me know if there is any oracle functionality to do this.
    If not, please let me know the standard directories on application/database server where the XML files attached to Data Definitions are stored.
    For eg, /$APPL_TOP/ar/1.0/sql or something.
    Regards,
    Swapnil K.

  • 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

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

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

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

Maybe you are looking for

  • How can I shut off all of the pop-up windows for all the Firefox updates?

    How can I shut off all of the pop-up windows for all the Firefox and Thunderbird updates? Apparently now Mozilla creates new versions of their browser and email apps every two weeks instead of just creating updates... I'm tired of all of the pop-up r

  • Mac Pro end of life?

    Are we dumping the Mac Pro? Saw a bunch of speculative posts over the last half year. As an editor and graphic designer I need to know. The trend I'm seeing doesn't really seem to fit pro users into Apple's forward path. For instance they are going c

  • G/L account display

    Dear all, Is there is any report which shows the list of material documents, and corresponding debit & credit G/L accounts. Thanks & regards Madhu

  • Please help test a gif program in Lion and Snow Leopard

    Can anyone please help me by testing a Gif creation app on a Lion and Snow Leopard machine? The app is called "GIFfun" and is free. It can be downloaded here:  http://www.stone.com/GIFfun/ I have used this app for years on a Leopard machine, but need

  • Syncing contacts to a 6300: firstname / surname

    When syncing to my 6300, Outlook contacts get their firstname and surname put together in the surname field in the 6300. I found an old topic on this subject, but it was about another phone with just one name field. Why does the sync software not res