Unknown column 'NewMessages' in 'field list'

Hi,
I am using PHP MySQL.
Ok, I am pretty sure my Hosting service upgraded either phpmyadmin, php, mysql, or all three because they are slightly different than before. So this code:
$colname_NewMessages = "-1";
if (isset($_SESSION['MM_Username'])) {
  $colname_NewMessages = $_SESSION['MM_Username'];
mysql_select_db($database_ProfileID, $ProfileID);
$query_NewMessages = sprintf("SELECT * FROM Message_System WHERE Reciever = %s AND Status = 'Not_Read' ", GetSQLValueString($colname_NewMessages, "text"));
$NewMessages = mysql_query($query_NewMessages, $ProfileID) or die(mysql_error());
$row_NewMessages = mysql_fetch_assoc($NewMessages);
$totalRows_NewMessages = mysql_num_rows($NewMessages);
use to work fine, but now it is returning the error "Unknown column 'NewMessages' in 'field list'"!
Can anyone help me with this?
Thanks

Use echo to see the actual query that's being sent to the database:
$colname_NewMessages = "-1";
if (isset($_SESSION['MM_Username'])) {
  $colname_NewMessages = $_SESSION['MM_Username'];
mysql_select_db($database_ProfileID, $ProfileID);
$query_NewMessages = sprintf("SELECT * FROM Message_System
                              WHERE Reciever = %s
                              AND Status = 'Not_Read' ",
       GetSQLValueString($colname_NewMessages, "text"));
echo $query_NewMessages;
exit;
$NewMessages = mysql_query($query_NewMessages, $ProfileID) or die(mysql_error());
$row_NewMessages = mysql_fetch_assoc($NewMessages);
$totalRows_NewMessages = mysql_num_rows($NewMessages);

Similar Messages

  • Column in field list is ambiguous error

    i am using jdbc in my program with a query statement that retrieve holdingsID by querying different tables. when i run the program it has an error saying
    Column HoldingsID in field list is ambiguous, what does this mean? How can i solve it?
    here is my code, included is my sql select statement please check it.
            String key=request.getParameter("key");  
              Connection conn = null;
              String[][] a=new String[10][3];          
              int r=0;
              String qstr="";
              ResultSet rs=null;          
              try{     
              Class.forName("com.mysql.jdbc.Driver").newInstance();
              conn = DriverManager.getConnection("jdbc:mysql://localhost/scitemp?user=scinetadmin&password=A1kl@taN");
              Statement stmt=conn.createStatement();
                qstr="SELECT DISTINCT HoldingsID FROM tblHoldings, tblHoldingsAuthorName," +
                         "tblHoldingsSubject, tblHoldingsPublisherName"+
                      " WHERE (tblHoldings.Title LIKE "+"'"+"%"+key+"%"+"'"+")"+" OR "+
                     "(tblHoldings.Contents LIKE "+"'"+"%"+key+"%"+"'"+")"+" OR " +
                     "(tblHoldingsAuthorName.AuthorName LIKE "+"'"+"%"+key+"%"+"'"+")"+" OR " +
                    "(tblHoldingsSubject.SubjectHeadings LIKE "+"'"+"%"+key+"%"+"'"+")"+" OR " +
                   "(tblHoldingsPublisherName.PublicationDate = "+"'"+key+"'"+")"+
                         " ORDER BY HoldingsID";                              
              rs  = stmt.executeQuery(qstr);
              while ( rs.next() && r <10) {                     
                        a[r][0]=rs.getString("HoldingsID");     
                        a[r][1]="1";
                        a[r][2]="SILMS";  
                        r++;      
              }catch(Exception e){out.println("error:"+e.getMessage());}-----
    thanks in advance for your help

    Actually, this is probably going to be a bit more efficient on large scale data. (I'm guessing, if it matters then test...)
    SELECT DISTINCT HoldingsID FROM
      SELECT HoldingsID
      FROM tblHoldings
      WHERE tblHoldings.Title LIKE '%key%'
           OR tblHoldings.Contents LIKE '%key%'
    UNION ALL
      SELECT HoldingsID
      FROM tblHoldingsAuthorName
      WHERE tblHoldingsAuthorName.AuthorName LIKE '%key%'
    UNION ALL
      SELECT HoldingsID
      FROM tblHoldingsSubject
      WHERE tblHoldingsSubject.SubjectHeadings LIKE  '%key%'
    UNION ALL
      SELECT HoldingsID
      FROM tblHoldingsPublisherName
      WHERE tblHoldingsPublisherName.PublicationDate = 'key'
    ORDER BY HoldingsIDThe diffence is when the sort(s) to create distinct rows is done. In the first version, UNION must produce only distinct values, so three sorts must be performed, one to create each UNION intermediate result. In the 2nd version, UNION ALL doesn't produce
    distinct values, we delay the sorting until the last minute and sort all candidates once, instead of one sub-set once, one sub-set twice and two sub-sets 3 times. If this is a school project, the difference probably doesn't matter.
    By the way, many databases implement the DISTINCT keyword in such a way that it creates sorted result sets, sorted by the resulting column values. As far as I know, this is not guaranteed by the SQL standard, so the additional ORDER BY clause is still needed for rigourous portability to databases that don't work that way. If that's not a concern and speed is, in many situations you can drop the ORDER BY; however for small result sets the difference is nearly invisible, and even for moderately large result sets, sorting an already sorted result set is usually an Order(n) in-memory operation. For really big results, the database will be swapping results to disk as it sorts and this sort of optimization matters then. This also applies to the use of GROUP BY.

  • How to update SharePoint list columns including choice fields programmatically?

    Hi All,
    I have a requirement to update multiple columns (which are choice columns) in a SharePoint list.  I'm a newbie at creating event receivers and timer jobs.  Not sure which one to do and where to start first.  There are approximately 4500
    list items in the lists.  I was thinking I could use one list to maintain the Keywords and perform updates or timer job to any targeted lists. 
    Scenario.  Anytime a power user of the sharepoint list wants to update any of the choice field items or possibly even the column name itself, they want to be able to make updates to any of the list
    items or other
    lists that contain the new name.  The columns I'm using are all choice fields named Assigned To, Division, Region, Job Title, Department, and Zone.
    Here's sample code for Updating list:
     using     (SPSite oSPsite = new SPSite("team url/"))   
     using     (SPWeb oSPWeb = oSPsite.OpenWeb())         
     oSPWeb.AllowUnsafeUpdates =   true;          
     // get the List                
     SPList list = oSPWeb.Lists["Keywords"];        
     //Add a new item in the List                
     SPListItem itemToAdd = list.Items.Add();               
     itemToAdd["Title"] = "My Title Field";               
     itemToAdd["Assigned To"] = "Assigned To";               
     itemToAdd.Update();          
     // Get the Item ID               
     listItemId = itemToAdd.ID;          
     // Update the List item by ID                
     SPListItem itemToUpdate = list.GetItemById(listItemId);               
     itemToUpdate["Assigned To"] = "Assigned To Updated";               
     itemToUpdate.Update();          
     // Delete List item                
     SPListItem itemToDelete = list.GetItemById(listItemId);               
     itemToDelete.Delete();                   
     oSPWeb.AllowUnsafeUpdates =   false;         
    Any help is greatly appreciated.  Please provide code sample and references.  Thanks!

    Thanks Ramakrishna -- Here's what I have so far.
    namespace MonitorChanges
            class MyTimerJob : SPJobDefinition
                public MyTimerJob()
                    : base()
                public MyTimerJob(string sJobName, SPService service, SPServer server, SPJobLockType targetType)
                    : base(sJobName, service, server, targetType)
                public MyTimerJob(string sJobName, SPWebApplication webApplication)
                    : base(sJobName, webApplication, null, SPJobLockType.ContentDatabase)
                    this.Title = "My Custom Timer Job";
                public override void Execute(Guid contentDbId)
                    // Get the current site collection's content database           
                    SPWebApplication webApplication = this.Parent as SPWebApplication;
                    SPContentDatabase contentDb = webApplication.ContentDatabases[contentDbId];
                    // Get a reference to the "ListTimerJob" list in the RootWeb of the first site collection in the content database           
                    SPList Listjob = contentDb.Sites[0].RootWeb.Lists["ListTimerJob"];
                    // Add a new list Item           
                    SPListItem newList = Listjob.Items.Add();
                    newList["Title"] = DateTime.Now.ToString();
                    newList.Update();
    Talibah C

  • Error in Abap code - Unknown column name

    Hi
    I have this error in my code.
    Unknown column name "SUM(EKBE-MENGE)" field list. field list. field
    My code
    *Select sum(ekbe-menge)
           into MCSTRUCT-ZQuant
          from ekbe*
    How do I resolve this.
    thanks

    Hi,
    Try the following statement:
    Select sum( menge )
    into MCSTRUCT-ZQuant
    from ekbe.
    hope it helps...
    regards,
    Raju

  • Unknown Column Name "XYZ" not detemined untill runtime.Select query.

    Hi,
    I have written a query in ABAP.I am getting following error.Can some one help me resolve this.There is a column "LANDX" in standard table T005 of PI which i need to get values from. The problem is that the column is visible only at runtime and not otherwise.How can i fetch data from this coulmn writing a select query for this.
    Query written is:
    SELECT landx from T005 into table it_t005.
    Error:
    "Unknown column name "XYZ" not determined untill runtime,you cannot specify a field list."

    Hi Deepika u were right. that there is a landx field but it is included in that table.
    so u cant exactly get it.
    now u can get ur country name and iso code just like this.
    tables: t005t  , t005.
    data: BEGIN OF it OCCURS 100,
            landx like t005t-landx,
            intca like t005-intca,
            END OF it.
    SELECT t005t~landx t005~intca   into CORRESPONDING FIELDS OF TABLE it
      from T005t
      INNER JOIN t005 on ( t005t~land1 = t005~land1 ).
    it is fulfilling ur need.
    Edited by: Matt on Feb 3, 2009 7:49 AM - Please don't use txtspk

  • Problem with a field list.

    Hi people,
    When I check the code of my program the system tell me that:
    Unknown column name "TITLE_MEDI". not determined until runtime, you cannot specify a field list.          
    but the thing is that the table TSAD3 have this field and I dont know what the system tell me this.      
    Thanks for the help.

    Hi Please Check the field is Activated or Not in the Database.
    But in our Table We can see only TITLE field. ,may be that is the reason.
    check it once.
    please paste your code where it shows error.
    regards
    vijay

  • How do I modify the Title Column of a Task List using JSLink

    I would like to modify the title column of a Task List in SharePoint 2013. I would like to make the title column different colors based on a selection in another field. For some reason I can run the TitleRendering function
     on a different filed and it works perfectly, but when I try to run it on the Title field it is completely ignored. Is there some kind of work around for this?
    var taskSample = taskSample || {};
    taskSample.CustomizeFieldRendering = function () {
    RegisterSod('hierarchytaskslist.js', '/_layouts/15/hierarchytaskslist.js');
    LoadSodByKey('hierarchytaskslist.js', null);
    // Intialize the variables for overrides objects
    var overrideCtx = {
    Templates: {
    Fields: {
    "Title": {
    'View' : taskSample.TitleRendering
    // Register the override of the field
    SPClientTemplates.TemplateManager.RegisterTemplateOverrides(overrideCtx);
    taskSample.TitleRendering = function (ctx) {
    var output = [];
    switch(ctx.CurrentItem.Unit) {
    case "Unit 1":
    output.push('<span style="color: blue;">');
    output.push(ctx.CurrentItem.Title);
    output.push('</span>');
    break;
    case "Unit 2":
    output.push('<span style="color: green;">');
    output.push(ctx.CurrentItem.Title);
    output.push('</span>');
    break;
    case "Unit 3":
    output.push('<span style="color: red;">');
    output.push(ctx.CurrentItem.Title);
    output.push('</span>');
    break;
    case "Unit 4":
    output.push('<span style="color: yellow;">');
    output.push(ctx.CurrentItem.Title);
    output.push('</span>');
    break;
    case "Unit 5":
    output.push('<span style="color: orange;">');
    output.push(ctx.CurrentItem.Title);
    output.push('</span>');
    break;
    case "Unit 6":
    output.push('<span style="color: pink;">');
    output.push(ctx.CurrentItem.Title);
    output.push('</span>');
    break;
    default:
    output.push(ctx.CurrentItem.Title);
    break;
    return output.join('');
    taskSample.CustomizeFieldRendering();

    Hi,
    Per my understanding, the TitleRendering function is not been applied to the Title column of the Task list.
    I suggest you replace the “Title” with “LinkTitle” in your .js file:
    var overrideCtx = {
    Templates: {
    Fields: {
    "LinkTitle": {
    'View' : taskSample.TitleRendering
    In IE Developer Tools, we can see that the “name” attribute of the Title column is “LinkTitle”:
    Best regards
    Patrick Liang
    TechNet Community Support

  • When creating a "lookup" column be able to display not only one column from the other list, but additional columns

    With the lookup technique, it is possible to select an item from another list and display one column of this item
    It is obviously possible to create several lookup columns on the same list and therefore display several columns
    There’s a high risk of not selecting the same item and therefore have inconsistent columns
    The Requirement therefore consist of being able of displaying several columns of the same item from the other list, based on one unique selection
    Example:
    In list(x), define lookup column on list (y), column Title (possible today)
    Then define a “secondary” lookup column on same list, column Code
    The effect would be that when selecting an item from list (X), both Title and Code would show up consistently in 2 different columns of list (Y)
    All possible solutions are welcomed

    If you are using SharePoint 2010, you can retrieve additional columns when adding a Lookup. If you are using 2007, there is no direct OOTB way, but the following two posts provide potential work-arounds:
    https://www.definitivelogic.com/blog/microsoft-sharepoint-2007-pulling-column-data-one-list-another-based-common-list-field
    http://stefan-stanev-sharepoint-blog.blogspot.com/2010/11/sharepoint-2007-associated-lookup.html
    Dimitri Ayrapetov (MCSE: SharePoint)

  • Report data binding error unknown column name

    Hi,
    I am having a problem with the new 7.02 update of Report
    Builder. The issue is it's not finding my SQL query.
    I have wrote my query initally in the advance mode, and it
    doesn't seem to reconize it. Is there an issue with this?
    I did manage to fix one of my reports by using the basic mode
    and selecting all my tables and seting my linkage and criteria.
    I have other computers that i have not updated to 7.02 and
    they do not have this issue. Below is the error:
    Error Occurred While Processing Request
    Report data binding error Unknown column name : work_phone.
    Please try the following:
    Check the ColdFusion documentation to verify that you are
    using the correct syntax.
    Search the Knowledge Base to find a solution to your problem.
    Browser Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0;
    .NET CLR 1.1.4322; .NET CLR 2.0.50727)
    Remote Address 127.0.0.1
    Referrer
    Date/Time 13-Jul-06 02:33 PM
    Stack Trace (click to expand)
    coldfusion.runtime.report.Report$ReportDataBindingException:
    Report data binding error Unknown column name : work_phone.
    at
    coldfusion.runtime.report.Report.runReport(Report.java:420)
    at
    coldfusion.filter.ComponentFilter.invoke(ComponentFilter.java:96)
    at
    coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:225)
    at
    coldfusion.filter.BrowserDebugFilter.invoke(BrowserDebugFilter.java:52)
    at coldfusion.filter.PathFilter.invoke(PathFilter.java:86)
    at
    coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:69)
    at
    coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:2 8)
    at
    coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38)
    at
    coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38)
    at
    coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22)
    at coldfusion.xml.rpc.CFCServlet.invoke(CFCServlet.java:106)
    at coldfusion.xml.rpc.CFCServlet.doGet(CFCServlet.java:157)
    at
    javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
    at
    org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327)
    at
    javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at
    coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:78)
    at
    jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:91)
    at
    jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
    at
    jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:257)
    at
    jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:527)
    at
    jrun.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.java:204)
    at
    jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPool.java:349)
    at
    jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:457)
    at
    jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool.java:295)
    at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)
    This report works in 7.01. So all query variables match with
    a variable in the SQL select statement.
    Anyone have any Ideas??
    Thanks,
    Daniel

    Thank you very much for help.
    The "Unknown column name " is a field still used in my
    report, so I can't remove it.
    After I clear the query in the report and reopen the report
    and apply the same query back to it, I get different error message:
    Element TASKNUM is undefined in QUERY.
    The error occurred in : line 1
    -1 : Unable to display error's location in a CFML template.
    I know for sure this "Element TASKNUM is undefined in QUERY."
    is defined in query. each time it complains something different. I
    get really confused.
    Thanks again.
    Yueming

  • Powerpivot pivottable - I can't add or drag a "value field" from the pivottable field list into the "values" section.

    I built a pivottable using Powerpivot.
    Initially, I can add or drag any data field I want to columns, Rows or the Values area inside the field list (those 4 squares). However, as times goes by...suddenly... I just no longer can add or drag a "value field" from the pivottable field list into the
    "values" section. 
    Does anybody know how to fix this problem ?

    Hi Bin Long,
    I tried what you suggested.
    I believe that there is a glitch in the Powerpivot field list (where you find the 4 squares for columns, rows, values, filter)
    When I initially create a pivottable with powerpivot, everything works fine when I am adding field list items to the the columns, rows, values sections, filters.
    However.....IF I close the powerpivot field list or if I save and close the excel file...then I cannot add more items to the "values" section.
    I can comment about one thing that seems different in my powerpivot field list. When I can no longer add items to the "values" section, I realized that in the TOP section of the field list I see in bold letters a summary of the items that are SUM ∑ in the "values"
    section.
    Does anybody know how to fix this ?
    Thanks.

  • How to make the  column red in field catalog if its value is negetive

    i am displaying 25 columns in a field catalog ,
    if the value of the cell is negative it should appear in red colour .
    for ex,
    mat.no      custno      value
    1                10             10
    <b>2                20             -10</b>
    3                 30             20
    note:
    only cell which is the intersection of second row and third column
    should appear red .
    not the whole row or column

    Hi Balaji,
    Run this code for coloring specific coloum in a row when the value of that column is negative
    REPORT zex34 .
    TYPE-POOLS: slis.
    INCLUDE <icon>.
    DATA: it_fieldcat  TYPE slis_t_fieldcat_alv,
          it_fieldcat1  TYPE slis_t_fieldcat_alv..
    DATA:  x_fieldcat  TYPE slis_fieldcat_alv,
            x_fieldcat1  TYPE slis_fieldcat_alv.
    DATA: it_events TYPE slis_t_event,
          x_events TYPE slis_alv_event,
          i_program LIKE sy-repid.
    x_events-name = 'END_OF_LIST'.
    x_events-form = 'LIST_MODIFY_OUPUT'.
    APPEND x_events TO it_events.
    data : count type i,
           calc1 type i value 1,
           calc2 type i value 1,
           TOTREC TYPE I.
    DATA: BEGIN OF it_mara OCCURS 0,
          matnr LIKE mara-matnr,
          kunnr LIKE mara-kunnr,
          value type i,
          flag(1),
         END OF it_mara.
    SELECT matnr
           kunnr
           UP TO 10 ROWS
          INTO corresponding fields of TABLE it_mara
          FROM mara.
    loop at it_mara.
         count = sy-tabix mod 2.
       if count eq 0.
         it_mara-value = calc1.
            calc1 = calc1 + 6.
         it_mara-flag = ' '.
       else.
           calc2 = calc2 - 5.
         it_mara-value = calc2.
         it_mara-flag = 'X'.
       endif.
       modify it_mara index sy-tabix.
       TOTREC = TOTREC + 1.
    ENDLOOP.
    i_program = sy-repid.
    DATA:l_pos TYPE i VALUE 1.
    CLEAR: l_pos.
    l_pos = l_pos + 1.
    x_fieldcat-seltext_m = 'MATNR'.
    x_fieldcat-fieldname = 'MATNR'.
    x_fieldcat-tabname = 'IT_MARA'.
    x_fieldcat-col_pos    = l_pos.
    x_fieldcat-outputlen = '18'.
    APPEND x_fieldcat TO it_fieldcat.
    CLEAR x_fieldcat.
    l_pos = l_pos + 1.
    x_fieldcat-seltext_m = 'KUNNR'.
    x_fieldcat-fieldname = 'KUNNR'.
    x_fieldcat-tabname = 'IT_MARA'.
    x_fieldcat-col_pos    = l_pos.
    x_fieldcat-outputlen = '10'.
    APPEND x_fieldcat TO it_fieldcat.
    CLEAR x_fieldcat.
    l_pos = l_pos + 1.
    x_fieldcat-seltext_m = 'VALUE'.
    x_fieldcat-fieldname = 'VALUE'.
    x_fieldcat-tabname = 'IT_MARA'.
    x_fieldcat-col_pos    = l_pos.
    x_fieldcat-outputlen = '10'.
    APPEND x_fieldcat TO it_fieldcat.
    CLEAR x_fieldcat.
    l_pos = l_pos + 1.
    x_fieldcat-seltext_m = 'FLAG'.
    x_fieldcat-fieldname = 'FLAG'.
    x_fieldcat-tabname = 'IT_MARA'.
    x_fieldcat-col_pos    = l_pos.
    x_fieldcat-outputlen = '1'.
    APPEND x_fieldcat TO it_fieldcat.
    CLEAR x_fieldcat.
    l_pos = l_pos + 1.
    CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
         EXPORTING
              i_callback_program = i_program
              it_fieldcat        = it_fieldcat
              it_events          = it_events
         TABLES
              t_outtab           = it_mara
         EXCEPTIONS
              program_error      = 1
              OTHERS             = 2.
    IF sy-subrc <> 0.
      MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
              WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    *&      Form  LIST_MODIFY_OUPUT
          text
    FORM list_modify_ouput.
      DATA: l_matnr LIKE mara-matnr,
            l_kunnr LIKE mara-kunnr,
            l_value type i,
            l_index TYPE sy-index.
      CLEAR it_mara.
      DO 20 TIMES.
        CLEAR: l_matnr, l_kunnr , l_value.
        READ LINE sy-index INDEX sy-lsind
             FIELD VALUE it_mara-matnr INTO l_matnr
                         it_mara-kunnr INTO l_kunnr
                         it_mara-value into l_value.
    *3lines are reserved for alv headings , so i am reading it form 4th
    *line so 4th line is equal to 1st line of itab
        IF sy-subrc = 0 AND sy-index GE 4.
          l_index = sy-index - 3.
          READ TABLE it_mara INDEX l_index.
          IF sy-subrc = 0 AND it_mara-flag = 'X'.
    *-Modifying current list
            MODIFY LINE sy-index INDEX sy-lsind
                       FIELD FORMAT it_mara-VALUE COLOR 6 INVERSE.
          ENDIF.
        ENDIF.
      ENDDO.
    ENDFORM.

  • Lookup Up Column allows Title but no Managed Columns held in Lookup List

    Hi
    I am building a number of lookup lists to help with the way content is stored in a list..
    Now, if you create a straight lookup list say with text columns.  Then you can select  Title (key) and additional fields in the  dependant list settings, when creating a lookup column that points at the lookup list.  
    Now, if I want to added managed metadata columns to the lookup list then I am unable to select these as additional columns in my dependant list - not the end of the world but I am bound to be asked for them by my users.
    Ok I guess this a restriction due to the nature of the way terms  are stored e.g  "#id term name" . However, I wonder if there is a workaround - I thought of giving on of these a try unless the advice was to the contrary :
    A custom DVWP  to replace the the List
    Custom fields that mirror the value selected for terms
    Connected web Part 
    Cheers
    Daniel
    Freelance consultant

    Hi Daniel, yes, that's a pain when you can't access certain types of columns using a lookup. There are other ways of doing what you want, but I found the best way to accomplish it is to either use a workflow to copy the information into a text column or
    use InfoPath.
    cameron rautmann

  • Refer to a column in a secondary list in a customized DispForm.aspx page

    I would like to know if there is an XMl statement that will allow me to pull a column from a separate list.
    I have two lists; List1 has just one item in it that holds the default values for all the columns, including Enhanced Rich Text columns.
    List2 has the exact same columns, but only certain columns will contain data if that content needs to be customized from the defualt values.
    I need a way so that when i check the column in List2, if it is empty, pull the corressponding column from List1 so it displays the default value.
    Is there an XML/XSL statement that can do this and will actually render the Enhanced Rich Text properly?
    My sample code below works great, but we cannnot leverage hidden fields as the default values can be updated anytime.
    This is code that I have in the DispForm.aspx page
          <td width="400px" valign="top" class="ms-formbody">
          <xsl:choose>
           <xsl:when test="string-length(@First) &lt; 1">
                                 <xsl:value-of select="@first_x002d_hid" disable-output-escaping="yes"/>
           </xsl:when>
           <xsl:otherwise>
            <xsl:value-of select="@first " disable-output-escaping="yes"/>
           </xsl:otherwise>
          </xsl:choose>

    The default values in List1 can change at any time.  When the user opens an item from List2, it needs to show the custom values in the columns of List2, then show the current values in List1 for any of the columns they did not populate in List2, at
    the time they view the item.
    I dont think the calculated columns would work as it would save the values that existed in List1 at the time they saved the item in List2, right?
    Also, when the users are updating List2, they want to see a form that only shows the custom data they entered in the columns,  all the others should be blank.  We get this with the OOB EditForm.aspx for List2, so we do nt need to update NewFrom.aspx
    or EditForm.aspx, only DispForm.aspx.
    The only time they want to see the aggregation of the List2 data and the List1 data is in the DispForm.aspx page.

  • Unknown state or association field with @Transformation

    I have a class that uses a Transformation mapping for the IP address field. The IP address is the string dot notation in the class, but is a long integer in the database. My entity class looks like this:
    @Entity
    @Table(name="LOCATION_MAP")
    public class LocationMap implements Serializable {
    bq.      @Transformation \\          @ReadTransformer(IPAttributeTransformer.class) \\          @WriteTransformer(IPAttributeTransformer.class) \\          @Column(name="IP_ADDR") \\          protected String ipAddr; \\          ...
    IPAttributeTransformer is a class that implements both org.eclipse.persistence.mappings.transformers.AttributeTransfomer and org.eclipse.persistence.mappings.transformers.FieldTransformer.
    When I attempt to execute the query, "select location.ipAddr from LocationMap location", it gives me the error Error compiling the query [(select location.ipAddr from LocationMap location|http://select location.ipAddr from LocationMap location]), line 1, column 16: unknown state or association field (ipAddr) of class (com.example.LocationMap).
    If I comment out the @Transformation, @ReadTransformer, and @WriteTransformer annotations, then I don't get the error, but of course I also don't get the transformed IP address.
    This mapping worked with TopLink 10g and the XML descriptor file, but I am trying to migrate to 11g and JPA with annotations.
    Josh Davis
    Edited by: user603300 on Mar 12, 2009 12:22 PM, forum software tried to turn square brackets into URL's.

    Hello Ryan,
    The example I have does the following:
    @ReadTransformer(method="buildNormalHours")
    @WriteTransformers({
    @WriteTransformer(method="getStartTime", column=@Column(name="START_TIME")),
    @WriteTransformer(method="getEndTime", column=@Column(name="END_TIME"))
    @Property(name="attributeName", value="normalHours")
    protected Time[] getNormalHours() {
    return normalHours;
    where buildNormalHours looks like:
    /** IMPORTANT: This method builds the value but does not set it.
    * The mapping will set it using method or direct access as defined in the descriptor.
    public Time[] buildNormalHours(Record row, Session session) {
    Time[] hours = new Time[2];
    /** This conversion allows for the database type not to match, i.e. may be a Timestamp or String. */
    hours[0] = (Time) session.getDatasourcePlatform().convertObject(row.get("START_TIME"), java.sql.Time.class);
    hours[1] = (Time) session.getDatasourcePlatform().convertObject(row.get("END_TIME"), java.sql.Time.class);
    return hours;
    Another uses a transformer class for the read:
    @ReadTransformer(transformerClass=org.eclipse.persistence.testing.models.jpa.advanced.AdvancedReadTransformer.class)
    which extends the org.eclipse.persistence.mappings.transformers.AttributeTransformer class and implements a buildAttributeValue method.
    Hope this helps,
    Chris

  • Unknown state or association field

    Hi,
    I have a table "client" that has many "request", both have an id attribute that´s the primary key. I need to query the request of a type that belong to a certain type of client. In the Request entity I have the following named query:
    @NamedQuery(name="Request.findByTypeAndClient", query="Select r from Request where r.type = :type and r.client.clientType= :clientType")
    The app server starts fine, but when I try just get to the index page I get the following error:
    javax.faces.el.EvaluationException: javax.faces.FacesException: javax.faces.FacesException: Can't instantiate class: 'com.app.web.backing.Index'.. class com.app.web.backing.Index : javax.ejb.EJBException:
    Exception Description: Unknown state or association field [clientType] of class [com.app.entity.Request].; nested exception is: Exception [TOPLINK-8030] (Oracle TopLink Essentials - 2006.8 (Build 060829)): oracle.toplink.essentials.exceptions.EJBQLException
    Exception Description: Unknown state or association field [clientType] of class [com.app.entity.Request].
         at com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:190)
    Caused by: javax.ejb.EJBException: Exception Description: Unknown state or association field [clientType] of class [com.app.entity.Request].; nested exception is: Exception [TOPLINK-8030] (Oracle TopLink Essentials - 2006.8 (Build 060829)): oracle.toplink.essentials.exceptions.EJBQLException
    Exception Description: *Unknown state or association field [clientType] of class [com.app.entity.Request].*
    I've made sure I don't even use that query at the index page.
    Why does it happen and how could I fix it?
    I'm using jdev 10.1.3
    Thanks in advance

    That could be a hint...
    The Client entity has a list of Requests, and the Request entity keeps a reference to the Client it belongs to. Since what I'm trying to list are the requests, and not the clients, I was expecting I could use the Client reference in the Request entity to make the query. Isn't it possible?

Maybe you are looking for