Create field list as a string in Query of Query

Can you please correct this query
<cfquery name="getView" datasource="#Application.DSN_GDX#">
select * from vstr_entity_mast_y where tax_year=2011
</cfquery>
<cfset checkedImgStr = "<img src=../stir_images/checked.jpg>">
<cfset loopStr = "">
<cfset variables.listIds = "BNSR,BNSS,VIEW">
<cfloop index="Fld" list="#variables.listIds#">
<cfset loopStr = loopStr&'<img src=../stir_images/checked.jpg>'& " as [#Fld#],">
</cfloop>
<cfset P_loopStr = replace(loopStr, "<img src=../stir_images/checked.jpg>", "'<img src=../stir_images/checked.jpg>'", "all")>
<cfquery name="getPrivByUser" dbtype="query">
select entity_id, entity_name,#P_loopStr# leid
from getView
</cfquery>
I am getting this error:
Encountered "<. Incorrect Select Statement, Expecting a 'FROM', but encountered '<' instead, A select statement should have a 'FROM' construct.

In  view of the comma at the end of loopStr, I will assume that leid is a column name. Then the likely cause of the error is ColdFusion escaping the single quotes you added. To prevent this, modify the select statement to
select entity_id, entity_name,#preserveSingleQuotes(P_loopStr)# leid

Similar Messages

  • Event Receiver to create a List based on a custom template and on lookup field

    Hi
    I would like to have an Event Receiver who is firing by addItem in a list calls Seminarliste and is creating each time a new list based on three columns for add.Lists("Title of the list", "Description of the list", "Custom List
    Template")
    I have a Problem to get the LookupField Title and I am getting a Problem to create a list.
    If I debug the code the bold line creates an exception ;(
    The following code I have produced:
            public override void ItemAdding(SPItemEventProperties properties)
                base.ItemAdding(properties);
                SPWeb spCurrentSite = properties.OpenWeb();
                SPSite siteCollection = new SPSite("http://win-ue32d37ap2n");
                SPWeb web = siteCollection.OpenWeb();
                SPListCollection lists = web.Lists;
                String curListName = properties.ListTitle;
                if(curListName == "Seminarliste")
                    SPListItem curItem = properties.ListItem;
                    String curItemListName = properties.AfterProperties["Title"].ToString();
                    String curItemDescription = properties.AfterProperties["Beschreibung"].ToString();
                    // Lookup field with Option to Chose a template name
                    String curItemTemplate = properties.AfterProperties["Template"].ToString();
                    SPListTemplateCollection listTemplates = siteCollection.GetCustomListTemplates(web);
                    //Error by following line ...
    SPListTemplate myTemplate = listTemplates[curItemTemplate];
                    web.Lists.Add(curItemListName, curItemDescription, myTemplate);
    If somebody had a similar problem in the past and could advice it would be most appreciated ;-)
    Thanks in advance ;-)
    Kind regards Michael Damaschke

    If I understand correctly, the field you use to select the template name is a lookup field? If so, then the problem is the lookup field value is not the name of the template. It is an SPFieldLookupValue, which contains the ID and the string of the lookup.
    So you want to separate the template name, like this:
    if (item["LookupField"] !=
    null)
         string fieldValue = item["LookupField"].ToString();
         SPFieldLookupValue value =
    new SPFieldLookupValue(fieldValue);
         int lookupListItemID = value.LookupId;
         string lookupListValue = value.LookupValue;
    IF you look at the fieldValue above, you will see it is something like an integer, followed by delimiter ;# and then your template name. you can always just parse the string at the ;# as well if you were so inclined.

  • Creating a task field list in c# project

    Hi All,
    I am writing a small application to simply my monthly forecasting and reporting.  I'm extracting data from my msProject file into a c# application with a local database.  I want the user to be able to select which task data fields to extract into
    the database at run time.  To achieve this I'm trying to extract from msProject a list of all used fields.
    Following advice from some forum posts I've been able to create a list of fields, based on looping through each Table and taking the TableField names.  The field names are stored as strings.  Enterprise field are string representations of integers.
    I now want to be able to get the data for each task for the fields selected by the user.
    I'm having trouble using "FieldNameToFieldConstant" to GetField value.  I can use it perfectly well in a VBA macro but can find how to use the function in a C# application.  I found a post where someone reporting using...
    task.GetField(msProject.Application.FieldNameToFieldConstant(fieldName,...)
    I can't get to work for me though, when I try msProject.Application. my only available choices are "Equals" and "ReferenceEquals".
    So to sum up, how do I us "FieldNameToFieldConstant" in a c# application or if someone has a better way to create a list of fields that would be great.
    Thanks in advance

    OK, so I worked it out, answer provided below for anyone else who is interested.
    The answer to my first questions is that FieldNameToFieldConstant is access via an instance of  msProject.Application, in my code below MSP.Application app = new MSP.Application();
    My Code now searches through every table, and for every field in each table creates a custom object which contains the field name and ID number, each new custom field is tested against the contents of the List<clsFieldList> and if its unique its added
    to the list.  At the end of the process I have a list of all unique fields from all tables in the project file. 
    Hope this is helpful to someone.
    Cheers
    using MSP = Microsoft.Office.Interop.MSProject; public static List<clsFieldList> FieldsFromTables()
    //TODO: move this method to a new thread.
    //this method searches through each table in the project
    //gathers a collection of all unique fields in the tables
    //calling method must ensure that MSProject is open with an project file loaded.
    List<clsFieldList> fldNames = new List<clsFieldList>(); ;
    MSP.Application app = new MSP.Application();
    MSP.Project proj = app.ActiveProject;
    MSP.Tables taskTables = proj.TaskTables;
    int progress = 0;
    int i = 0;
    //loop through each table
    foreach (MSP.Table tskTable in taskTables)
    //loop through each field in each table
    foreach (MSP.TableField tskTableField in tskTable.TableFields)
    //prepare to create a new clsFieldList object
    string title = GetFieldName(tskTableField);
    long fldID = (long)tskTableField.Field;
    string fldType = tskTable.GetType().ToString();
    //create the new object and check if it exists already in the List
    clsFieldList newField = new clsFieldList(MSP.PjFieldType.pjTask, fldID, title, fldType);
    if (!fldNames.Contains(newField))
    //TODO: convert the DataType to string, long etc
    fldNames.Add(newField);
    //fldNames now contains a list of clsFieldList which represent the fields used in every table in the active project.
    return fldNames;
    private static string GetFieldName(MSP.TableField tblFld)
    //This method is a C# conversion of a VBA example I found on the internet. I'd give credit where its due here but I printed out the code and now can't find it again.
    MSP.Application app = new MSP.Application();
    //find the field name (actually column heading) for a field in a data table
    long lngFieldID;
    string strResult = "";
    lngFieldID = (long)tblFld.Field;
    //if the Field Title is not null then set that as the field name.
    if (tblFld.Title != null)
    strResult = tblFld.Title.Trim();
    if(strResult.Length == 0)
    //if strResult is still zero length then the field title must have been null, check if its a custom field
    try
    //try to get the custome field name - this will come back blank if its not a custom field
    strResult = app.CustomFieldGetName((MSP.PjCustomField)lngFieldID).Trim();
    catch { }
    finally
    strResult = app.FieldConstantToFieldName((MSP.PjField)lngFieldID).Trim(); //use the field name
    return strResult;

  • How can I create a list from the e-mail addresses "To:" field of an e-mail?

    Is there a way to automatically create a mailing list from a list of people who have received an e-mail? I know how to create a list manually, but there are a lot of e-mail addresses, so this would be an incredibly tedious process.
    Thanks!

    https://getsatisfaction.com/mozilla_messaging/topics/how_to_create_a_mailing_list_from_a_list_of_email_recipients
    Install the add-on and right-click any recipient in the To: field in the Header Pane.

  • How create HTML-list with hierarchical query?

    Hello all!
    I have table HIE (name,id,par) with hierarchical structure (par=id)
    As sample:
    select name
    FROM hie
    CONNECT BY PRIOR id=par
    START WITH par=0
    Root
    Branch 1
    Lief 11
    Lief 12
    Bracnh 2
    I need to create html-list from this table.
    How can I select from that table the structured output with TAGs "UL" "LI":
    <ul><li>root
    <ul>
    <li>branch 1
    <ul>
    <li>lief11</li>
    <li>lief12</li>
    </ul>
    </li></ul>
    <ul>
    <li>branch 2</li></ul>
    </li></ul>
    Sql-Guru, please, help!
    Message was edited by:
    natalia.demidchick
    Message was edited by:
    natalia.demidchick
    Message was edited by:
    natalia.demidchick
    Message was edited by:
    natalia.demidchick
    Message was edited by:
    natalia.demidchick

    Yes there was a mistake
    Try this. It should be good
    Processing ...
    CREATE TABLE TAB_A AS (
         SELECT 'ROOT' AS NAME,1 AS ID,NULL AS PARENT FROM DUAL
         UNION ALL
         SELECT 'BRANCH1' AS NAME,2 AS ID,1 AS PARENT FROM DUAL
         UNION ALL
         SELECT 'BRANCH2' AS NAME,3 AS ID,2 AS PARENT FROM DUAL
         UNION ALL
         SELECT 'LIEF1' AS NAME,4 AS ID,2 AS PARENT FROM DUAL
         UNION ALL
         SELECT 'LIEF2' AS NAME,5 AS ID,2 AS PARENT FROM DUAL
         UNION ALL
         SELECT 'BRANCH3' AS NAME,6 AS ID,1 AS PARENT FROM DUAL
         UNION ALL
         SELECT 'LIEF3' AS NAME,7 AS ID,2 AS PARENT FROM DUAL
         UNION ALL
         SELECT 'BRANCH5' AS NAME,8 AS ID,1 AS PARENT FROM DUAL
         UNION ALL
         SELECT 'LIEF4' AS NAME,9 AS ID,8 AS PARENT FROM DUAL
         UNION ALL
         SELECT 'LIEF5' AS NAME,10 AS ID,3 AS PARENT FROM DUAL
         UNION ALL
         SELECT 'LIEF6' AS NAME,11 AS ID,3 AS PARENT FROM DUAL
    Processing ...
    SELECT *
    FROM TAB_A
    Query finished, retrieving results...
       NAME                      ID                                   PARENT                
    ROOT                                            1                                       
    BRANCH1                                         2                                      1
    BRANCH2                                         3                                      2
    LIEF1                                           4                                      2
    LIEF2                                           5                                      2
    BRANCH3                                         6                                      1
    LIEF3                                           7                                      2
    BRANCH5                                         8                                      1
    LIEF4                                           9                                      8
    LIEF5                                          10                                      3
    LIEF6                                          11                                      3
    11 row(s) retrieved
    Processing ...
    CREATE GLOBAL TEMPORARY TABLE TEMP_TAB AS (
         SELECT LEVEL AS LV,ROWNUM AS RN,A.*
         FROM TAB_A A
         WHERE (1=0)
         START WITH PARENT IS NULL
         CONNECT BY PRIOR ID = PARENT
    Processing ...
    INSERT INTO TEMP_TAB
         SELECT LEVEL AS LV,ROWNUM AS RN,A.*
         FROM TAB_A A
         START WITH PARENT IS NULL
         CONNECT BY PRIOR ID = PARENT
    11 row(s) inserted
    Processing ...
    SELECT *
    FROM TEMP_TAB
    Query finished, retrieving results...
                      LV                                     RN                      NAME                      ID                                   PARENT                
                                         1                                      1 ROOT                                            1                                       
                                         2                                      2 BRANCH1                                         2                                      1
                                         3                                      3 BRANCH2                                         3                                      2
                                         4                                      4 LIEF5                                          10                                      3
                                         4                                      5 LIEF6                                          11                                      3
                                         3                                      6 LIEF1                                           4                                      2
                                         3                                      7 LIEF2                                           5                                      2
                                         3                                      8 LIEF3                                           7                                      2
                                         2                                      9 BRANCH3                                         6                                      1
                                         2                                     10 BRANCH5                                         8                                      1
                                         3                                     11 LIEF4                                           9                                      8
    11 row(s) retrieved
    Processing ...
    SELECT --LV,RN,1+(NVL(LAG(LV) OVER ( ORDER BY RN ASC),0)-LV+1) step,
         --lead(LV) OVER ( ORDER BY RN ASC NULLS LAST) next_lev,
         decode (lv-1,nvl(LAG(LV) OVER ( ORDER BY RN ASC),0),'<UL>','')||
         '<LI>'||NAME||'</LI>'||
         replace(
         RPAD(chr(10),1+(lv-NVL(lead(LV) OVER ( ORDER BY RN ASC),0))*5,'</UL>'),
         chr(10),
         ) AS HTML
    FROM TEMP_TAB A
    ORDER BY RN ASC
    Query finished, retrieving results...
                                          HTML                                      
    <UL><LI>ROOT</LI>                                                               
    <UL><LI>BRANCH1</LI>                                                            
    <UL><LI>BRANCH2</LI>                                                            
    <UL><LI>LIEF5</LI>                                                              
    <LI>LIEF6</LI></UL>                                                             
    <LI>LIEF1</LI>                                                                  
    <LI>LIEF2</LI>                                                                  
    <LI>LIEF3</LI></UL>                                                             
    <LI>BRANCH3</LI>                                                                
    <LI>BRANCH5</LI>                                                                
    <UL><LI>LIEF4</LI></UL></UL></UL>                                               
    11 row(s) retrieved
    Processing ...
    DROP TABLE TAB_A PURGE
    Processing ...
    DROP TABLE TEMP_TAB
    SELECT LV,RN,1+(NVL(LAG(LV) OVER ( ORDER BY RN ASC),0)-LV+1) step,
         lead(LV) OVER ( ORDER BY RN ASC NULLS LAST) next_lev,
         decode (lv-1,nvl(LAG(LV) OVER ( ORDER BY RN ASC),0),'<UL>','')||
         '<LI>'||NAME||'</LI>'||
         replace(
         RPAD(chr(10),1+(lv-NVL(lead(LV) OVER ( ORDER BY RN ASC),0))*5,'</UL>'),
         chr(10),
         ) AS HTML
    FROM TEMP_TAB A
    ORDER BY RN ASC
    /Bye Alessandro

  • Using a created list in a SQL IN query

    I've solved this before but can't remember how, know it's going to be a simple one
    I've created a list from a CFLOOP, let's say it's MYLIST="us,ca,au,fr"
    I need to run a SQL CFQUERY on this list, WHERE xyz IN (MYLIST)
    The problem is that it won't read it correctly. Can anybody tell me the right command to make the sql read the list correctly on an individual item basis
    Thanks
    Mark

    Ahhh. I remember using that before now that you mention it
    Once again, thanks Dan
    Mark

  • 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.

  • Create Custom List, store information and display the information on web part

    Hi,
    Working on a Custom visual web part in sharepoint 2010. Scenario is i would like to have two button on that web part, one is "I read it " button for users to tag the page and another one is "find the list of people who already tag/read that
    page". i have added a visual web part into my project and two buttons event within it. Now goal is once user click on "I read it button" it will create custom list to store urls and usersname. When click on "Find the list of people"
    get the username only for that specific page whoever read/tag it.
    1. How can i create the custom list to store all users information
    2. Retrieve the information from Custom List and Display the list of people based on specific page url who ever read/tag that page. 
    Any help will be greatly appreciated!

    Appreciated for your help!
    List has four columns Title, Hyperlink, Created by, and created. i just wanted to display Users and hyperlink column. i tried to retrieve the items from list but query is not returning any items and displaying. As you said in CAML query we can pass the page
    url to get the collection of user for that particular page. but is not something will be hard coded value, if we pass the page url into CAML query? is there something we can dynamically retrieve the users based on page url.  for example, if users visits
    30 different page url, i need to put all those urls into CAML Query. do i need to create custom user field or i can use Created by field to get the users? please correct me if i am wrong. Below is the code:
    using System;
    using System.Web.UI;
    using System.Web.UI.WebControls;
    using System.Web.UI.WebControls.WebParts;
    using Microsoft.SharePoint;
    using Microsoft.SharePoint.WebControls;
    using System.Data;
    namespace CustomUserControl.VisualWebPart1
        public partial class VisualWebPart1UserControl : UserControl
            protected void Page_Load(object sender, EventArgs e)
            protected void btnRead_Click(object sender, EventArgs e)
                using (SPSite site = new SPSite(SPContext.Current.Web.Site.ID))
                    using (SPWeb web = site.OpenWeb())
                        web.AllowUnsafeUpdates = true;
                        SPList list = web.Lists["UserInformation"];
                        SPListItem newItem = list.Items.Add();
                        SPFieldUrlValue hyper = new SPFieldUrlValue();
                        //hyper.Description = "Google";
                        hyper.Url = System.Web.HttpContext.Current.Request.Url.AbsoluteUri.ToString();
                        newItem["Hyperlink"] = hyper;
                        newItem.Update();
                        web.AllowUnsafeUpdates = false;
            protected void btnDisplay_Click(object sender, EventArgs e)
                SPWeb web = SPContext.Current.Web;
                SPList list = web.Lists["UserInformation"];
                SPQuery query = new SPQuery ();           
                query.Query = "<Where><Eq><FieldRef Name='Hyperlink' Type='URL' /><Value>http://nyc01d1sptmp01:8080/diligent/wiki/cft/Pages/home.aspx</Value></Eq></Where>";
                DataGrid grdList = new DataGrid();
                SPListItemCollection items = list.GetItems(query);
                DataTable table;
                table = new DataTable();
                table.Columns.Add("Title", typeof(string));
                table.Columns.Add("Hyperlink", typeof(string));
           table.Columns.Add("Created by", typeof(string));
                DataRow row;
                foreach (SPListItem result in items)
                    row = table.Rows.Add();
                    row["Title"] = result.Title;
                    row["Hyperlink"] = result.Name;
           SPFieldUser userField = (SPFieldUser)result.Fields.GetField("Users");
                    SPFieldUserValue userFieldValue = (SPFieldUserValue)userField.GetFieldValue(result["Users"].ToString());
                    SPUser user = userFieldValue.User;
                    string name = user.LoginName;
           row["Created by"] = name;
                grdList.DataSource = table.DefaultView;
                grdList.DataBind();

  • Need checkboxes in PDF that create a list of those items later in the same PDF

    I asked this in Indesign, but they said to ask again here.
    Hi Folks,
    I create PDF travel guides in indesing and turn them into PDF.  I also have Acrobat. 
    For each location in the travel guide I would like to have a checkbox available on the page, next to the title, that a reader could check if they decide they want to visit that location/activity.  Then, those title results would populate a list in the same PDF eBook, in something like a notes section in the end of the document, so that the user has an easy list to view of what they decided to visit.  They should be able to uncheck them later so that they can create new lists. 
    Is this possible in a PDF?
    Thanks for your help.

    Sure it's possible. The easiest way to set this up would be to set the text you want associated with each check box as the export value of the check box, and set up a multiline text field in the notes section with a custom calculation script. It might look something like this:
    // Custom Calculate script for text field
    var i, v, s = "";
    // Loop through the check boxes and get text if they're selected
    for (i = 1; i < 11; i += 1) {
        // Get the value of the current check box
        v = getField("checkbox" + i).value;
        // Add current checkbox value to summary string, separating each with a carriage return
        if (v !== "Off") {
            s += v + "\r";
    // Set this field's value
    event.value = s;
    This script assumes the check boxes are named checkbox1, checkbox2, ...checkbox10, so you'd have to modify to match your form. The field's calculate script will get triggered whenever any field value changes, so it will get updated each time a check box is selected or deselected.

  • How-to create dependent list boxes in a table -Frank Sample

    hi everyone i would like to ask a suggestion about Frank's example on How-to create dependent list boxes in a table -Frank Sample ...
    i want to extend this example for 3 dependent lists... including locations, departaments and employes....
    this the ListboxBean java that Frank is using in his example.... and this is only for locations and departaments tables and it works ok... i want to add the third list for employers wich is dependent only from departaments list.... as i am not good in java i would like to ask u a suggestion on how to develop the third list in this java class ...
    public class ListboxBean {
    private SelectItem[] locationsSelectItems = null;
    private SelectItem[] departmentsSelectItems = null;
    public SelectItem[] getLocationsSelectItems() {
    if (locationsSelectItems == null){
    FacesContext fctx = FacesContext.getCurrentInstance();
    ValueBinding vbinding = fctx.getApplication().createValueBinding("#{bindings.LocationsView1Iterator}");
    DCIteratorBinding locationsIterBinding = (DCIteratorBinding) vbinding.getValue(fctx);
    locationsIterBinding.executeQuery();
    Row[] locRowsArray = locationsIterBinding.getAllRowsInRange();
    // define select items
    locationsSelectItems = new SelectItem[locRowsArray.length];
    for (int indx = 0; indx < locRowsArray.length; indx++) {
    SelectItem addItem = new SelectItem();
    addItem.setLabel((String)locRowsArray[indx].getAttribute("City"));
    addItem.setValue(locRowsArray[indx].getAttribute("LocationId"));
    locationsSelectItems[indx] = addItem;
    return locationsSelectItems;
    return locationsSelectItems;
    public SelectItem[] getDepartmentsSelectItems() {
    FacesContext fctx = FacesContext.getCurrentInstance();
    ValueBinding vbinding = fctx.getApplication().createValueBinding("#{row}");
    JUCtrlValueBindingRef rwJUCtrlValueBinding = (JUCtrlValueBindingRef) vbinding.getValue(fctx);
    Row rw = rwJUCtrlValueBinding.getRow();
    if (rw.getAttribute(6) != null){
    OperationBinding oBinding = (OperationBinding) fctx.getApplication().createValueBinding("#{bindings.ExecuteWithParams}").getValue(fctx);
    oBinding.getParamsMap().put("locId",rw.getAttribute(6).toString());
    oBinding.execute();
    ValueBinding vbinding2 = fctx.getApplication().createValueBinding("#{bindings.DepartmentsView2Iterator}");
    DCIteratorBinding departmentsIterBinding = (DCIteratorBinding) vbinding2.getValue(fctx);
    departmentsIterBinding.executeQuery();
    Row[] depRowsArray = departmentsIterBinding.getAllRowsInRange();
    // define select items
    departmentsSelectItems = new SelectItem[depRowsArray.length];
    for (int indx = 0; indx < depRowsArray.length; indx++) {
    SelectItem addItem = new SelectItem();
    addItem.setLabel((String)depRowsArray[indx].getAttribute("DepartmentName"));
    addItem.setValue(depRowsArray[indx].getAttribute("DepartmentId"));
    departmentsSelectItems[indx] = addItem;
    return departmentsSelectItems;
    public void setLocationsSelectItems(SelectItem[] locationsSelectItems) {
    this.locationsSelectItems = locationsSelectItems;
    public void setDepartmentsSelectItems(SelectItem[] departmentsSelectItems) {
    this.departmentsSelectItems = departmentsSelectItems;
    Thanks in advance :0

    Hi,
    I think that all you need to do is to look at how I implemented the dependent detail for querying the Employees select items
    Then you make sure the DepartmentsVO and the EmployeesVO have bind variable to query them according to the pre-selected value in their respective master list
    Frank

  • Create dynamic list (DHTML list) with parent child

    Hi,
    I am new to APEX.
    I have manually created DHTML list using lists in APEX. I want to create it dynamically using tables.
    I tried but not worked for me.
    i choose DHTML list because i want it in (+) sign when click on it all sub list entries should be displayed
    and also wanted to create something like when user click on one particular sub entry it should be saved in database
    with other fields of table.
    Was just wondering if any one came across this sort of query or design.
    Thanks in Advance
    Regards,
    Digisha

    >>
    plz help me to make this page work with ajax
    >>
    the form page you mean, right ? well, even if I could provide
    a solution
    (ajax respectively the CS3 spry stuff is rather new to me right
    now), this wouldn´t make sense to the form page anyway,
    because, after performing an insert/update/delete transaction, ADDT
    will always redirect to another page
    (your list probably) you specified when setting up the form.
    ADDT lists and forms are by default separated, and there is
    no mechanism provided to have both functionalities available on the
    same page -- it´s that what you meant ?

  • Need help populating dynamically-created fields

    I have a form which uses Javascript to create table rows on
    the fly so as to add items to a list dynamically. The table
    consists of two fields -- an ID and let's call the other one
    Attribute A. The user clicks "Add another one" and another row of
    data entry fields pops up. My action page works fine to get the
    value of these rows using the evaluate() function (I always
    wondered what that did), but I want it to go back to the calling
    page, have the calling page create the correct number of rows, and
    populate them with the changed or inserted data that was just saved
    -- the same way that an ordinary action page might save data and
    then return you to the calling page.
    The first row of this table is created through HTML and only
    additional rows are created dynamically.
    I have it all working up to and including the creation of the
    correct number of fields as an "onload=(loadTheData)" in the
    <body> tag, but how the heck and where do I populate them
    with the data returned from the query?
    Below is the Javascript and how it's called. I changed some
    variable names to protect the innocent, but that's basically how it
    works. So the Javascript is creating the fields -- one for each
    record returned by the query -- but how can I assign the record
    values in turn? Do I need WDDX? If so, how would that be
    written?

    If you are going to use JavaScript to dynamically create the
    list, then
    look into the <cfwddx...> tag that is very useful for
    translating
    ColdFusion data structures into JavaScript data structures.
    You can
    then use the JavaScript data to populate your table.
    But I would think it would be simplier to use the ColdFusion
    data to
    build the default table with existing data. Instead of just
    creating
    one row with ColdFusion create rows for the existing data
    then just use
    the JavaScript to add more rows on the client, just as you
    are doing now.
    P.S. evaluate() is usually an awkward choice to access
    dynamical form
    variables. I presume you are using something like
    <cfset something = evaluate("form.aField_#aVar#")>
    This can be easier with the use of array notation.
    <cfset something = form['aField_' & aVar]>
    OR
    <cfset something = form['aField_#aVar#']>
    To each his own, but knowing array notation is a very
    powerful technique.

  • Creating recipient list

    Hi,
    I am going through the link https://wiki.sdn.sap.com/wiki/display/PLM/2.RecipientManagement - Recipient Management . I couldn't able to understand how to create recipient list.
    Does I need to do anything in the customization for this ?
    I opened a Doc. info record in CV02N ... Environment document distribution- recipient list - create. Recipient list field came-- I didn't get
    Choose a recipient type, for example, Office user.
    The initial screen for your chosen recipient type appears and you can create/maintain the appropriate master record.
    Can you help in this.
    Regards,
    Sai Krishna

    Hi Sai,
    You need to create a receipient list first. For this go to receipient list create and give some name example: sai
    Then in second screen give the description and receipient name and type as below:
    COV     Post (print document list)
    INT     E-mail (originals as attachment)
    LET     Mail (document references as attachment)
    ORI     Mail (copy originals to server)
    PLO     Plot
    RMA     Business Workplace mail (originals as attachment)
    RML     Business Workplace mail (document references as attachment)
    Then save this list and use for disrtibution.
    I hooe this will resolve the query.
    Regards,
    Ravindra

  • Create New List Item

    I am getting an error each time I try to run this code and get the error message "There was a problem submitting your answers. Please try again later."I have looked at this for so long now I am not sure if I am missing something or what. I have referenced SPServices and jquery and it is working correctlyI am trying to make a crossword using some code I found online and I followed it andstill get this error. // Create an object to associate each SharePoint column with the class name used for the input and the user's response for that column
    var responses = {
    "oneAcross": {
    "selector": "one-across",
    "column": "OneAcross",
    "answer": ""
    "oneDown": {
    "selector": "one-down",
    "column": "OneDown",
    "answer": ""
    "twoDown": {
    "selector": "two-down",
    "column": "TwoDown",
    "answer": ""
    "threeDown": {
    "selector": "three-down",
    "column": "ThreeDown",
    "answer": ""
    "fourAcross": {
    "selector": "four-across",
    "column": "FourAcross",
    "answer": ""
    // Create the batchCmd variable that will be used to create the new list item
    var batchCmd = '<Batch OnError="Continue"><Method ID="1" Cmd="New">';
    // Concatenate values of each response input by iterating over the object representing the responses
    $.each( responses, function() {
    // Cache the current item in the responses object.
    var $response = this;
    // For each input in the crossword associated with the current response object, get the values and save them in the answer property.
    $( '.' + $response.selector ).each( function() {
    $response.answer += $( this ).val().toLowerCase();
    // Add the response to the batchCmd
    batchCmd += '<Field Name="' + $response.column + '"><![CDATA[' + $response.answer + ']]></Field>';//Create a new list item on the destination list using the batchCmd variable
    $().SPServices({
    operation: "UpdateListItems",
    async: true,
    webURL: "http://operations.home.blah.com/sites/EIS/SEEIS/SSC/Lists/",
    listName: "Crossword",
    updates: batchCmd,
    completefunc: function( xData, Status ) {
    // If the AJAX call could not be completed, alert the user or include your own code to handle errors.
    if ( Status !== "success" ) {
    alert( "There was a problem submitting your answers. Please try again later." );
    else {
    // If there was an error creating the list item, alert the user or include your own code to handle errors.
    if ( $( xData.responseXML ).find( 'ErrorCode' ).text() !== "0x00000000" ) {
    alert( "There was a problem submitting your answers. Please try again later." );
    // if the list item was successfully created, alert the user and navigate to the Source parameter in the URL (or to a URL of your choosing).
    else {
    alert( "Your answers were submitted successfully! Click OK to continue." );
    if ( window.location.href.indexOf( "Source=" ) !== -1 ) {
    var url = window.location.href.split( "Source=" )[1].split( "&" )[0];
    window.location.href = url;
    else {
    window.location.href = "/";

    When I look at the demo on the page it fires the same response as that is part of the error handling because it is a standalone HTML and not on a sharepoint server so I am wondering if something I am missing on the submit.click function or batchcmd. 
    I included the entire code for it to see if maybe you can see something I am not.  My crossword is on a Sharepoint Server
    $( '#crossword-submit' ).click( function( event ) {
    // If you decide to use a hyperlink instead of a button input, this will prevent
    //the hyperlink from actually navigating away from the page or to an anchor.
    event.preventDefault();
    // Disable the button so the user can't click it again and submit the answers more than once.
    $( this ).prop( 'disabled', true );
    // Prevent submission if the crossword isn't completed.
    if ( $( '#crossword' ).find( 'input' ).filter( function() { return $( this ).val() === ""; }).length !== 0 ) {
    alert( "You have left some answers blank. Please complete all answers before submitting." );
    $( this ).removeProp( 'disabled' );
    return false;
    // Confirm that the user wants to submit their answers.
    var confirmResponse = confirm( "Are you sure you are ready to submit your answers? Once submitted they cannot be changed.\n\nClick OK to continue or Cancel to review your answers." );
    if ( confirmResponse === false ) {
    $( this ).removeProp( 'disabled' );
    return false;
    // Create an object to associate each SharePoint column with the class name used for the input and the user's response for that column
    var responses = {
    "oneAcross": {
    "selector": "one-across",
    "column": "OneAcross",
    "answer": ""
    "oneDown": {
    "selector": "one-down",
    "column": "OneDown",
    "answer": ""
    "twoDown": {
    "selector": "two-down",
    "column": "TwoDown",
    "answer": ""
    "threeDown": {
    "selector": "three-down",
    "column": "ThreeDown",
    "answer": ""
    "fiveDown": {
    "selector": "five-down",
    "column": "FiveDown",
    "answer": ""
    "sixDown": {
    "selector": "six-down",
    "column": "SixDown",
    "answer": ""
    "sevenDown": {
    "selector": "seven-down",
    "column": "SevenDown",
    "answer": ""
    "eightDown": {
    "selector": "eight-down",
    "column": "EightDown",
    "answer": ""
    "fourAcross": {
    "selector": "four-across",
    "column": "FourAcross",
    "answer": ""
    "nineAcross": {
    "selector": "nine-across",
    "column": "NineAcross",
    "answer": ""
    "tenAcross": {
    "selector": "ten-across",
    "column": "TenAcross",
    "answer": ""
    "elevenAcross": {
    "selector": "eleven-across",
    "column": "ElevenAcross",
    "answer": ""
    "twelveAcross": {
    "selector": "twelve-across",
    "column": "TwelveAcross",
    "answer": ""
    // Create the batchCmd variable that will be used to create the new list item
    var batchCmd = '<Batch OnError="Continue"><Method ID="1" Cmd="New">';
    // Concatenate values of each response input by iterating over the object representing the responses
    $.each( responses, function() {
    // Cache the current item in the responses object.
    var $response = this;
    // For each input in the crossword associated with the current response object
    //, get the values and save them in the answer property.
    $( '.' + $response.selector ).each( function() {
    $response.answer += $( this ).val().toLowerCase();
    // Add the response to the batchCmd
    batchCmd += '<Field Name="' + $response.column + '"><![CDATA[' + $response.answer + ']]></Field>';
    // Close the batchCmd variable
    batchCmd += '</Method></Batch>';
    // Create a new list item on the destination list using the batchCmd variable
    $().SPServices({
    operation: "UpdateListItems",
    async: true,
    webURL: "http://operations.homestead.abc.com/sites/EIS/SEEIS/SSC/Lists/",
    listName: "Crossword",
    updates: batchCmd,
    completefunc: function( xData, Status ) {
    // If the AJAX call could not be completed, alert the user or include your own code to handle errors.
    if ( Status !== "success" ) {
    alert( "There was a problem submitting your answers. Please try again later." );
    else {
    // If there was an error creating the list item, alert the user or include your own code to handle errors.
    if ( $( xData.responseXML ).find( 'ErrorCode' ).text() !== "0x00000000" ) {
    alert( "There was a problem submitting your answers. Please try again later." );
    // if the list item was successfully created, alert the user and navigate
    //to the Source parameter in the URL (or to a URL of your choosing).
    else {
    alert( "Your answers were submitted successfully! Click OK to continue." );
    if ( window.location.href.indexOf( "Source=" ) !== -1 ) {
    var url = window.location.href.split( "Source=" )[1].split( "&" )[0];
    window.location.href = url;
    else {
    window.location.href = "/";
    </script>

  • How to create a list of value using date?

    We need to create a list on a report. The list consists of date. I have tried several times, but no luck.

    Hi Charles,
    I guess you have a user-parameter in your report and you need to define the LoV for the user parameter, so that the user can select from the LoV. In such a case you get REP-0782 if the datatype of column does not match the LoV of the parameter. Eg, if you have a query like
    select * from employees where hire_date < :p_hire_date
    And you want to build an LoV for hire_date, do the following:
    1. Go to your user parameter > Property Inspector > Datatype > select "Date". If you select Character or Number, you will get REP-0782.
    2. Now double click List of Values, choose "Select Statement" and type something like
    select distinct hire_date from employees order by hire_date asc
    If you don't want to use a Select Statement to build the LoV, you can write a static list of values, and even in this case Step 2 above should avoid the error REP-0782.
    Navneet.

Maybe you are looking for

  • WBS element in work order

    I would like to restrict users to choose WBS elements in work order (in settlement rule and Addit.data - WBS element) depending on WBS type (project type - PRPS - PRART) - does anybody know how to solve it using authorization objects?

  • How can I reset my iCloud password when It's hacked?

    Someone hacked my iCloud. I tried to get the password back but i forgot one of my security questions. I thought "I'll just make a new iCloud and sign out of the old one". Well, I put the "Find my ipod" app on it and I can't sign out with out the pass

  • Nokia Maps / Ovi Maps Installer

    Hi All, I heard that we were now able to get maps and navigatoin for free, is this correct? I have a n95 and when I go to use the navigation feature in Nokia Maps (just updated it), it says that navigation is a premium service and that I have to pay

  • Error data pump import: Worker unexpected fatal error in KUPW$WORKER.MAIN

    Hello. I try to import dump impdp DIRECTORY=data_pump_dir DUMPFILE=04-2013.dmp TRANSFORM=OID:n LOGFILE=04-2013.dmp.log (user - system (tried with sys) , (also with parallel=1 (or 2, or 8))and have following error: Import: Release 11.2.0.1.0 - Product

  • Which table are miscellaneous receipts housed in?

    I am trying to write a SQL for all miscellaneous receipts in our database. Does anyone know the table name of where miscellaneous receipts are housed? Thanks-