Generate dynamic variables

I'm kinda new to JSP, and have the following question:
is it possible to generate dynamic variables in JSP? I searched the WWW, and it seems nobody ever used it. Or I just searched wrong :)
So:
String result = "";
for(int i = 1; i <= 10; i++){
result = "test" + i;
// do something with result here
I would like that the string "result" becomes a variable: test1, test2, test3, ...
I know it is possible in PHP like this:
for($i=1; $i<=$10; $i++){
$result = ${"test".$i};
// here I can do something with the generated variables $test1, $test2, $test3, ...
Does anyone got a solution for this problem? Cause it's driving me crazy ;)

I tried, but I keep getting error's... Anything wrong?
import java.awt.event.*;
import java.awt.*;
import java.util.*;
import java.util.Map;
public class AwtCalculatorFrame extends Frame{
     private Button[] btnCalc;
     private Panel pnlLabel;
     private String[][] btnArrRow;
     private Label lblRes;
     private Panel[] pnlBtnRow;
    public AwtCalculatorFrame(String titel) {
        super(titel);
        MaakLayout();
        ToonFrame();
    private void ToonFrame() {
        setSize(250, 250);
        Dimension d = getToolkit().getScreenSize();
        setLocation((d.width - getSize().width) / 2, (d.height - getSize().height) / 2);
        addWindowListener(new AwtCalculatorListeners());
        setVisible(true);
    private void MaakLayout(){
        setBackground(new Color(224, 224, 224));
        setLayout(new GridLayout(6, 1, 5, 5));
        pnlLabel = new Panel(new GridLayout(1, 1, 5, 5));
        String[][] btnArrRow = new String[5][5];
        btnArrRow[0][0] = "Sin";
        btnArrRow[0][1] = "Cos";
        btnArrRow[0][2] = "Tan";
        btnArrRow[0][3] = "C";
        btnArrRow[0][4] = "CA";
        btnArrRow[1][0] = "7";
        btnArrRow[1][1] = "8";
        btnArrRow[1][2] = "9";
        btnArrRow[1][3] = "Sqrt";
        btnArrRow[1][4] = "Pow";
        btnArrRow[2][0] = "4";
        btnArrRow[2][1] = "5";
        btnArrRow[2][2] = "6";
        btnArrRow[2][3] = "x";
        btnArrRow[2][4] = "/";
        btnArrRow[3][0] = "1";
        btnArrRow[3][1] = "2";
        btnArrRow[3][2] = "3";
        btnArrRow[3][3] = "+";
        btnArrRow[3][4] = "-";
        btnArrRow[4][0] = "+/-";
        btnArrRow[4][1] = "0";
        btnArrRow[4][2] = ".";
        btnArrRow[4][3] = "Pi";
        btnArrRow[4][4] = "=";
        Label lblRes = new Label("0.");
        add(pnlLabel);
        Button[] btnCalc = new Button[btnArrRow.length];
        for(int c = 0; c < btnArrRow.length; c++){
            pnlBtnRow[c] = new Panel(new GridLayout(1, 5, 5, 5));
            for(int i = 0; i < btnArrRow.length; i++){
                btnCalc[i] = new Button(btnArrRow[c]);
pnlBtnRow[c].add(btnCalc[i]);
add(pnlBtnRow[i]);

Similar Messages

  • Can i generate dynamic variables

    hi guys
    can we generate varibles in a plsql block dynamically ..viz i have some varibles in the data base that are entered by the user and the values are to be calculated at the run time based on some of those varible eg
    in database
    code formula (varchar2)
    a --
    b a/2
    c b-a*6
    etc..
    so the problem is to calculate them at run time say based on a (in the above eg).
    so scract ur head a little and ....enjoy

    You cannot create a table inside a trigger (unless you use an autonomous transaction) since that invloves DDL. Are you certain that you cannot use something like a global temporary table?
    Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • How to generate report with dynamic variable number of columns?

    How to generate report with dynamic variable number of columns?
    I need to generate a report with varying column names (state names) as follows:
    SELECT AK, AL, AR,... FROM States ;
    I get these column names from the result of another query.
    In order to clarify my question, Please consider following table:
    CREATE TABLE TIME_PERIODS (
    PERIOD     VARCHAR2 (50) PRIMARY KEY
    CREATE TABLE STATE_INCOME (
         NAME     VARCHAR2 (2),
         PERIOD     VARCHAR2 (50)     REFERENCES TIME_PERIODS (PERIOD) ,
         INCOME     NUMBER (12, 2)
    I like to generate a report as follows:
    AK CA DE FL ...
    PERIOD1 1222.23 2423.20 232.33 345.21
    PERIOD2
    PERIOD3
    Total 433242.23 56744.34 8872.21 2324.23 ...
    The TIME_PERIODS.Period and State.Name could change dynamically.
    So I can't specify the state name in Select query like
    SELECT AK, AL, AR,... FROM
    What is the best way to generate this report?

    SQL> -- test tables and test data:
    SQL> CREATE TABLE states
      2    (state VARCHAR2 (2))
      3  /
    Table created.
    SQL> INSERT INTO states
      2  VALUES ('AK')
      3  /
    1 row created.
    SQL> INSERT INTO states
      2  VALUES ('AL')
      3  /
    1 row created.
    SQL> INSERT INTO states
      2  VALUES ('AR')
      3  /
    1 row created.
    SQL> INSERT INTO states
      2  VALUES ('CA')
      3  /
    1 row created.
    SQL> INSERT INTO states
      2  VALUES ('DE')
      3  /
    1 row created.
    SQL> INSERT INTO states
      2  VALUES ('FL')
      3  /
    1 row created.
    SQL> CREATE TABLE TIME_PERIODS
      2    (PERIOD VARCHAR2 (50) PRIMARY KEY)
      3  /
    Table created.
    SQL> INSERT INTO time_periods
      2  VALUES ('PERIOD1')
      3  /
    1 row created.
    SQL> INSERT INTO time_periods
      2  VALUES ('PERIOD2')
      3  /
    1 row created.
    SQL> INSERT INTO time_periods
      2  VALUES ('PERIOD3')
      3  /
    1 row created.
    SQL> INSERT INTO time_periods
      2  VALUES ('PERIOD4')
      3  /
    1 row created.
    SQL> CREATE TABLE STATE_INCOME
      2    (NAME   VARCHAR2 (2),
      3       PERIOD VARCHAR2 (50) REFERENCES TIME_PERIODS (PERIOD),
      4       INCOME NUMBER (12, 2))
      5  /
    Table created.
    SQL> INSERT INTO state_income
      2  VALUES ('AK', 'PERIOD1', 1222.23)
      3  /
    1 row created.
    SQL> INSERT INTO state_income
      2  VALUES ('CA', 'PERIOD1', 2423.20)
      3  /
    1 row created.
    SQL> INSERT INTO state_income
      2  VALUES ('DE', 'PERIOD1', 232.33)
      3  /
    1 row created.
    SQL> INSERT INTO state_income
      2  VALUES ('FL', 'PERIOD1', 345.21)
      3  /
    1 row created.
    SQL> -- the basic query:
    SQL> SELECT   SUBSTR (time_periods.period, 1, 10) period,
      2             SUM (DECODE (name, 'AK', income)) "AK",
      3             SUM (DECODE (name, 'CA', income)) "CA",
      4             SUM (DECODE (name, 'DE', income)) "DE",
      5             SUM (DECODE (name, 'FL', income)) "FL"
      6  FROM     state_income, time_periods
      7  WHERE    time_periods.period = state_income.period (+)
      8  AND      time_periods.period IN ('PERIOD1','PERIOD2','PERIOD3')
      9  GROUP BY ROLLUP (time_periods.period)
    10  /
    PERIOD             AK         CA         DE         FL                                             
    PERIOD1       1222.23     2423.2     232.33     345.21                                             
    PERIOD2                                                                                            
    PERIOD3                                                                                            
                  1222.23     2423.2     232.33     345.21                                             
    SQL> -- package that dynamically executes the query
    SQL> -- given variable numbers and values
    SQL> -- of states and periods:
    SQL> CREATE OR REPLACE PACKAGE package_name
      2  AS
      3    TYPE cursor_type IS REF CURSOR;
      4    PROCEDURE procedure_name
      5        (p_periods   IN     VARCHAR2,
      6         p_states    IN     VARCHAR2,
      7         cursor_name IN OUT cursor_type);
      8  END package_name;
      9  /
    Package created.
    SQL> CREATE OR REPLACE PACKAGE BODY package_name
      2  AS
      3    PROCEDURE procedure_name
      4        (p_periods   IN     VARCHAR2,
      5         p_states    IN     VARCHAR2,
      6         cursor_name IN OUT cursor_type)
      7    IS
      8        v_periods          VARCHAR2 (1000);
      9        v_sql               VARCHAR2 (4000);
    10        v_states          VARCHAR2 (1000) := p_states;
    11    BEGIN
    12        v_periods := REPLACE (p_periods, ',', ''',''');
    13        v_sql := 'SELECT SUBSTR(time_periods.period,1,10) period';
    14        WHILE LENGTH (v_states) > 1
    15        LOOP
    16          v_sql := v_sql
    17          || ',SUM(DECODE(name,'''
    18          || SUBSTR (v_states,1,2) || ''',income)) "' || SUBSTR (v_states,1,2)
    19          || '"';
    20          v_states := LTRIM (SUBSTR (v_states, 3), ',');
    21        END LOOP;
    22        v_sql := v_sql
    23        || 'FROM     state_income, time_periods
    24            WHERE    time_periods.period = state_income.period (+)
    25            AND      time_periods.period IN (''' || v_periods || ''')
    26            GROUP BY ROLLUP (time_periods.period)';
    27        OPEN cursor_name FOR v_sql;
    28    END procedure_name;
    29  END package_name;
    30  /
    Package body created.
    SQL> -- sample executions from SQL:
    SQL> VARIABLE g_ref REFCURSOR
    SQL> EXEC package_name.procedure_name ('PERIOD1,PERIOD2,PERIOD3','AK,CA,DE,FL', :g_ref)
    PL/SQL procedure successfully completed.
    SQL> PRINT g_ref
    PERIOD             AK         CA         DE         FL                                             
    PERIOD1       1222.23     2423.2     232.33     345.21                                             
    PERIOD2                                                                                            
    PERIOD3                                                                                            
                  1222.23     2423.2     232.33     345.21                                             
    SQL> EXEC package_name.procedure_name ('PERIOD1,PERIOD2','AK,AL,AR', :g_ref)
    PL/SQL procedure successfully completed.
    SQL> PRINT g_ref
    PERIOD             AK         AL         AR                                                        
    PERIOD1       1222.23                                                                              
    PERIOD2                                                                                            
                  1222.23                                                                              
    SQL> -- sample execution from PL/SQL block
    SQL> -- using parameters derived from processing
    SQL> -- cursors containing results of other queries:
    SQL> DECLARE
      2    CURSOR c_period
      3    IS
      4    SELECT period
      5    FROM   time_periods;
      6    v_periods   VARCHAR2 (1000);
      7    v_delimiter VARCHAR2 (1) := NULL;
      8    CURSOR c_states
      9    IS
    10    SELECT state
    11    FROM   states;
    12    v_states    VARCHAR2 (1000);
    13  BEGIN
    14    FOR r_period IN c_period
    15    LOOP
    16        v_periods := v_periods || v_delimiter || r_period.period;
    17        v_delimiter := ',';
    18    END LOOP;
    19    v_delimiter := NULL;
    20    FOR r_states IN c_states
    21    LOOP
    22        v_states := v_states || v_delimiter || r_states.state;
    23        v_delimiter := ',';
    24    END LOOP;
    25    package_name.procedure_name (v_periods, v_states, :g_ref);
    26  END;
    27  /
    PL/SQL procedure successfully completed.
    SQL> PRINT g_ref
    PERIOD             AK         AL         AR         CA         DE         FL                       
    PERIOD1       1222.23                           2423.2     232.33     345.21                       
    PERIOD2                                                                                            
    PERIOD3                                                                                            
    PERIOD4                                                                                            
                  1222.23                           2423.2     232.33     345.21                       

  • Dynamic Variable for YTD08

    Hi All,
       I am having a requirement for the generating a report for the selection field 0calmonth.if execute the report,the field name should get change for the previous years and i should get the data for the same.
    For Example:
    Input : 200906
                                                                YTD' 200906(Dynamic)      YTD 08 (Dynamic)
    ARCHWAY SALES - CINCINNATI         1234                                       1234
    ARCHWAY SALES - CINCINNATI        13,725                                     13,725.
    Eg.. If i give the input as 200906 and execute the report then at YTD 08 place i have to get previous year ( 200906 has to be converted as 200806) so it has to generate dynamically .
    Let me know if you have any queries
    Thanks!!!

    Hi
    Create 2 Restricted Key Figures YTD(FiscalPeriod) and YTD(FiscalPeriod-12)
    In 1st RKF
    Bring the KF of YTD and restrict by Fiscalperiod Variable
    In 2nd RKF
    Bring the KF of YTD and restrict by Fiscalperiod Variable and offset the variable by -12.
    Use these 2 in your report.
    Regards,
    Bilapati

  • How to create dynamic variable in Java?

    Hi,
    I want to create dynamic varible , using ArrayList or Vector. The number of array i dont knwo, so how to create dynamic ArrayList or Vector.
    for example:
    ArrayList1,ArrayList2,ArrayList3.....n
    or
    Vector1,Vector2,Vector3 .....n, the n value i will get at run time, so how to create the dynamic ArrayList or Vector or i can use any other Object in java,
    Pls provide your input.
    Sridhar

    1. I have a HashMap with dataok ... fair enough.
    2. depending on its size, i need to create variable
    to store them.uhm ... why? If you have a variable number of elements in the map then you'd need to generate a variable number of variables (a number, that is not know at compile time, as it seems). Now if you could somehow create those variables, how would you access them? You'd have to generate the code handling them as well ...
    Tell us what kind of data you've got and what you want to do with it. There's certainly a better solution to your problem.
    how to generate variables as per content size of the
    HashMapYou don't.

  • Dynamic variable failing

    <p>I have some code with a connect by clause.  When I use atext string in the 'start with' part of the statement the codecompiles and runs.  When I use the dynamic variable [$folder]I get a compilation error:  Error and then code is includedbelow.  </p><p> </p><p>(SQR 5528) ORACLE OCIStmtExecute error 1788 in cursor 1:<br>ORA-01788: CONNECT BY clause required in this query block<br>SQL: SELECT level, ro_tree_entry_lbl, ro_childobjtyp_cd from<br>dss.ie_mstr_cat_alph_v<br>Error on line 28:<br>(SQR 3716) Error in SQL statement.<br><br></p><p> </p><p>begin-program<br>columns 2 7 12 17 22 27 32 37 42 47<br>do get_input<br>do main<br>end-program<br><br>begin-procedure main<br>begin-select<br>level &level<br>Move &level to #level<br>use-column #level<br>Print #level (+1) edit 888<br>!lpad(level,2*level -1)||' '||<br>ro_tree_entry_lbl &label (, +2)<br>ro_childobjtyp_cd &child (, +2)<br>from dss.ie_mstr_cat_alph_v<br>start with ro_tree_entry_lbl like [$folder]<br>connect by prior ro_child_tech_nm = ro_parnt_tech_nm<br>end-select<br>end-procedure ! main<br><br>begin-procedure get_input<br>Input $folder<br>Let $folder = '''' || $folder || ''''<br>end-procedure ! get_input<br></p>

    Jim - I don't really know, to be honest, but there's clearly a limit to how much APEX can work out at design time about what the query is going to do, especially what columns are going to be generated and how they are going to be presented.
    The other problem I've had is that when APEX is able work out what the query is going to do (and generates a set of report attributes to go with it), when the dynamic SQL changes this slightly, the region will break and show an error.
    So, for dynamic reports, I would always use the generic option.
    John.

  • Generating dynamic column in planning layout

    Hi Guys,
    I am new to BPS.. My task is user inputs calendar year thru variable, based on the year it has generate dynamic columns as month of the year entered by the user.
    Dnt know i am right or wrong based on the sdn threads. i think i have to create user input variable, and create a FM to read the user input value. Upto to this i can understand, after reading the user input how to calculate the months and generate 12 columns dynamically for each month...
    Kindly help me in this scenario..
    Edited by: kevin peterson on Jun 6, 2008 5:23 AM

    Hi,
    I hope you are using calendar year/month and calendar year characteristics. Create an user input variable for calendar year,
    create one exit variable for calendar year month.
    Inside this exit, read the value of the user input variable, append the year with all 12 months, so u get 12values for this exit variable.
    Now keep calendar year in header, restricted by user input variable, create one data column dynamic for calendar year month restricted by this exit variable. This will generate 12columns dynamically.
    Bindu

  • FOR XML to generate dynamic script to drop multiple tables

    Log_Table has a column named Col1 where we have table names
    Col1
    TableA1
    TableA2
    TableA3
    TableB1
    TableC1
    TableC2
    Generate dynamic script to drop tables that are in Log_Table and starts with TableA.
    Instead of using the loop, use For XML

    Thanks Visakh16 [+1],
    you are right there was typo mistake :-) I forgot the variable in the end, and Thanks Naomi [+1],
    this is true and better to use quotename or just add brackets. Actually I will not choose this approach since we chould use schema as well. the DDL in the OP is not something that I will create probably.
    In any case, here is the fixed query (current approach):
    declare @SQLString NVARCHAR(MAX)
    SELECT
    @SQLString = (select
    N'IF OBJECT_ID (N''' + CAST([Col1] AS VARCHAR(MAX)) + N''') IS NOT NULL drop table [' + CAST([Col1] AS VARCHAR(MAX)) + N']; '
    FROM Log_Table
    WHERE (Col1 like 'TableA%')
    FOR XML PATH (''))
    --print @SQLString
    EXECUTE sp_executesql @SQLString
    GO
      Ronen Ariely
     [Personal Site]    [Blog]    [Facebook]

  • Generating dynamic command links in data table

    Hi,
    I have a requirement to generate dynamic number of columns in a datatable. Also these columns should contain a command link.
    I have written following piece of code to do so...
    public UIData getDataTableBinding()
         UICommand comm = null;
         UIColumn col;
         UIOutput out = null;
         Application app = app = FacesContext.getCurrentInstance().getApplication();
    // Suppose I want to generate 7 columns
         for(int j = 0; j < 7; ++j) {
         out = new UIOutput();
         col = new UIColumn();
         comm = new UICommand();
         ValueBinding vb = app.createValueBinding("#{" + j + "}");
         out.setValueBinding("value", vb);
         out.setRendererType("javax.faces.Text");
         comm.setRendererType("javax.faces.Link");
    comm.getChildren().add(out);
         MethodBinding mbButton = app.createMethodBinding("#{pc_File1.doLink1Action}",
    null);
         comm.setAction(mbButton);
         col.getChildren().add(comm);
         dataTableTemp.getChildren().add(col);
         return dataTableTemp;
    I have bound the "binding" attribute of the data table to getDataTableBinding()
    method.
    If I remove all the references to UICommand i.e comm variable, table is displayed properly, but if
    I try to include a command link component as mentioned above I get "Assertion failed error"
    SRVE0068E: Could not invoke the service() method on servlet Faces Servlet. Exception thrown :
    javax.servlet.ServletException: javax.faces.el.EvaluationException: Error getting property
    'dataTableBinding' from bean of type pagecode.File1: javax.faces.FacesException: Assertion Failed
         at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:638)
         at com.ibm._jsp._File1._jspService(_File1.java:92)
         at com.ibm.ws.jsp.runtime.HttpJspBase.service(HttpJspBase.java:88)
    Any kind of help on this issue would be appreciated,
    Thanks in advance,
    Raina

    Hi,
    I solved my problem just by replacing UIOutput component with HtmlOutputText component and then making it as a child component of UICommand component.
    Now I am facing a new problem. Whenever I try to refresh the page I get following exception
    "SRVE0026E: [Servlet Error]-[Faces Servlet]: java.lang.IllegalStateException: Duplicate component ID 'form1:table1:cmd0' found in view."
    I am explicitly setting the component id of the UICommand component using the setViewId() method.
    This problem is observed only when I refresh the page. In case I navigate to another page and then again come back to this current page, then I don't get this exception.
    Your help would be appreciated,
    Raina

  • Formula- for generating a variable discount

    I need some help string some ifs together in a formula to dynamically generate a number. I'm not sure how to do it. 
    I have got as far as this. 
    =IF(H18<=5, 2)
    =IF(H18<=20, 10)
    =IF(H18<=50, 20)
    but not sure how to link them together or refine the number range in the same field. Any help or pointers appreciated.
    Graeme
    *_+Detail of what i'm trying to do+_*
    +I'm trying to create a formula to do the following:+
    +Variable 1 - Field A1+
    +(Number of units for sale-can be any number- user entered)+
    +Variable 2 -Field A2+
    +(variable discount % dynamically generated from variable 1)+
    +(discount to be applied later in the spreadsheet)+
    +So for example+
    +1-5 units get 2% discount+
    +6-20 units get 10% discount+
    +21-50 units get 20% discount+
    +And so on...+
    +So I assume I want to use the 'if' and that I need to use a string of several ifs. To dynamically generate variable 2. +
    +So assume I need to code the following:+
    +If A1 is less than or equal to 5 then return '2' to field A2+
    Or
    +If A1 is more than or equal to 6 and less than or equal to 20 then return '10' to field A2+
    Or
    +If A1 is more than or equal to 21 and less than or equal to 50 then return '20' to field A2+

    In this sheet I used two soluces.
    In cells of column B I inserted the formula :
    =IF(A<=0,0,IF(A<=5,2,IF(A<=20,10,IF(A<=50,20,"and so on"))))
    In cells of column C I inserted the formula :
    =VLOOKUP(A,look_in :: A:B,2,)
    From my point of view it's the best soluce because it's easy to enhance it.
    Yvan KOENIG (VALLAURIS, France) mardi 16 mars 2010 21:48:07

  • File name field not generating dynamic file name for report printing

    Hello Folks,
    I have a report region on a page and have enabled report printing. I would like to have the file name generated dynamically. So, I add the substitution string, say "&P1_CUSTOMER_NAME." (no quotes). The output file I get is literally named "&P1_CUSTOMER_NAME..pdf" (no quotes).
    I have seen several posts suggesting the file name field should accept this syntax but, I cannot get it to work.
    We are running Application Express 3.2.0.00.27 and BI Publisher.
    Any suggestions?
    Thanks for your help.
    -Markus B.

    I was finally able to make it work using a page process and the APEX_UTIL.DOWNLOAD_PRINT_DOCUMENT with a submit button.
    -Markus B.

  • Binding dynamic variable in XQuery doesn't work: ORA-00932

    I have a table with several columns. One of those columns is a XMLType.
    My goal is to have a query which selects rows from the table of which the XML column matches certain criteria.
    I'm trying following example (JDBC) : http://download.oracle.com/docs/cd/B28359_01/appdev.111/b28369/xdb_xquery.htm#insertedID11
    First, I created my own query, which looks like:
    select * from MyTable t, XMLTABLE( xmlnamespaces (DEFAULT 'http://test), 'for $i in /RootElement where $i/SubElement[contains(Element, "someValue")] return "true"' passing t.xmlColumn)This works as expected. Next, as done in the example, I'm trying to replace the "someValue" with a dynamic variable.
    Query then looks like:
    select * from MyTable t, XMLTABLE( xmlnamespaces (DEFAULT 'http://test), 'for $i in /RootElement where $i/SubElement[contains(Element, $val)] return "true"' passing t.xmlColumn, :1 as "val")This does not seem to work, neither in SQLDeveloper nor in java.
    I always get the :
    java.sql.SQLException: ORA-00932: inconsistent datatypes: expected - got CHAR(SQLDeveloper just gives ORA-00932)
    When I put $val between quotes (so "$val") then I get no error, but then I get no results either.
    I think it will not replace $val in that case but just use it as a literal, so thats not what I want
    I also tried to remove "contains" xpath and use the exact same example as on the oracle page
    select * from MyTable t, XMLTABLE( xmlnamespaces (DEFAULT 'http://test), 'for $i in /RootElement where $i/SubElement/Key = $val return "true"' passing t.xmlColumn, :1 as "val")But this doens't help either.
    I'm clueless about this, so any help would be appreciated
    Edited by: user5893566 on Nov 29, 2008 6:24 AM

    Ok, I tested it using the latest enterprise edition (11g) and there it works as expected.
    However, on 10.2.0.1.0 and 10.2.0.3.0 it gives this error.
    Is this a bug which has been fixed or should I do something special on 10g ?
    I installed all of these as normal without any special settings, created the tables and ran the query...

  • How do I use a dynamic variable from a prolog script?

    I have my test broken in to three scripts, a login, an update, and a logout. There is a dynamic variable, SERVICE_VIRTUAL_CLIENT, from the login script that I need to use in the update script, but I can't figure out how to do it. Any help would be appreciated.
    Edit: I forgot to mention that the login script is only run in the prolog portion of the UDP.
    Scott
    Message was edited by: scottmorgan

    Scott,
    You would do this the same way you would in a stand-alone script. Create the variable pattern in the login in script and name the variable. Save the login script and open the other script and select the parameter where you need the value. Set the parameter value to {{variableNameFromLogin}} (Variables are transferred from one script to the next in a UDP).
    I hope this makes sense

  • Dynamic variable Time for Select

    Hi,
    I try to develop some scripts but always I have the same problem , when I try to put in a Select instruction the variable Time, it doesn´t work correctly (for example):
    *SELECT(%example%,"ID","TIME","[ID]='%TIME_SET%' ")
    It doesn´t read correctly the variable Time_Set.
    Have you got any idea to try to do selects using dynamic variable?
    Thanks for all.

    Hi,
    Dynamic variables like %TIME_SET% do not interact very well with the compiled default logic (LGX files) when it is run after a data send. If you look at the Default.LGX file, you will notice that your *SELECT statement does not appear there because that *SELECT statement has already been compiled. That is why the logic works when it is run via the debugger (because the LGF file is getting executed at run time) and it does not work when it is run via a data send (because the LGX is being executed).
    What you will need to do is:
    1. Create a another logic file (for example: Calculation1.LGF) and copy the text from the Default.LGF to this new logic file.
    2.  Place the following text in the Default.LGF file:
    *RUNLOGIC
    *LOGIC=Calculation1.LGF
    *ENDRUNLOGIC
    3. Validate and save the Default.LGF file
    Now try running the logic after a data send and see if that works.
    Good luck,
    John

  • Generate dynamic hyperlinks in PDF

    Hi,
    I am using CF8. I want to generate dynamic hyperlinks for each Form field in a PDF template. Could you please suggest a solution to achieve this?
    Many Thanks.

    thread re-created! :(
    please see: Dynamic PDF Bookmarks/Hyperlink Generation in RTF template.
    Edited by: Mukunthan L on Jan 20, 2010 1:35 AM

Maybe you are looking for

  • The difference between iPhone and iPod earphones with mic ?

    What is the difference between the Apple iPhone Headset with Microphone and the Apple Earphones with Remote and Mic ?

  • White dots on Samsung TV

    I to am having whie dot problems. Just a month ago our 65" tv would keep cutting itself on and off. I called Samsung. Our TV was bought in 2007 so I was told it was out of warranty. I was told that a serviceman would contact me. He called the cost up

  • Yahoo loads log in click mail 404 error page not found why?

    I upload yahoo site, log in, click 'mail' and am given a '404' error; page not found... This does NOT happen on Chrome or IE, but the pages of yahoo on IE suck and Chrome won't let me have a single toolbar even though there are all sorts of claim you

  • Unit Tests for Beckend Beans?

    Does anybody has any idea how to write Unit Tests for JSF Beckend Beans? Especially if they are using session and request objects. How can I simulate Session for example?

  • How to add PDF files

    Greetings, I'm curious to know if, within Muse, I can add a link to PDF files that open in a new tab or browser window, that includes the resident PDF reader.  Any suggestions? Thank you for yur assistance. Smiles, Kyle