Value List Q of Q Question

I run a Stored Procedure which brings back a query object.  Some of the column names of that query object have two words.  For example, let's say a field was called "one two".   I know I can output this data with array notation
#queryname["one two"][currentrow]#
but what I really want to do is to create a value list from that field, run another database query based on that list, and then do a Q of Q, using "one two" in the where clause.
Everything I have tried so far with both valuelist () and Q of Q has resulted in a syntax error.  Has anyone ever successfully accomplished this?

If you use QueryAddColumn, you can still use the original query.  But I do not know of any way to reference the invalid column name in a QoQ. AFAIK, you must use the renamed column instead
<cfquery name="myQuery" datasource="SomeDSN">
    SELECT 'b' AS [One Two] UNION
    SELECT 'c' AS [One Two] UNION
    SELECT 'd' AS [One Two] UNION
    SELECT 'a' AS [One Two]
</cfquery>
<cfset queryAddColumn(myQuery, "NewColumnName", myQuery["one two"]) />
<cfquery name="newQuery" dbtype="query">
    SELECT    *
    FROM    myQuery
    WHERE    NewColumnName LIKE '%something%'
</cfquery>
<cfdump var="#newQuery#">

Similar Messages

  • How can we use C# to read dynamic parameter's value list from .rpt?

    I'm using Cystal Report 2008. We know starting from CR XI we can create dynamic parameters, the list of items of this kind of parameter are fetching from database. So in general the SQLs to get the list of values for dynamic parameters are stored in the .rpt.
    In Crystal Report Designer, if I preview a report with dynamic parameters, it will first query the database and then show the input dialog with list of values from database for user to choose. My question is can we implement the same thing by our C# code? I'm planning to use C# code to read this dynamic parameter's value list from .rpt and render them on the web page. Then pass back the user selected values to the .rpt to run the report after user make the choice. I didn't find any APIs can do this. Is it possible?
    Thanks in advance!!

    Hi,
    Can you explain a bit in detail, I have similar scenario. I am using the following code but not getting the Column name for dynamic parameter list.
    foreach (ParameterFieldDefinition prm
                              in reportDocument.DataDefinition.ParameterFields)
                    try
                        string vParameterFieldName;                   
                        *vParameterFieldName = prm.ParameterFieldName.ToString();*
    Shakeel

  • Value list for a new field

    Hi to all of you SAP experts
    I need to add a new field to an info-type (in the hr module).
    The field needs to have a value list (check table).
    I have two options, I can create a data element based on a standard domain and add the check table at the level of the actual structure OR I can create a new domain and hold the value table there.
    My question is what should be the considerations for choosing one way or another?
    Thank you.

    If the values will change rarely, then it's simpler to just add it to the domain; but if new values are added or existing ones changed frequently, then you should consider the check table.
    Rob

  • Crystal Reports and values list of BEx variables

    Hello.
    I read this - http://wiki.sdn.sap.com/wiki/display/BOBJ/CrystalReportsandBWquery+elements
    And there are writed in wiki:
    "List of values for SAP variables are created automatically by Crystal Reports only when you use SAP Toolbar to create the report:
    The list of values for a variable in Crystal Reports will be static, but the list will be always dymanic in InfoView as long as you use BW Publisher (save reports to BW, publish to BOE)and you logon to BOE using SAP Authentication."
    I have two link to BEx queries from my CR report - and my variables have not values. I think that I don't use "SAP" menu when created the report.
    But... what I can doing now? Is way transform "simple" report into "SAP" report?
    May be is way create "SAP" report and after it copy all content of old report into new "SAP" report including all objects, formats, formulas, connections?
    May be is way load values list from BEx query with "simple" reports?
    And another question - I see that in list I get texts and codes but showing only texts in run-time. Can I tune CR for show codes too?

    Post to Integration Kit SAP forum

  • How to pass a value to a filter prompt based on a value list?

    I have a query that has a filter prompt that is based on a value list. I want to call this query from another query as a drill down.
    So I build the URL to call the query and pass the value for the filter prompts as URL parameters. For the filter prompts that are simple text fields this works without problems, but how do I pass a value to the filter prompt that is based on the value list?
    I tried passing
    <parameterName>=<valueListId>:616:null
    and that gives me "None" for the value list prompt as expected.
    I then tried to pass the DisplayName (as I would do when setting a default value for the prompt).
    Like this:
    <parameterName>=<displayName>
    but that does not work.
    I also tried some variations/combinations like
    <parameterName>=<valueListId>:616:<displayName>
    but that does not work either.
    So does anybody know how to pass a parameter to the value list prompt?

    Hi Martin,
    I saw the following post which may help answer your question.
    How to default a Value List or Object Picker to a particular value
    Regards,
    Reshma

  • Value-list handler, value-list iterator and session-facade strategy

    Hello all,
    Further to an earlier post, I rewrote my post trying to me more accurate in my question.
    Here is my problem:
    I am trying to implement the value-list handler design pattern using the session facade strategy. In the pattern as it is described here
    (http://java.sun.com/blueprints/corej2eepatterns/Patterns/ValueListHandler.html) the client accesses the value-list handler AND the iterator directly.
    As I chose the session-facade strategy having my value-list handler as a stateful session ejb, I don't know how the client is going to access the iterator. I see only one option: Having the client access the iterator through the ejb value-list handler. This requires adding new methods to the ejb.
    Is this the correct way of doing it? Is there another way of doing this?
    Thanks in advance,
    Julien Martin.

    u can use project list handler as ur session facade.
    regarding ur second question ..session facade and value list handler session bean which is also a session facade( but there is difference between first and second) so u can use session facade and value listhandler

  • Value List- EHP4

    Hi,
    We are working on PMR-ehp4. We have some ratings for the appraisals EX: 1- 5 Scale but when we see the same scales on portal as a standard SAP EHP4 fucntionality the blank fields against the ratings are showing "No value" Text on the portal.
    Could any one please share your inputs how to bring the "blank field" instead of "No Value" text.
    Thanks in advance
    VK

    u can use project list handler as ur session facade.
    regarding ur second question ..session facade and value list handler session bean which is also a session facade( but there is difference between first and second) so u can use session facade and value listhandler

  • Connecting To Same Value List Handler

    I have a question about using the Value List Handler pattern. Right now I am just working on the design of my application (class diagrams, scenario diagrams, etc).
    I have a VLH that will retrieve data from the DB (via a DAO) and will return data to the caller. The VLH basically fronts the DAO. The caller in this case will be a Business Delegate. So the call sequence is:
    client (JSP) --> Business Delegate --> Value List Handler --> DAO
    Now the VLH is a stateless EJB. But the Business Delegate is just a plain Java class that will get instantiated on every call to the server. My hope is that it will connect to the same VLH instance (I use a ServiceLocator). But I'm not sure this will happen.
    According to what I read about Stateless Session EJBs, they are dedicated to a single client. But what is the "client" in my scenario? Is it the browser session? Or is it the Business Delegate? If its the latter, then will new instances of the Business Delegate be able to connect to the same VLH?

    Use a stateful session bean! Says so on the Sun Blueprints site for this pattern.

  • How to manage the personal value list of movement types

    When selecting the movement type from F4 Help, you can set the personal value list on the F4 Help pop-up screen(i.e. Tr-cd:MB1A).This list seems to depend on users.
    Questions are.....
    1. If you can manage the setting of this list from other management transactions like SU01, could you tell me which transaction should be used and how to manage it ?
    2. If impossible to manage it, the setting information must be stored into some DB table in some way though. Could you tell me the name of the table ?
    Thank you in advance for your help.
    Best regards

    Hello Hideki Kozai,
    First of all, include ONLY the mvt types in your (user's) favouite list by pressing "add to favourite button" on F4 help. These mvt types are normally used by users.
    If you want to delete from the favourite, then select that particular mvt type and click on "Delete from favourite" button, so that will not apprear in next time.
    The other way is suggested by Sumit, remove from the transaction list itself so user will not be able to carry out that mvt type.
    Hope this helps.
    Regards
    Arif Mansuri

  • Populating Value Lists through scripting

    Hello,
    If anyone has worked on a script to populate an extension field with a Value List Value, please let me know.
    Thanks & Regards,
    Reshma

    Hi Vaibhav,
    So we would have to create a JDBC connection to the database and write a query inside it?
    Do let me know if you get this to work.
    Responding to your earlier question, to add an extension of Value List type, create an extension definition field and  choose the data type as 'Value List' and choose the type.
    Regards,
    Reshma

  • Select-options - select multiple values from personal value list

    Hi experts,
    In my application, I am using select-options. I select the values required from the search help into the personal value list . I want to copy these values from the personal value list into my ranges table. Do I have to copy them one row at a time. Is there any way to select the values directly into the ranges table of the select-options field?
    Regards,
    Abdullah.

    Boy, this is something we're struggling with too. So we'd like to hear others' ideas on this also.
    thank you,
    iggy

  • Error at transport in select option   is not followed by itab or value list

    Hi All,
    I have an issue with the following inner join. when i check with code inspector it is not showing any errors but i get the following error while transport.
    "The In operator with SO_MATKL is followed neither by an Internal table nor by a value list".
    This error appears after the system is unicode enabled is that it have any unicode significance please advice on this.
    The following is the code snippet.
    SELECT amatnr amtart aextwg amatkl bwerks bdispo b~ekgrp
        INTO TABLE tb_mara
        FROM mara AS a
       INNER JOIN marc AS b ON amatnr = bmatnr
       WHERE a~matnr IN so_matnr
         AND a~mtart IN so_mtart
         AND a~extwg IN so_extwg
         AND a~matkl IN so_matkl
         AND b~werks IN so_werks
         AND b~dispo IN so_dispo
         AND b~ekgrp IN so_ekgrp.

    Hi Gopal
    Am on UNICODE Enabled system and i dont have problem with below code. Please check, if you have used similar to this???
    tables: mara, marc.
    select-options: so_matnr for mara-matnr,
                    so_mtart for mara-mtart,
                    so_extwg for mara-extwg,
                    so_matkl for mara-matkl,
                    so_werks for marc-werks,
                    so_dispo for marc-dispo,
                    so_ekgrp for marc-ekgrp.
    types: begin of t_mara,
             matnr type matnr,
             mtart type mtart,
             extwg type extwg,
             matkl type matkl,
             werks type werks_d,
             dispo type dispo,
             ekgrp type ekgrp,
           end of t_mara.
    data: tb_mara type table of t_mara.
    SELECT a~matnr a~mtart a~extwg a~matkl b~werks b~dispo b~ekgrp
           INTO TABLE tb_mara
           FROM mara AS a
           INNER JOIN marc AS b ON a~matnr = b~matnr
           WHERE a~matnr IN so_matnr
           AND   a~mtart IN so_mtart
           AND   a~extwg IN so_extwg
           AND   a~matkl IN so_matkl
           AND   b~werks IN so_werks
           AND   b~dispo IN so_dispo
           AND   b~ekgrp IN so_ekgrp.
    Kind Regards
    Eswar

  • Cannot add new items to a value list in AW database

    I have a database which I have been using for many years. One of the fields is a value list. I just went to add another item to the list, and no matter what I do, the Create button is grayed out. I have another value list in the same database that works fine.
    There are currently 170 items in the value list that is causin the problem, but I didn't think that there was a limit to the number of items that can be is a value list. (At least there is nothing in the AW technical specifications to indicate thin. I duplicated the existing database, deleted about 20 items from the list, then saved the file, and reopened it, and still cannot add new items to that value list. Does anyone know what might be causing the problem?

    Oops
    I read too fast.
    Here is a short script which may help.
    Replace the pop-up item by a text one and edit the property myList in my script to fit your needs.
    Select the field to fill and run the script.
    Then choose an item in the displaid list. It will be pasted in the selected field.
    This trick would give you to work with a "no limit" list of items.
    -- [SCRIPT DB fillFieldFromAlist ]
    Assuming that
    the front document is a database one
    and that a text field is selected,
    run the script to select an item in a list
    and paste it in the field.
    Yvan KOENIG, Vallauris (FRANCE)
    le 19 mars 2007
    property MyList : {"item 1", ¬
    "item 2", ¬
    "item 3", ¬
    "item 4", ¬
    "item 5", ¬
    "item 6", ¬
    "item 7", ¬
    "item 8", ¬
    (* edit the list to fit your needs *)
    tell application "AppleWorks 6"
    activate
    tell document 1
    set laClasse to (get class of selection)
    if laClasse is not field then return (* the selection is not a field *)
    set myItem to choose from list MyList
    if myItem is false then return
    set the clipboard to myItem's item 1
    select menu item 7 of menu 3 (*
    Tout sélectionner •• Select All *)
    paste
    end tell -- document 1
    end tell -- AppleWorks
    -- [/SCRIPT]
    Yvan KOENIG (from FRANCE lundi 19 mars 2007 16:44:53)

  • UCCX 9.0 CUIC Value lists

    Hello,
    I have installed UCCX 9.0(2) and I am using CUIC for the reporting data. When I first configured the UCCX CSQs, I used some sample names. After the testing phase, I changed those names to the final names.
    Everything is working as expected with the callcenter. The only problem I have is that in CUIC, if I check the Stock Value list "UCCX_CSQ Names" I see the names of the old CSQs as well as the new CSQs.
    The old CSQs are no longer configured in the system, and I cannot modify the value list since it is a stock list. How can I remove those old names from CUIC?
    Regards,
    Javier

    If you delete of modifiy any thing in UCCX then old value will mark as inactive but that will still present in infromix database.
    if you want to completly remove it then you have to purge the old data . but in that case you will lose all your historical data also . you can request TAC they will delete old config from root . but normally this is working as design .

  • Restrict value list (F4) at variable selection screen

    Hi,
    we have a variable of type "manual input" so that it appears at the selection screen before executing the query.
    The value-list (F4) for this variable provides every value of masterdata of the infoobject. But here is the problem: I want only those values that are used in the infocube. Is there a way to restrict this list? Customer-Exit??
    Thanks for all hints!
    Regards,
    Mathias

    Hi,
    I tested both of the hints - in my system both settings had no impact.
    Can it be a release problem? My BW is a 3.0B SP 15.
    I changed the settings in the InfoObj and put a new variable in the query-def for this characteristic. In the variable-selector before executing the query I can select a value (via F4) for the characterisitc which is not used in the cube. This is my problem. Only used values should be selectable.
    These are the settings in the InfoObj:
    Display                 Text                          
    BEx description         Short description             
    Selection               Unique for Every Cell         
    Q Def. Filter Val Sel   Only Values in InfoProv       
    Q Exec Filter Val. Sel  Only Posted Values for Navi
    Can anyone help?
    Thanks, Mathias

Maybe you are looking for