How to enhance Dynamic Query Object TerrSearch (Territory Management)?

Hello Friends,
In the TerrSearch dynamic query object, There are 2 fields Territory_ID and Level_ID. Now i have a requirement to Enhance the Search object using the new field called TERRITORY PATH ID. using which we can search all the entities not only for the terrritory level which we have selected (for example we have assigned the value '01' to LEVEL_ID) but also all the below territory levels of selected territory level.
If we enhance the search object structure CRMST_TMIL_SEARCH (structure of TerrSearch object) using AET to add the Z field called TERRITORY_PATH_ID then which is the suitable BADI where we can add the necessary code to select all the entities based on all the territory levels below the selected territory level.
Please guide me friends how to enhance the TerrSearch object.

Hi friend,
Try using MACRO and dynamic WHERE condition.
Group simialr Select statements under a Macro.
Build a dynamic where by checking conditions
Call macro passing dynamic where condition.
TABLES afpo.
DATA: str TYPE string.
*Macro definition
DEFINE operation.
  select single *
       from afpo into afpo
       where (&1).    " Dynamic condition
END-OF-DEFINITION.
*Build dynamic WHERE by checking some conditions
*If conditon 
CONCATENATE 'AUFNR = ''000000700008''' 'AND POSNR = ''0001''' INTO str SEPARATED BY space.
*Else
CONCATENATE 'AUFNR = ''000000700008''' 'AND POSNR = ''0002''' INTO str SEPARATED BY space.
*Endif.
*Call Macro passing dynamic WHERE condition
operation str.

Similar Messages

  • Enhancing a Dynamic Query Object

    Hi All,
    I've added a new field to the contract header using the EEWB, I then added the field to an append on the dynamic query object BTQSrvCon. The entry in CRMC_REPDY and the BADI implementation of BADI CRM_RF_SEARCH_EEW have been created automatically.
    This is working fine when I use the 'IS' separator on the search screen and enter the field exactly.
    I would like to use the dynamic query separators (contains, starts with etc.) but when I try I get the error message
    Search contains fields where wild card search is not allowed
    Has anyone implemented this functionality?
    Thanks,
    Gregor

    The range operator is in the generated code:
    method IF_EX_CRM_RF_SEARCH_EEW~EXTEND_RF_QUERY.
    INCLUDE crm_object_names_con.
    DATA: lv_fieldname       TYPE name_komp,
           ls_qupart          LIKE LINE  OF ct_quparts,
           ls_qupart_and      LIKE LINE  OF ct_quparts,
           ls_range_value     TYPE crmt_bsp_range.
    READ TABLE it_range_value INDEX 1
       INTO ls_range_value.
    IF sy-subrc <> 0.
       RETURN.
    ENDIF.
    CHECK NOT ls_range_value-low IS INITIAL.
    CALL METHOD cl_crm_report_qupart=>get_qupart_by_token
       EXPORTING
         iv_token  = 'AND'
       IMPORTING
         ev_qupart = ls_qupart_and-querypart.
    lv_fieldname = flt_val.
    CALL METHOD cl_crm_report_qupart=>get_qupart_by_token
       EXPORTING
         iv_entityname = gc_objectname_reporting-ORDERADM_H
         iv_fieldname  = lv_fieldname
         iv_token      = 'RAN'
         it_rangetab   = it_range_value
       IMPORTING
         ev_qupart     = ls_qupart-querypart.
    APPEND ls_qupart     TO ct_quparts.
    APPEND ls_qupart_and TO ct_quparts.
    endmethod.
    I've put a break in the code which is not being triggered so something may be up with the BADI implementation.

  • What is Dynamic query object ?

    Hi All,
    I want to know what is the exact purpose of a Dynamic Query object ?
    Why cant we use a simple Query object instead ?
    Regards,
    Ashish

    Hello experts,
    i modified the method EH_ONSEARCH in the class ZL_BT111S_O_SEARCH_IMPL. This is the opportunity search.
    We want to exclude the process type ZCRA. I realized this with following code snippet:
    CALL METHOD lr_qs->add_selection_param
          EXPORTING
            iv_attr_name = 'PROCESS_TYPE'
            iv_sign      = 'I'
            iv_option    = 'NE'
            iv_low       = 'ZCRA'.
    There is also a field in the search mask for selecting the process type. For example, i select the process type ZOPP in the mask. If i do this, i get ALL opportunites. I found the reason. The search query looks like this:
    PROCESS_TYPE      I      NE     ZCRA
    OR <--- this is the error
    PROCESS_TYPE     I       EQ      ZOPP
    How can i make an AND-conjunction? The dynamic search object BTQOPP has an parameter MATCH_TYPE but i dont know how to fill out this parameters?
    Best regards
    Sascha Federau

  • How to enable dynamic query in weblogic 7.0?

     

    Hi,
    The documentation explains how to enable dynamic queries and set a
    method-permission to control access. If you find the information at the
    following link insufficient, let me know.
    http://e-docs.bea.com/wls/docs70/ejb/cmp.html#1089703
    You enable dynamic queries in your weblogic-ejb-jar.xml file with the following:
    <enable-dynamic-queries>True</enable-dynamic-queries>
    You can set a method permission as follows:
    <security-role>
    <role-name>Admin</role-name>
    </security-role>
    <method-permission>
    <role-name> Admin </role-name>
    <method>
    <ejb-name> EmployeeEJB </ejb-name>
    <method-name> createQuery </method-name>
    </method>
    </method-permission>
    - Matt
    Sanjeev Chopra wrote:
    also posting to EJB newsgroup
    "CottonXu" <[email protected]> wrote in message
    news:[email protected]..
    How to enable dynamic query in weblogic 7.0? The documentation accompanieswith
    Bea doesn't explain it in detail. How to set <method-permission> inejb-jar.xml?
    Thanks in advance.

  • How to create dynamic connection in business view manager.

    Hi Sir,
    Can u explain how to create dynamic connection in business view manager.
    Thanks
    Vishali Raghava Raju

    HI Vaishali,
       Can you please elaborate your requirement ?
    -Regards
    B

  • How to use dynamic query for Result table

    Hello Experts,
    I want to use dynamic query and then display the result in the assignment block.
    Using dynamic query BTQAct and BTQRAct and base on some search criteria i want tofilter and then append the result in the result table of that custom context node, and then it should display the result in the view in UI.
    SO can you please provide me the samplle code on how to use the dynamic query and append in the result table.
    Regards.

    Hi,
    Please find below sample code:
    data:  query         TYPE REF TO cl_crm_bol_dquery_service,
               result        TYPE REF TO if_bol_bo_col.
    DATA: lt_params       TYPE crmt_name_value_pair_tab,        
               lwa_params      TYPE crmt_name_value_pair.             
    query = cl_crm_bol_dquery_service=>get_instance( 'BTQAct' ). " Get instance of dynamic query
    Set general query parameter for maximum number of hits
          lwa_params-name = 'MAX_HITS' .
          lwa_params-value = '50'.
          APPEND lwa_params TO lt_params.
          query->set_query_parameters( it_parameters = lt_params ).
          query->add_selection_param( iv_attr_name = 'OBJECT_ID'
                                                    iv_sign      = 'I'
                                                    iv_option    = 'EQ'
                                                    iv_low       = <lv_objectid>
                                                    iv_high      = '' ). " Set your search criteria. Repeat this code if you have multiple parameters
    "You can find possible search options for a query object in  GENIL_BOL_BROWSER
    result ?= query->get_query_result(  ).   " Get result from your search query
    me->typed_context-> <your result context node>->set_collection( result ). 
    Here you will have to create a context node in your view which would refer to query result object like for BTQAct its BTQRAct                      
    Hope this helps.
    e Regards,
    Bhushan

  • Enhancing dynamic query BTQSlsQuot

    I saw several dynamic query enhancements but none of them is what I need..
    What I need is, adding PARTNEREXTERNAL of Sold to Party to this query and result.
    Does anyone know how can I do this?

    The range operator is in the generated code:
    method IF_EX_CRM_RF_SEARCH_EEW~EXTEND_RF_QUERY.
    INCLUDE crm_object_names_con.
    DATA: lv_fieldname       TYPE name_komp,
           ls_qupart          LIKE LINE  OF ct_quparts,
           ls_qupart_and      LIKE LINE  OF ct_quparts,
           ls_range_value     TYPE crmt_bsp_range.
    READ TABLE it_range_value INDEX 1
       INTO ls_range_value.
    IF sy-subrc <> 0.
       RETURN.
    ENDIF.
    CHECK NOT ls_range_value-low IS INITIAL.
    CALL METHOD cl_crm_report_qupart=>get_qupart_by_token
       EXPORTING
         iv_token  = 'AND'
       IMPORTING
         ev_qupart = ls_qupart_and-querypart.
    lv_fieldname = flt_val.
    CALL METHOD cl_crm_report_qupart=>get_qupart_by_token
       EXPORTING
         iv_entityname = gc_objectname_reporting-ORDERADM_H
         iv_fieldname  = lv_fieldname
         iv_token      = 'RAN'
         it_rangetab   = it_range_value
       IMPORTING
         ev_qupart     = ls_qupart-querypart.
    APPEND ls_qupart     TO ct_quparts.
    APPEND ls_qupart_and TO ct_quparts.
    endmethod.
    I've put a break in the code which is not being triggered so something may be up with the BADI implementation.

  • How to create dynamic View Object and Dynamic Table

    Dear ll
    I want to create a dynamic view object and display the output in a dynamic table on the page.
    I am using Jdeveloper 12c "Studio Edition Version 12.1.2.0.0"
    This what I did:
    1- I created a read only view object with this query "Select sysdate from dual"
    2- I added this View object to the application module
    3- I created a new method that change the query of this View object at runtime
        public void changeVoQuery(String dbViewName) {
            String sqlstm = "Select * From " + dbViewName;
            ViewObject dynamicVo = this.findViewObject("DynamicVo");
            if (dynamicVo != null) {
                dynamicVo.remove();
            dynamicVo = this.createViewObjectFromQueryStmt("DynamicVo", sqlstm);
            dynamicVo.executeQuery();
    4- I run the application module for testing the method and I passed "Scott.Emp" as a parameter and the result was Success
    5- Now I want to show the result of the view on the page, so I draged and dropped the method from the data control as a parameter form
    6- I dragged and dropped the view Object "DynamicVo" as a table and I choose "generate Column Dynamically at runtime". This is the page source
    <af:panelHeader text="#{viewcontrollerBundle.SELECT_DOCUMTN_TYPE}" id="ph1">
            <af:panelFormLayout id="pfl1">
                <af:inputText value="#{bindings.dbViewName.inputValue}" label="#{bindings.dbViewName.hints.label}"
                              required="#{bindings.dbViewName.hints.mandatory}"
                              columns="#{bindings.dbViewName.hints.displayWidth}"
                              maximumLength="#{bindings.dbViewName.hints.precision}"
                              shortDesc="#{bindings.dbViewName.hints.tooltip}" id="it1">
                    <f:validator binding="#{bindings.dbViewName.validator}"/>
                </af:inputText>
                <af:button actionListener="#{bindings.changeVoQuery.execute}" text="changeVoQuery"
                           disabled="#{!bindings.changeVoQuery.enabled}" id="b1"/>
            </af:panelFormLayout>
        </af:panelHeader>
        <af:table value="#{bindings.DynamicVo.collectionModel}" var="row" rows="#{bindings.DynamicVo.rangeSize}"
                  emptyText="#{bindings.DynamicVo.viewable ? 'No data to display.' : 'Access Denied.'}"
                  rowBandingInterval="0" selectedRowKeys="#{bindings.DynamicVo.collectionModel.selectedRow}"
                  selectionListener="#{bindings.DynamicVo.collectionModel.makeCurrent}" rowSelection="single"
                  fetchSize="#{bindings.DynamicVo.rangeSize}" filterModel="#{bindings.DynamicVoQuery.queryDescriptor}"
                  queryListener="#{bindings.DynamicVoQuery.processQuery}" filterVisible="true" varStatus="vs" id="t1"
                  partialTriggers="::b1">
            <af:iterator id="i1" value="#{bindings.DynamicVo.attributesModel.attributes}" var="column">
                <af:column headerText="#{column.label}" sortProperty="#{column.name}" sortable="true" filterable="true"
                           id="c1">
                    <af:dynamicComponent id="d1" attributeModel="#{column}"
                                         value="#{row.bindings[column.name].inputValue}"/>
                </af:column>
            </af:iterator>
        </af:table>
    when I run the page this error is occured
    <Nov 13, 2013 2:51:58 PM AST> <Error> <oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter> <BEA-000000> <ADF_FACES-60096:Server Exception during PPR, #1
    javax.el.ELException: java.lang.NullPointerException
    Caused By: java.lang.NullPointerException
    Can any body help me please
    thanks

    Have you seen Shay's video https://blogs.oracle.com/shay/entry/adf_faces_dynamic_tags_-_for_a
    All you have to do is to use the dynamic table to get your result.
    Timo

  • How to use dynamic query for this ??

    hi , i am new to ABAP. i got a requirement to write  dynamic query for the following code.
    kindly address. two set of queries are same.but condition is different.
    .IF p_psd EQ ' '.
    *C--End of change DF 1232137- (Transport # :CIDK980530 )
    *C--FETCH THE Deliverd Quantiity and Material Number
        SELECT aufnr "ORDER number
               wemng "Quantity of goods received for the order item
               matnr "MATERIAL NUMBER
               pwerk "PLANT
               dauat "Order Type
               FROM afpo
               INTO TABLE t_afpo
               WHERE aufnr IN s_order
               AND   wemng IN s_dqt
               AND   matnr IN s_matnr
               AND   pwerk IN s_plant
               AND   dauat = c_ro.
        IF sy-subrc = 0.
          SORT t_afpo BY aufnr matnr pwerk.
    *C--FETCH THE OBJECT NUMBER
          SELECT aufnr "ORDER number
                 objnr "Object number
                 FROM aufk
                 INTO TABLE t_aufk
                 FOR ALL ENTRIES IN t_afpo
                 WHERE aufnr = t_afpo-aufnr.
          IF sy-subrc = 0.
            SORT t_aufk BY aufnr objnr.
    *C--FETCH THE Target Quantiity
            SELECT aufnr "ORDER number
                   gamng "Total order quantity target quantity
                   FROM afko
                   INTO TABLE t_afko
                   FOR ALL ENTRIES IN t_afpo
                   WHERE aufnr = t_afpo-aufnr
                   AND   gamng IN s_tqt.
            IF sy-subrc = 0.
              SORT t_afko BY aufnr .
            ENDIF.
          ENDIF.
        ELSE.
          MESSAGE text-e03 TYPE c_s. " No data for the selection criteria
          LEAVE LIST-PROCESSING.
        ENDIF.
    *C--Begin of change DF 1232137- (Transport # :CIDK980530 )
      ENDIF.
      IF p_psd EQ c_x.
        SELECT aufnr "ORDER number
               wemng "Quantity of goods received for the order item
               matnr "MATERIAL NUMBER
               pwerk "PLANT
               dauat "Order Type
               FROM afpo
               INTO TABLE t_afpo
               WHERE aufnr IN s_order
               AND   wemng > 0
               AND   matnr IN s_matnr
               AND   pwerk IN s_plant
               AND   dauat = c_ro.
    if sy-subrc = 0.
    *C--FETCH THE OBJECT NUMBER
        IF  NOT t_afpo[] IS INITIAL.
          SORT t_afpo BY aufnr matnr pwerk.
          SELECT aufnr "ORDER number
                 objnr "Object number
                 FROM aufk
                 INTO TABLE t_aufk
                 FOR ALL ENTRIES IN t_afpo
                 WHERE aufnr = t_afpo-aufnr.
          IF sy-subrc = 0.
            SORT t_afko BY aufnr gamng.
          ELSE.
            MESSAGE text-e03 TYPE c_s. " No data for the selection criteria
            LEAVE LIST-PROCESSING.
          ENDIF.
        ENDIF.
        IF NOT t_afpo[] IS INITIAL.
    *C--FETCH THE Target Quantiity
          SELECT aufnr "ORDER number
                 gamng "Total order quantity target quantity
                 FROM afko
                 INTO TABLE t_afko
                 FOR ALL ENTRIES IN t_afpo
                 WHERE aufnr = t_afpo-aufnr
                 AND   gamng <> t_afpo-wemng .
          IF sy-subrc = 0.
            SORT t_afko BY aufnr gamng.
          ELSE.
            MESSAGE text-e03 TYPE c_s. " No data for the selection criteria
            LEAVE LIST-PROCESSING.
          ENDIF.
        ENDIF.
      ELSE.
        MESSAGE text-e03 TYPE c_s. " No data for the selection criteria
        LEAVE LIST-PROCESSING.
      ENDIF.
    Edited by: Thomas Zloch on Jan 5, 2011 1:30 PM please use code tags

    Hi friend,
    Try using MACRO and dynamic WHERE condition.
    Group simialr Select statements under a Macro.
    Build a dynamic where by checking conditions
    Call macro passing dynamic where condition.
    TABLES afpo.
    DATA: str TYPE string.
    *Macro definition
    DEFINE operation.
      select single *
           from afpo into afpo
           where (&1).    " Dynamic condition
    END-OF-DEFINITION.
    *Build dynamic WHERE by checking some conditions
    *If conditon 
    CONCATENATE 'AUFNR = ''000000700008''' 'AND POSNR = ''0001''' INTO str SEPARATED BY space.
    *Else
    CONCATENATE 'AUFNR = ''000000700008''' 'AND POSNR = ''0002''' INTO str SEPARATED BY space.
    *Endif.
    *Call Macro passing dynamic WHERE condition
    operation str.

  • How to make dynamic query using DBMS_SQL variable column names

    First of all i will show a working example of what i intend to do with "EXECUTE IMMEDIATE":
    (EXECUTE IMMEDIATE has 32654 Bytes limit, which isn't enough for me so i'm exploring other methods such as DBMS_SQL)
    -------------------------------------------------CODE-----------------------------------
    create or replace PROCEDURE get_dinamic_query_content
    (query_sql IN VARCHAR2, --any valid sql query ('SELECT name, age FROM table') 
    list_fields IN VARCHAR2) --list of the columns name belonging to the query (  arr_list(1):='name';   arr_list(2):='age';
    -- FOR k IN 1..arr_list.count LOOP
    -- list_fields := list_fields || '||content.'||arr_list(k)||'||'||'''~cs~'''; )
    AS
    sql_stmt varchar (30000);
    BEGIN
                   sql_stmt :=
    'DECLARE
         counter NUMBER:=0;     
    auxcontent VARCHAR2(30000);     
         CURSOR content_cursor IS '|| query_sql ||';
         content content_cursor%rowtype;     
         Begin
              open content_cursor;
              loop
                   fetch content_cursor into content;
                   exit when content_cursor%notfound;
                   begin                              
                        auxcontent := auxcontent || '||list_fields||';                    
                   end;
                   counter:=counter+1;     
              end loop;
              close content_cursor;
              htp.prn(auxcontent);
         END;';
    EXECUTE IMMEDIATE sql_stmt;
    END;
    -------------------------------------------------CODE-----------------------------------
    I'm attepting to use DBMS_SQL to perform similar instructions.
    Is it possible?

    Hi Pedro
    You need to use DBMS_SQL here because you don't know how many columns your query is going to have before runtime. There are functions in DBMS_SQL to get information about the columns in your query - all this does is get the name.
    SQL&gt; CREATE OR REPLACE PROCEDURE get_query_cols(query_in IN VARCHAR2) AS
    2 cur PLS_INTEGER;
    3 numcols NUMBER;
    4 col_desc_table dbms_sql.desc_tab;
    5 BEGIN
    6 cur := dbms_sql.open_cursor;
    7 dbms_sql.parse(cur
    8 ,query_in
    9 ,dbms_sql.native);
    10 dbms_sql.describe_columns(cur
    11 ,numcols
    12 ,col_desc_table);
    13 FOR ix IN col_desc_table.FIRST .. col_desc_table.LAST LOOP
    14 dbms_output.put_line('Column ' || ix || ' is ' ||
    15 col_desc_table(ix).col_name);
    16 END LOOP;
    17 dbms_sql.close_cursor(cur);
    18 END;
    19 /
    Procedure created.
    SQL&gt; exec get_query_cols('SELECT * FROM DUAL');
    Column 1 is DUMMY
    PL/SQL procedure successfully completed.
    SQL&gt; exec get_query_cols('SELECT table_name, num_rows FROM user_tables');
    Column 1 is TABLE_NAME
    Column 2 is NUM_ROWS
    PL/SQL procedure successfully completed.
    SQL&gt; exec get_query_cols('SELECT column_name, data_type, low_value, high_value FROM user_tab_cols');
    Column 1 is COLUMN_NAME
    Column 2 is DATA_TYPE
    Column 3 is LOW_VALUE
    Column 4 is HIGH_VALUE
    PL/SQL procedure successfully completed.I've just written this as a procedure that prints out the column names using dbms_output - I guess you're going to do something different with the result - maybe returning a collection, which you'll then parse through in Apex and print the output on the screen - this is just to illustrate the use of dbms_sql.
    best regards
    Andrew
    UK

  • How to get dynamic query results from an array/structure

    I have an edit page that is set up to display phone number fields from the user stored in our database. The properties for the phone number fields are set by a structure of arrays. My problem is that when a user has more than 1 phone number in my database, my structures correctly show this on the form by displaying 2 phone numbers. The problem I am having is that when it shows multiple phone numebrs, it always shows the first result and just repeats it as opposed to dropping the 2nd or 3rd phone number in their respective fields.
    array and structure code below:
          <!--- Mobile --->
          <cfset mobile = StructNew()>
          <cfset mobile.dynamic = false>
          <cfset mobile.dynamicLabel = '+ Add'>
          <cfset mobile.fields = ArrayNew(1)>
    <cfif #checkuserv.recordcount# GT '0'>   
          <cfset mobile.fields[1] = StructNew()>
          <cfset mobile.fields[1].required = false>
          <cfset mobile.fields[1].label = 'Phone Number 1'>
          <cfset mobile.fields[1].displayIcon = false>
          <cfset mobile.fields[1].voice = true>
          <cfset mobile.fields[1].voiceChecked = true>
          <cfset mobile.fields[1].toolTip = "Please choose if you would like to receive a text or voice call on this number">
    </cfif>
    <cfif #checkuserv.recordcount# IS '2'>    
          <cfset mobile.fields[2] = StructNew()>
          <cfset mobile.fields[2].required = false>
          <cfset mobile.fields[2].label = 'Phone Number 2'>
          <cfset mobile.fields[2].displayIcon = false>
          <cfset mobile.fields[2].toolTip = "Please choose if you would like to receive a text or voice call on this number">
          <cfset mobile.fields[2].voice = true>
          <cfset mobile.fields[2].voiceChecked = true>
    </cfif>
    <cfif #checkuserv.recordcount# IS '3'>     
          <cfset mobile.fields[3] = StructNew()>
          <cfset mobile.fields[3].required = false>
          <cfset mobile.fields[3].label = 'Phone Number 3'>
          <cfset mobile.fields[3].displayIcon = false>
          <cfset mobile.fields[3].toolTip = "Please choose if you would like to receive a text or voice call on this number">
          <cfset mobile.fields[3].voice = true>
          <cfset mobile.fields[3].voiceChecked = true>
    </cfif>
    Here is the code for my fields that call the array info:
    <!--- Voice 1 --->      
            <cfloop index="i" from="1" to="#ArrayLen(mobile.fields)#">
                <cfif i EQ 1 OR NOT mobile.dynamic OR form.mobileDisplayed GTE i>
                    <cfparam name="form.areacode_#i#" default="">
                    <cfparam name="form.prefix_#i#" default="">
                    <cfparam name="form.suffix_#i#" default="">
                <div class="fieldBlock phoneBlock" id="phoneBlock#i#">
                    <label for="areacode_#i#">
                        <cfif mobile.fields[i].required><span>*</span></cfif>
                        <cfif mobile.fields[i].displayIcon><img src="/images/sm_phone.jpg" /></cfif>
                        #mobile.fields[i].label#:
                    </label>
                    <div class="inputBlock">
                        <input type="text" maxlength="3" onKeyUp="numTyped(this, 'prefix_#i#', 3, event)" name="areacode_#i#" id="areacode_#i#" class="areacode" value="#trim(left(checkuserv.sub_user_number, '3'))#" />
                        <input type="text" maxlength="3" onKeyUp="numTyped(this, 'suffix_#i#', 3, event)" name="prefix_#i#" id="prefix_#i#" class="prefix" value="#trim(mid(checkuserv.sub_user_number, "4", '3'))#" />
                        <input type="text" maxlength="4" name="suffix_#i#" id="suffix_#i#" class="suffix"  value="#trim(mid(checkuserv.sub_user_number, "7", '4'))#" />
                        <cfif StructKeyExists(mobile.fields[i], "voice") and mobile.fields[i].voice>
                            <div class="voice" id="voice#i#">
                                <input type="radio" value="0" name="voice_#i#"<cfif Not StructKeyExists(mobile.fields[i], "voiceChecked") or Not mobile.fields[i].voiceChecked> checked="checked"</cfif> />
                                <label>Text</label>
                                <input type="radio" value="1" name="voice_#i#"<cfif StructKeyExists(mobile.fields[i], "voiceChecked") and mobile.fields[i].voiceChecked> checked="checked"</cfif> />
                                <label>Voice</label>
                            </div>
                        </cfif>
                        <cfif StructKeyExists(mobile.fields[i], "toolTip") and mobile.fields[i].toolTip neq "">
                            <div class="toolTip" id="toolTip_#i#" title="#mobile.fields[i].toolTip#" onClick="alert('#mobile.fields[i].toolTip#')">?</div>
                        </cfif>
                    </div>
    <!--- This number was invalid or if geocoding failed, and they've picked a carrier to override, display the carrier override dropdown--->
                    <cfif ListFindNoCase(invalidMobileIndexList, i) or ( showMap and IsDefined("form.carrierOverride" & i) )>
                        <div id="carrierOverrideBox#i#" class="carrierOverrideBlock">
                            <label>Carrier:</label>
                            <div class="inputBlock">
                                <select name="carrierOverride#i#" id="carrierOverride#i#">
                                    <option value="-1">-- Pick your carrier --</option>
                                    <cfloop query="carriers">
                                        <!--- 1111 is voice, 0 is NONE, don't display  --->
                                        <cfif Not ListFindNoCase("0,1111", carriers.carrier_id)>
                                            <option value="#Trim(carriers.carrier_id)#"<cfif IsDefined("form.carrierOverride" & i) and form["carrierOverride" & i] eq Trim(carriers.carrier_id)> selected="selected"</cfif>>#Trim(carriers.carrier_title)#</option>
                                        </cfif>
                                    </cfloop>
                                </select>
                                <a href="http://www.inspironlogisticscontact.cfm?account_id=#account_id#&carrierOverride=1"
                                       title="Carrier help"
                                       onClick="window.open('http://www.inspironlogisticscontact.cfm?account_id=#account_id#&carrierOverride=1','#accou nt_id#','width=500,height=800,scrollbars=no,screenX=100,screenY=100,top=100,left=100,resiz able=1'); return false;"
                                      >?</a>
                            </div>
                        </div>
                    </cfif>
                    <cfif mobile.dynamic AND i EQ form.mobileDisplayed AND i LT ArrayLen(mobile.fields)>
                    <div class="dynamicAddBlock dynamicAddMobileBlock" id="dynamicAddmobile_#i#">
                          <a href="javascript: submitAddField('mobile')">#mobile.dynamicLabel#</a>
                    </div>
                    </cfif>
                </div>
                </cfif>
            </cfloop>
            <cfif mobile.dynamic>
                <input name="mobileDisplayed" id="mobileDisplayed" value="#form.mobileDisplayed#" type="hidden" />
            </cfif>
            <input name="carrierOverrideActive" id="carrierOverrideActive" value="<cfif carrierOverrideActive>1<cfelse>0</cfif>" type="hidden" />
    I have been stuck on this for days, finally turning to the forum today with a few different issues. I hate trying to work within the framwork of other peoples code.
    I use coldfusion 8

    I broke the chunk of code away from the page and am now getting teh phone numbers in the right spots, but I am still getting a coldfusion error.
    Element 2 is undefined in a Java object of type class coldfusion.runtime.Array.
    Here is my code...
    <cfset invalidMobileIndexList = "">
    <cfset showMap = false>
    <cfset carrierOverrideActive = false>
    <!--- Voice 1 --->       
            <cfloop index="i" from="1" to="#ArrayLen(mobile.fields)#">
    <!------>            <cfif i EQ 1 OR NOT mobile.dynamic OR form.mobileDisplayed GTE i>
                    <cfparam name="form.areacode_#i#" default="">
                    <cfparam name="form.prefix_#i#" default="">
                    <cfparam name="form.suffix_#i#" default="">
                <div class="fieldBlock phoneBlock" id="phoneBlock#i#">
                <label for="areacode_#i#">
                        <cfif mobile.fields[i].required><span>*</span></cfif>
                        <cfif mobile.fields[i].displayIcon><img src="/images/sm_phone.jpg" /></cfif>
                        #mobile.fields[i].label#:
                    </label>
                    <cfoutput query="checkuserv" ><div class="inputBlock">
                        <input type="text" maxlength="3" onKeyUp="numTyped(this, 'prefix_#i#', 3, event)" name="areacode_#i#" id="areacode_#i#" class="areacode" value="#trim(left(checkuserv.sub_user_number, '3'))#" />
                        <input type="text" maxlength="3" onKeyUp="numTyped(this, 'suffix_#i#', 3, event)" name="prefix_#i#" id="prefix_#i#" class="prefix" value="#trim(mid(checkuserv.sub_user_number, "4", '3'))#" />
                        <input type="text" maxlength="4" name="suffix_#i#" id="suffix_#i#" class="suffix"  value="#trim(mid(checkuserv.sub_user_number, "7", '4'))#" />
                        <cfif StructKeyExists(mobile.fields[i], "voice") and mobile.fields[i].voice>
                            <div class="voice" id="voice#i#">
                                <input type="radio" value="0" name="voice_#i#"<cfif Not StructKeyExists(mobile.fields[i], "voiceChecked") or Not mobile.fields[i].voiceChecked> checked="checked"</cfif> />
                                <label>Text</label>
                                <input type="radio" value="1" name="voice_#i#"<cfif StructKeyExists(mobile.fields[i], "voiceChecked") and mobile.fields[i].voiceChecked> checked="checked"</cfif> />
                                <label>Voice</label>
                        </cfif></div></cfoutput>
                        <cfif StructKeyExists(mobile.fields[i], "toolTip") and mobile.fields[i].toolTip neq "">
                            <div class="toolTip" id="toolTip_#i#" title="#mobile.fields[i].toolTip#" onClick="alert('#mobile.fields[i].toolTip#')">?</div>
                        </cfif>
                    </div>
                    <!--- This number was invalid or if geocoding failed, and they've picked a carrier to override, display the carrier override dropdown--->
                    <cfif ListFindNoCase(invalidMobileIndexList, i) or ( showMap and IsDefined("form.carrierOverride" & i) )>
                        <div id="carrierOverrideBox#i#" class="carrierOverrideBlock">
                            <label>Carrier:</label>
                            <div class="inputBlock">
                                <select name="carrierOverride#i#" id="carrierOverride#i#">
                                    <option value="-1">-- Pick your carrier --</option>
                                    <cfloop query="carriers">
                                        <!--- 1111 is voice, 0 is NONE, don't display  --->
                                        <cfif Not ListFindNoCase("0,1111", carriers.carrier_id)>
                                            <option value="#Trim(carriers.carrier_id)#"<cfif IsDefined("form.carrierOverride" & i) and form["carrierOverride" & i] eq Trim(carriers.carrier_id)> selected="selected"</cfif>>#Trim(carriers.carrier_title)#</option>
                                        </cfif>
                                    </cfloop>
                                </select>
                                <a href="http://www.inspironlogistics.com/wens/contact.cfm?account_id=#account_id#&carrierOverride= 1"
                                       title="Carrier help"
                                       onClick="window.open('http://www.inspironlogistics.com/wens/contact.cfm?account_id=#account_id#&carrierOverride= 1','#account_id#','width=500,height=800,scrollbars=no,screenX=100,screenY=100,top=100,left =100,resizable=1'); return false;"
                                      >?</a>
                            </div>
                        </div>
                    </cfif>
                    <cfif mobile.dynamic AND i EQ form.mobileDisplayed AND i LT ArrayLen(mobile.fields)>
                    <div class="dynamicAddBlock dynamicAddMobileBlock" id="dynamicAddmobile_#i#">
                          <a href="javascript: submitAddField('mobile')">#mobile.dynamicLabel#</a>
                    </div>
                    </cfif>
                </div>
                </cfif>
            <cfif mobile.dynamic>
                <input name="mobileDisplayed" id="mobileDisplayed" value="#form.mobileDisplayed#" type="hidden" />
            </cfif>
            <input name="carrierOverrideActive" id="carrierOverrideActive" value="<cfif carrierOverrideActive>1<cfelse>0</cfif>" type="hidden" /><!------>
           </cfloop>

  • How to build dynamic query strings in the query using DB adapter 'Pure SQL'

    Dear Forum,
    I am building an application which will access DB to fetch some result set. The query involves retrieving data from multiple tables(nearly 10 tables). So I have created a DB adapter using 'execute pure sql' option. With this query works fine, but my inputs parameters will vary. So I need to make my query dynamic to append the query strings at runtime depending on the inputs.
    For example I have 3 input variables - input1,input2 and input3 (in my request xsd) which are used in the pure sql query. Now if I get a 4th input parameter input4 in the request, I need to append this to query string as 'AND input4=[some value]' at runtime. Otherwise my query should have only 3 parameters. Please suggest how this can be achieved.
    Regards,
    Satya.

    This is a strange requirement, depending on the columns you have and what are optional in them, one way is to have separate operations and each opeartion will have different inputs and for each operation , a different DB Adapter is called. But this way, it results in more number of operations for the service as well as more number of references in the composite. Even if you pass the column inputs to the SQL procedure, it will result in a large number of if-else cases..
    Thanks,
    N

  • How do you dynamically find objects

    I'm creating sprites dynamically on a button event.  So for example there is a sprite with a name of "parent_X" where X is a sequential number starting at 1...  So in theory I may have parent_1, parent_2, parent_3, and so on depending on how many times you press this button.
    Each sprite has a textField child also with a dynamic name, like textChild_1, textChild_2, textChild_3 and so on.
    User can remove a parent and child from the stage... what I do is remove the sprite and then delete it ... so if the parent name is loaded into a string called "textParent" I do:
    var target:DisplayObject = getChildByName(textParent);
    removeChild(target);
    delete getChildByName(textParent);
    This seems to work.  Question 1: by deleting the parent are both objects destroyed?  What I mean is that if you simple removeChild(myChild) and later do addChild(myChild) the child is returned to the stage... so if delete the parent and later, I'm assuming the child and parent are gone for good unless they are re-established?  Is this correct thinking?
    Moving on, what I need to do is determine what parent(s) and child(s) are still accessible in code after some have been removed / deleted.
    Not sure if you understand what I mean, but at some point I need to know what "parent_X" and "child_X" items (objects?) exist? 
    I'm trying something like this:
    x = 1;
    var target:DisplayObject = new DisplayObject();
    while(x <= textAreas) {   // textAreas is the counter to assign next parent_X number it is an int
      var target:DisplayObject = getChildByName("parent_" + String(x));
      removeChild(target);
      x++;
    This fails, I think if a parent_X was removed (deleted) .. it seems to only remove the first target if more than one were previousy created and then destroyed.
    Am I going about this correctly?
    Thanks for any help.

    1.  target isn't destroyed with that code. it still exists and can be re-added to the display list at any time.  you should assign target to null when you want to ready target for gc.  when target is gc'd the child may or may not be gc'd depending on how it's created.  my guess is the child will not be gc'd.
    2.  use an array to store and track your existing parent objects.

  • The Picture of OLE object  in the report  can't be printed, and how to sovle dynamic OLE object based on path

    <p>Hi, everybody,</p><p>  I have a problem which the picture in the report can&#39;t be printed.</p><p>I want to display some pictures  in the reports and print them.So I insert the picture as OLE object, select the graph format and set graph location fomular with the path of the picture which is stored in the local machine. I run the system and generate the report,  the picture is displayed correctly in the report, but when i print the report using ie&#39;s tool, the picture is gone and replaced with a little red mark. </p><p>I want to use the new feature of dynamic graph location about  the  crystal report xi version, but I don&#39;t know where I should put the picture into on the web server and what the path is . Because my web server is installed in the another machine.</p><p>I check the view source of html report and  find that the system searches the picture under  the crystalreportviewer11 folder on the web server.</p>

    Need to give the web server access to the folder

  • How do I dynamically center objects?

    i have some thumbnails i'm loading in via xml, instead of
    loading them from left alignment, I was wondering if the more
    images I add, it would always keep them on a center x axis... take
    a look at what I have.

    1.  target isn't destroyed with that code. it still exists and can be re-added to the display list at any time.  you should assign target to null when you want to ready target for gc.  when target is gc'd the child may or may not be gc'd depending on how it's created.  my guess is the child will not be gc'd.
    2.  use an array to store and track your existing parent objects.

Maybe you are looking for

  • COMPLAINT: Nonexistent customer service for hacked iTunes account!

    Since I couldn't find a "Customer Service" forum, and there is no useful email address, support form or phone number to address this issue, I'm posting this here where I hope someone can actually help. My wife's iTunes account was compromised within

  • Burn Mavericks to DVD?

    I am on ML 10.8.4 for a while but am thinking of a back up and full reformat/reinstall I have just downloaded Mavericks to try this but haven't installed. Can I burn this file to a DVD so i have a hard copy? and am i right in thinking this is just 'o

  • Need help with an automating a "Message from webpage" click.

    Any help would be appreciated. I guess I would consider myself as a beginner with VB.NET. Basically - My program launches an internet explorer window. Points to a specific webpage that has records. Finds the "check all" and clicks it, then finds and

  • Easy Cost Planning: Calculation Row (Business Process) in Cost Model Derivation Rule

    Hi All, The Requirement: Using the Cost Model I am able to do up to Sub-Total Value.  I tried with Calculation Row (Business Process) in the Cost Model Derivation Rule, but could not succeed.  I tried with Base Planning Object, but the formulas are d

  • Adobe toolbox vs PHP pure upload?

    Been using MX 2004 and enjoyed the PHP pure file upload behavior. Now downloaded the trial version of DW CS3 and find that my file upload behavior wont work, then downloaded the toolbox and find that it's so much more different than my usual way of u