Cfset variable as a list loop value

I'm trying to use a list loop to create 30 numbers then set
that list
with cfset.
Instead of typing <cfset Questions = 1,2,3,4...etc.>
I'd like to make a
list loop generate the 30 numbers. I just can't figure out
how to set
these 30 numbers as a value into a cfset variable named
"Questions".
Here's three things I've tried. All return errors:
<cfloop index="QuestionNumber" from="1" to="30">
#QuestionNumber#,
</cfloop>
<cfset QuestionNumber = Questions>
And this:
<cfset Questions =
<cfloop index="QuestionNumber" from="1" to="30">
#QuestionNumber#,
</cfloop>
>
And this;
<cfloop index="QuestionNumber" from="1" to="30">
<cfset Questions = #QuestionNumber#,>
</cfloop>

ksmith wrote:
> Or brute force it like:
>
>
> <cfset loopList = "">
>
> <cfloop index="QuestionNumber" from="1" to="30">
> <cfif (QuestionNumber GT 1)>
> <cfset apost = ",">
> <cfelse>
> <cfset apost = "">
> </cfif>
> <cfset loopList = loopList & apost &
#QuestionNumber#>
> </cfloop>
>
> <cfdump var="#loopList#">
>
Thank you ksmith.

Similar Messages

  • How do I bind variables in a List of value

    I'm using jdev 11g. I have an updatable view object for which I want to use a list of values on a few fields. I have defined a read-only view object that query a table that contains several list of values based on a column call domain. How do I narrow the returned list of values with a bind variable. Or do I need to define a view object for each domain?

    Hi Frank,
    Thanks for your reply. After playing with different options with the list of values, I came to the conclusion that this functionality has been added to 11g to replicate Form's LOV functionality. However, if I select a radio group as the default list type, the filter option is grayed out. Also, i'm not sure i understand the relationship between the default list type and the control type on a page. I tried to define a default list type as Input Text with List of Values which let me add a filter, and on my page I dropped the field as a single selection radio group. In this case the filter does not work. Only if i drop a List of Value the filter will work but i don't want this king of interface.
    The way i did this with 10g was to define a view object with bindings and set the bind variable value on the binding page using a invokeAction. Is it still the way to do this in 11g?

  • BEx query based on virtual cube donu00B4t display a valid List of Value (LOV)

    Hello
    I have a problem with an invalid LOV. The scenario is the following; There´s a BEx query based on a virtual cube. The query has an exit variable on caracteristic that is based on 0CALMONTH.
    At Universe Designer I simply create a connection, a universe based on this query and export.
    At Web Intelligence (also at Live Office), when I try to execute de query, the prompt to fill my exit variable display a list of value that doesn´t match with the values of the caracteristic at the cube.
    Actually, the list at the prompt starts with 01.0000 and finishes with 05.0968.
    In Universe Designer, the option to edit the list of values is not available. But I think that editing the LOV is not the correct way.
    I´ve tried creating a new query based on the DSO that is the source of the virtual cube. In this case, I had a valid list. Unfortunately, I can´t use this DSO.
    Did anyone already have this problem?

    Hi James,
    can you explain what you mean with "input length for that filed" ?
    The field in the table is varchar2(120). I coudn't found options for the List of value.
    Thanks for your response
    Carsten
    null

  • Can we assign value to a variable in PL/SQL Loop

    Hi
    Can we assign value to a variable in PL/SQL Loops?
    DECLARE
    V_Num NUMBER;
    BEGIN
    LOOP
    V_Num := 10;
    DBMS_OUTPUT.put_line(V_num);
    V_Num := V_Num - 1;
    EXIT WHEN V_Num = 0;
    END LOOP;
    END;
    In the above program, Can we assign V_num with a value 10????????
    Thanks & Regards,
    Hari Babu
    Edited by: 1004977 on Jun 5, 2013 2:40 AM

    Hi,
    1004977 wrote:
    Hi
    Can we assign value to a variable in PL/SQL Loops?
    DECLARE
    V_Num NUMBER;
    BEGIN
    LOOP
    V_Num := 10;
    DBMS_OUTPUT.put_line(V_num);
    V_Num := V_Num - 1;
    EXIT WHEN V_Num = 0;
    END LOOP;
    END;
    In the above program, Can we assign V_num with a value 10????????Yes; the example you posted does that.
    When the loop starts, the value 10 is assigned to v_num. You should see that value displayed by the put_line statement.
    After that, v_num is set to 10 - 1 = 9.
    Next, the EXIT condition is evaluated. At this point, v_num is 9, not 0, so the loop runs again. V_num is set to 10 again, and the loop continues forever (or, in some versions, until the dbms_output buffer is filled and an error occurs.)

  • Prompt List of Values in WebI - SAP BI Variable - SAP BI Query -BI Infoset

    Hi,
    We have a Multiprovider built on an Infoset. SAP BI Infoset is built using 2 DSOs.
    There is a SAP BI Query on top of this Multiprovider.
    Multiple-Single Values type Optional Variables are created for some of the Objects of this SAP BI Query.
    Universe is created on top of this SAP BI Query, using SAP Integration kit.
    WebI is created on top of this Universe.
    Prompts are created on some of the Universe Objects, for the WebI report.
    We are facing a typical problem.
    When a WebI prompt is created on one particular object, (which also has a Multiple Single Value type Optional Variable in SAP BI Query), its List of Values is showing up only first three values in WebI. The SAP BI Variable in BEX Analyzer shows up all the 8 values for the List of Values, for the same object.
    The Output WebI report has more values for the object than shown up in the List of Values & this is the problem.
    We tried to keep the settings in Info-object, DSO, Infoset, Multiprovider = Values in Master Data (for the List of Values).
    Similar objects and similar variables for the same query / webi show all the List of Values.
    Any guidance on aspects to be checked would be helpful.
    regards,
    Rajesh K Sarin

    Problem :
    If an SAP BI Infoset is used in data modelling, and a restricted key
    figure is created in the SAP BI Query; the resultant WebI Object Prompt
    for the Info-object, only shows up LOVs which have been used for the
    restricted Key Figure. Both the things are not related except for the
    fact that some of the values for the same object are used for the
    restricted key figure.
    Details :
    We have a Multiprovider built on an SAP BI Infoset.
    SAP BI Infoset is built using 2 DSOs.
    There is a SAP BI Query on top of this Multiprovider.
    There is a restricted key figure in the sap bi query. KeyFigure "Number
    of Records" is restricted for 3 of the relevant Info-object "Meter
    Reading Status" values.
    Universe is created on top of this SAP BI Query, using SAP Integration
    kit. WebI is created on top of this Universe.
    Prompt is created on the Universe Object for Meter Reading Status, in
    the WebI report.
    List of Values is showing up only the three values in WebI (which were
    used in the Restricted Key Figure calculation).
    SAP BI Variable in BEX Analyzer for the same Info-object Meter Reading
    Status shows up all the 8 values for the List of Values.
    The Output WebI report has more values for the object than shown up in
    the List of Values & this is the problem.
    We have kept the settings in Info-object, DSO, Infoset,
    Multiprovider, Query = Values in Master Data (for the List of Values).
    When we delete the "Restricted Key Figure" from the SAP BI Query, the
    refreshed Universe and Webi have a complete set of List of Values
    applicable.   
    Steps for Reconstruction    
    1. Create Infoset
    2. Create SAP BI Query on Infoset
    3. Create Restricted Key Figure for Number of Records and few of the
    values for a characteristic info-object "X".
    4. Create BO Universe on SAP BI Query
    5. Create Webi on BO Universe
    6. Create a Prompt on the characteristic info-object "X".
    7. Check List of Values for the characteristic info-object "X" in SAP
    BI Query and WebI.
    8. LOVs in WebI are equal to the values used for restriction in the
    restricted key figure.
    9. Delete the restricted key figure from SAP BI Query.
    10. Refresh Universe
    11. Webi prompt shows all the values for the prompt on "X".

  • List of Values from SAP BW variable in Web Intelligence

    Hi Ingo,
    We have SAP BW Query Variables with list of values available in Universe and hence Web Intellligence.
    These variables are on InfoObjects like Business Partner, Contract Account...etc. The actual values for these objects are in millions. Whenever we use these filters at WebI, its taking too much time to load all those millions of List of Values.
    Can you please guide us how to avoid loading these List of Values and provide a text box for user input.
    Appreciate your help.
    Regards,
    Ravi Kumar Garre

    Hi,
    no - this is a feature you can enable on any List of values including those that are being generated based on BI variable. In the Universe - assuming a query with a BI variable - you will have two List of Value definitions per Variable.
    open the properties and set both of them to "Delegated Search", save the universe, export it and then you should see the difference.
    ingo

  • How to use List of values with bind variables on item?

    Hi
    I made a dynamic list of values with a bind variable as a provider. I tried to run the list, and it worked fine - i filled inn the bind variable when asked for, and i got a list of values to choose from.
    I would very much like to use this list of values as an attribute on a custom made item. My wish is that when creating the item you someplace write the bind variable, and the list will then turn up as wanted. (I could f.ex add the variable as an attribute on the page type)
    I tried to create a custom attribute and assign the list of values to it. It created an error when I then tried to add the attribute to the item.
    Does anyone have any idea on how to solve this?
    Any help appreciated!
    Maja R. Anjer

    Hi
    i am getting error as
    oracle.apps.fnd.framework.OAException: oracle.jbo.SQLStmtException: JBO-27122: SQL error during statement preparation. Statement: SELECT * FROM (SELECT meaning, lookup_code,lookup_type
    FROM fnd_lookup_values
    WHERE view_application_id = 200) QRSLT WHERE (lookup_type=:1 AND ( UPPER(MEANING) like :2 AND (MEANING like :3 OR MEANING like :4 OR MEANING like :5 OR MEANING like :6)))
    Thanks
    Mateti

  • List of Values using page item variable

    I know there has to be a simple solution to my problem but I cannot figure it out. Any assistance would be greatly appreciated.
    I have a Shared list of values that I want to reuse on several of my pages. I have tried (I thought) all the variable possibilities but cannot figure out how to reference the page item in my list of values.
    Original code:
    select app_name d, app_sys_id f
    from ops_application
    where :P32_RADIO2 = 'Application'
    union
    select db_name d, db_id f
    from ops_database
    where :P32_RADIO2 = 'Database'
    Doesn't work:
    select app_name d, app_sys_id f
    from ops_application
    where 'P'||:APP_PAGE_ID||'_RADIO' = 'Application'
    union
    select db_name d, db_id f
    from ops_database
    where 'P'||:APP_PAGE_ID||'_RADIO' = 'Database'
    I also have tried 'P'||v('APP_PAGE_ID')||'_RADIO'
    'P'||&APP_PAGE_ID.||'_RADIO'
    'P&APP_PAGE_ID._RADIO'
    'P'||:APP_PAGE_ID||'_RADIO'
    Thanks,
    Gayle
    Edited by: user8116955 on Sep 27, 2010 12:25 PM

    Gayle,
    I haven't tried this, but what about
    where v('P'||:APP_PAGE_ID||'_RADIO') = 'Application'That should allow you to build up the name of the page item dynamically, and then test the value...
    A lower-quality solution would be to use an application item rather than a page item, as then you'd know the name ahead of time.
    Let me know if this works,
    -David

  • Make List of Values for Required Bind Variables

    In the SQL query for my View Object, I have a bind variable, which I set to "required". In the search form resulting from a View Criteria, a textbox shows up asking the user for the value of that variable. Is there a way to make it a List of Values instead?

    Hi WV,
    Create a transient attribute in your VO that contains the LOV and then set the value of your bind variable to point to this new transient attribute. Also here is another approach
    https://blogs.oracle.com/shay/entry/adf_query_with_parameters_and
    Let us know how it goes.
    -Juan Camilo

  • Passing list of values to a function

    As what type list of values multiple selections, e.g. resulting in (1,2,3), are represented in function parameters?
    for example i have lov that results in (1,2,3) and dataset query is select myfunction(:mylov) from dual.
    Variable of what type I must declare in function definition?

    when i hadthe same situation , i used cursor query to resolve .
    eg.
    select myfunction(cursor(select field1 from table1 where field1=:parameter1)) from dual
    In the PL sql function get all thee parameters from the cursor variable and pass into the looping statement for furthur processing

  • WEBI prompt based on bex variable suppress not assigned hashtag value in LOV

    Hi,
    is it possible to suppress the "Not assigned (#)" value from the list of values in a webi prompt based on a bex variable?
    This "Not assigned" value is something BW specific, BW adds this to each characteristic automatically?!
    WEBI:
    RSRT:
    It needs to work in WEBI, not only in RSRT, and the filtering of data still needs to work.
    For rsrt it works, when you exclude the not assigned value in "Filter > Characteristic Restrictions" and use the bex variable in/through "Filter > Default Values", but this does not work in WEBI, because the BEX Query Data is not filtered on the in the prompt selected value.
    Thanks.
    Regards
    David

    Thanks David for a quick reply !
    I could manage to avoid # values in WebI prompt using BAdI implementation, here is the brief:
    Problem:
    WebI report prompt (which shows BEx variable) list of values shows blanks or # . Rrequirement was to avoid these blanks or #
    Environment:
    BW 7.3
    BO 4.0
    BW Cube > BEx Query > OLAP Connection > WebI report
    Solution:
    InfoObject Level1 in BW had # values in masterdata, this could not be deleted since it was in use with other Cubes.
    Vaurable Var_Level1 displays # when pressed F4 running BEx query and in list of values in WebI report prompt.
    I implemented BAdI on Level1 info object and variable Var_Level1.
    Steps to implement BAdI are as in following link
    BEx Query - Control the values which are shown on F4
    Used following code to elimitate #.
    METHOD IF_RSR_VARIABLE_F4_RESTRICT~GET_RESTRICTION_FLAT.
    DATA: l_s_range     LIKE LINE OF c_t_range.
    DATA: l_var_range   LIKE LINE OF i_t_var_range.
    DATA: IT_MZLEVELS TYPE TABLE OF /BIC/MZLEVELS,
    WA_MZLEVELS LIKE LINE OF IT_MZLEVELS.
    DATA: L_ZLEVEL1     TYPE /BIC/OIZEVEL1.
      IF i_vnam EQ 'ZV_LEVEL1'.
    SELECT /BIC/ZLEVEL1
    FROM /BIC/MZLEVELS
    INTO CORRESPONDING FIELDS OF TABLE IT_MZLEVELS
    WHERE OBJVERS       = 'A'.
    IF SY-SUBRC NE 0.
    EXIT.
    ENDIF.
    SORT IT_MZLEVELS BY /BIC/ZLEVEL1.
    DELETE ADJACENT DUPLICATES FROM IT_MZLEVELS COMPARING /BIC/ZCLV1GP.
    DELETE IT_MZLEVELS WHERE /BIC/ZLEVEL1 = ''.
    l_s_range-iobjnm = i_iobjnm.
    l_s_range-sign   = 'I'.
    l_s_range-option = 'EQ'.
    LOOP AT IT_MZLEVELS INTO WA_MZLEVELS.
    l_s_range-low    =  WA_MZLEVELS-/BIC/ZLEVEL1.
    APPEND l_s_range TO c_t_range.
    ENDLOOP.
    ENDIF.
    ENDMETHOD.

  • Restrict the list of values retrieved by a model driven LOV

    hi all
    i'm try to restrict the list of values retrieved by a model driven LOV just like the article in this link
    http://www.oracle.com/technology/products/jdev/tips/fnimphius/restrictlovlist/restrictlov.html
    and i'm using the jdev11.2 but i always get this error
    java.sql.SQLException: parameter IN or OUT is missing at index 1
    my code is :
    public void SetSchoolLovVar(LaunchPopupEvent launchPopupEvent)
    String var_val=getOt7().getValue().toString();
    System.out.println("++++++++++++++++++++++++++++++++"+var_val);
    BindingContext bctx = BindingContext.getCurrent();
    BindingContainer bindings = bctx.getCurrentBindingsEntry();
    FacesCtrlLOVBinding lov = (FacesCtrlLOVBinding)bindings.get("DeptCode");
    System.out.print("LOVE "+lov);
    System.out.println("+_+_+_+_+__+_+_+__+_+_+_+_+_+_+_+_+_+_________+++++_+_+_"+lov.getName());
    lov.getListIterBinding().getViewObject().setNamedWhereClauseParam("Rejon_For_Prj_Dept",var_val);
    Rejon_For_Prj_Dept is the bind variable of the Lov Query.
    any good idea

    Hi,
    The error might be due to making the bind variable as required but not using it in the vo query. Edit the bind variable and make it as optional by unchecking the required checkbox.
    Sireesha

  • Compare collection with list of values

    Hi
    oracle 10.2.0.1.0
    I need to compare a collection (Record ) vriable with a list of values from a table .
    pseudo code is
    if gpid_rec.item_type in ('a','b','c') then
    end if ; Now this should be replaced by values retrieved from a table
    if gpid_rec.item_type in ( select item_type from dbom_items ) then
    end if ;But the query is not allowed in if statement .
    please help me in achieving it.

    Hi,
    Something like this
    declare
      type t_values is table of varchar2(1) index by dbom_items.item_type%type;
      v_values  t_values;
    begin
      -- init once
      for cur in (select item_type from dbom_items)
      loop
        v_values(cur.item_type) := '1';
      end loop;
      -- then use many times
      if v_values.exists(gpid_rec.item_type)
      then
      end if;   
    end;
    /

  • List Of Values not getting displayed in BI launchpad

    Hello All,
    When i am running the report in BI launchpad, List of values are not displaying . throwing below error.
    Detail Error:
    com.businessobjects.sdk.core.server.CommunicationException$UnexpectedServerException: while trying to invoke the method com.businessobjects.mds.olap.protocol.bics.BICSClient.getCube() of a null object loaded from field com.sap.sl.proxyconsumption.services.olapaccessservice.BICSDiscoverServer.bicsClient of an object loaded from local variable 'this'
    @The same report is working fine in WEBI Rich client.
    I am using 4.1 SPO3 Patch 2
    Please Help on this.
    Thanks,
    Ramesh

    Hi,Supriya!
    We are having problem looking like that (After report had been made if I click Refresh button and wait for Values for prompts - the same error message appears).
    My user is in admin group and if log as Administrator - nothing changes.
    Could you give me advice?

  • Filter view object by selected values from list of values

    Hello,
    I've the following problem with my ADF Application. I have three view objects in my application module. Two of them are connected via a view link. For example take users, who are connected to their departments. The remaining view object consists of factories. Now I want to show the user/department dependency in a tree table and the available factories in a list of values. This list of values should be used to filter the shown users.
    I've already tried to use bind variables in the users view object. But I don't know how to fill them with the value of the list of values.
    Can someboy give me a tip how to solve this problem.
    Best regards,
    Enno

    Hi Enno,
    Try this:
    - Have a AM method with one parameter(which takes user from the list of values) and inside AM method write code to set the bind parameter value and execute the query
    Sample Code
    public void filterByUser(String user){
       //Get your UserViewObject instance to userVO
       userVO.setNamedWhereClauseParam("<Bind_Variable_Name>", user);
       userVO.executeQuery();
    }- Expose the method as client interface
    - Drop the method (Data Control) as a button on to the page and pass the listofvalues value as a value to the method binding param
    Something like this: ${bindings.<User>.inputValue}
    - Finally refresh the master and detail tables based on the ListOfValues selection by setting partialTriggers property to the listofvalues component id
    Hope it is clear
    Sireesha
    Edited by: Sireesha Pinninti on Oct 15, 2009 4:54 AM

Maybe you are looking for

  • Muse file wont save without crashing muse

    Files created within 2014.2 will now not save when opened in 2014.3..which is pretty frustrating. Muse files all on local hard-drive etc. Have had several variations of this error but the pic enclosed seems to be the most common. So as things stand M

  • Has anyone heard whether Win 10 will allow booting from a ReFS partition?

    I've been running a few ReFS volumes for a year now under Windows 8.1. It's been flawless. So... Will we see Windows 10 enable ReFS for the boot volume? Maybe this could also give us the easy ability to have a larger than 2 TB boot volume on a BIOS c

  • Is there any view for  table TSTCT (transaction code text )

    Hi, I need to display the transactions allowed per a user , in that i need to display transaction codes along with the text. In this report selection screen contains user as select option, when the user enters group of users as selection it is consum

  • EBP-SUS - Purchase Order Response (POR) with attachments

    Hi,    I am working on EBP-SUS scenario with EBP in Extended classic scenario.    I have couple of questions regarding Purchase Order Response in SUS with attachments. I appreciate your response to these questions.   1. From SUS, when the Supplier re

  • Exceptions while creating ABAP client Proxy

    Hi Experts, I tried to create a client proxy on the CRM system for a web service URL (where the WSDL exists), in the transaction SE80. When I tried creating this, i got exception as follows. Exception occured in communication framework:error in HTTP