Updating dynamically created TextField

The following for loop dynamically creates 4 instances of the
same button. Each button is then populated with its own textfield.
I have given the textfield(s) an instance name of option0, option1,
etc, etc.
I want to populate the text in each field with something
different (Home, Contact, etc, etc).
I am trying to call the textField by its created instance
name "option0", but I get an error saying it's not recognized. Any
ideas on how to accomplish this?
Here is the code thus far:

Thanks for your response Ned.
I have been trying to use your method, but still get errors
stating the "access of undefined property option0".
When I use your above suggestion the for loop returns [object
TextField] 4 times which is expected. How do i assign a property to
the qbTF?
Should I be trying to assign a property to "option0" or
[object TextField]? I'm assuming it's the latter.

Similar Messages

  • Dynamically created textfields problem

    Hi people,
    I have a strange problem here: I want to create textfields
    dynamically that are just big enough to hold the text to display.
    The textfields use a font from the library. I get the metrics of
    the text with TextFormat.getTextExtent(), it seems to work ok.
    However, the last letters of the text are missing in the textfield
    after assigning the text, when the text needs more than 1 line. The
    textfield is sized for 2 lines, but the 2nd line is just empty. I
    applied wordWrap, but the text doesn't show at the 2nd line. This
    seems to be connected to the font that is used: I tested about a
    dozen different types, and only 1 of them displays always the full
    text, with all other fonts, the last 6 or so letters are missing.
    The text property of the textfields holds the complete text; where
    are the last letters?
    So, are there any known issues with textfields created
    dynamically? Or any trick to display all of the text? I'd like to
    use a monospaced font, but all I have tested have this strange
    problem.
    Attached is the code used for creatiing the textfields.
    blemmo

    Yep, the reason is I never tried that. :)
    No... I'm just about to give it a try, but I want to draw a
    fancy border around the textfield (other than the border that comes
    with the textfield), so I guess I'll need the metrics info anyway.
    Another thing is that I want the width to be not more than 150,
    gotta check if that's possible with auto-size. Have to try that
    now... thx for the input!
    blemmo

  • Help Required: Updating Multiple dynamically created rows in database

    Hi All,
    In my jsp page I am retriving the values from the database and displaying in the jsp page, the columns are studentID and student name. Now for each studentID i am creating two textfields as date of birth and parent name.
    my code snippet is as follows
    while(rs.next())
    <tr>
    <td><%=studID%></td>
    <td><%=name%></td>
    <td><input type="text" name="DOB<%=studID%>"></td>
    <td><input type="text" name="PName<%=studID%>"></td>
    </tr>
    from the above code i am getting dynamically create textfield whose names are
    <input type="text" name="DOB10001">
    <input type="text" name="PName10001">
    and so on now how can i capture all these values and update the corresponding records in the database.
    Please help me in this
    Thanks in advance

    well in that case u can do this
    int i=0;
    while(rs.next())
    <tr>
    <td><%=studID%></td>
    <td><%=name%></td>
    <td><input type="text" name="DOB<%=i%>"><input type="hidden" name="h_DOB<%=i%>" value="<%=studID%>" ></</td>
    <td><input type="text" name="PName<%=i%>"></td>
    </tr>
    <%i++%>
    <input type="hidden" name="RecordCount" value="<%=i%>" >
    when u submit this for then in the other jsp u can read the data from query string
    int li_rec_count = Integer.parseInt(request.getParameter("RecordCount"));
    for(int i=0;i<li_rec_count;i++)
    String studID = request.getParameter("h_DOB"+i);
    String dob = request.getParameter("DOB"+i);
    String pName = request.getParameter("pName"+i);
    create your sql statment and update for each studID
    }

  • Dynamically created HTMLDataTable does not update its chlidren

    I have a very delicate problem that I hope to get help with. I have created a HTML data table dynamically in the Java code. The left-most column contains a checkbox so that I can select and deselect rows in the table. The problem is that the checkbox value is only read from my backing bean but changes to it are not written back.
    The strange thing is that if I create exactly the same data table statically (i.e., as tags in the JSP-page) everything works perfectly fine.
    Is there some strange property that needs to be set when creating the data table dynamically that the JSF-framework automatically sets when it creates the table from the tags?
    Below you see the code for the creation:
    HtmlDataTable component = new HtmlDataTable() ; 
    CColumnHeader   column;
    UIColumn        tableColumn;
    tableColumn = new UIColumn();
    HtmlOutputText textHeader = new HtmlOutputText() ;
    textHeader.setValue("");
    tableColumn.setHeader(textHeader);
    HtmlSelectBooleanCheckbox tCheckBox = new HtmlSelectBooleanCheckbox() ;
    tCheckBox.setValueBinding(  "value", FacesContext.getCurrentInstance().getApplication().createValueBinding("#{data.subItems[0].selected}")) ;                       
    tableColumn.getChildren().add( tCheckBox ) ;
    component.getChildren().addAll( this.uicolumns ) ;
    JSF tag is defined as...
    <h:dataTable id="table" value="#{bean.model}" binding="#{bean.component}" var="data" />This do not work!
    However, the below code do...
    <h:dataTable id="table2" value="#{bean.model}" var="data">
    <h:column >
    <f:facet name="header">
         <h:outputText value="" />
    </f:facet>
    <h:selectBooleanCheckbox value="#{data.subItems[0].selected}" />
    </h:column>
    </h:dataTable>          For what I know these to examples should be equivalent.
    Furthermore, I noticed in the debugger that the attributes of my dynamically created table was not the same as the attributes on the one that JSF created for me. For example, each component that JSF created has got a map entry with the key javax.faces.webapp.COMPONENT_IDS for a ListArray containing the ids of its children. However if I try set this attribute in my code the column is not rendered at all. The UIColumn in the JSF-created table did have a javax.faces.webapp.FACET_NAMES=[header] in its attribute map. I don�t know if this has something to do with it, it was just one thing I noticed.
    Is this a bug or am I missing something?

    Why is that?
    What is it that actually goes wrong here? The two example works
    exactly the same in every aspect but in the first example, the JSF-
    framework only calls the getter method of the selected property and the
    latter case it calls both the getter and the setter. Otherwise the two
    tables works correctly.
    I use the binding attribute to be able to create the HtmlDataTable
    before the actual page is loaded and dynamically populate it with
    different numbers of columns depending on different system states.
    This is the reason why I have to create it dynamically and why I have to
    use the binding attribute.
    What is the reason for this not working? Am I breaking anything in the
    specification?
    What do you mean by "...with the hope that JSF will draw.."? It's is
    drawn, it is just the setter method that is not beeing invoked correctly.

  • Upgrade from CS4 to CS5: Dynamically created text isn´t shown anymore.

    Hello,
    since I have updated my Flash CS4 to CS5, textfields that have been dynamically created inside external classes aren´t filled with text anymore. At least they exist; the cursor appears, when I roll over the place, where it has been placed.
    This is how I place it:
    1. The font is embeded as Font-Symbol inside the library. Name: "BertholdWalbaumBook", Linkage: "BertholdWalbaumBook";
    2. Code:
              moreInfoButtonText = new TextField();
              moreInfoButtonText.text = "More Info";
                   //TEXTFORMAT
                var pre_Disco_RecordStandard_TextFormat:TextFormat = new TextFormat();
                pre_Disco_RecordStandard_TextFormat.align = TextFormatAlign.LEFT;
                pre_Disco_RecordStandard_TextFormat.color = "FFFFFF";
                pre_Disco_RecordStandard_TextFormat.font = "BertholdWalbaumBook";
                pre_Disco_RecordStandard_TextFormat.leading = 3;
                pre_Disco_RecordStandard_TextFormat.size = 14.62;
                pre_Disco_RecordStandard_TextFormat.letterSpacing = 0;
                //COORDINATES
                moreInfoButtonText.x = moreInfoButtonBG.x+5;
                moreInfoButtonText.y = moreInfoButtonBG.y-30;
              //TEXTFIELD
                moreInfoButtonText.embedFonts = true;
                moreInfoButtonText.setTextFormat(pre_Disco_RecordStandard_TextFormat);
                moreInfoButtonText.antiAliasType = AntiAliasType.ADVANCED;
                moreInfoButtonText.sharpness = -400;
                moreInfoButtonText.thickness = -200;
                moreInfoButtonText.autoSize = TextFieldAutoSize.RIGHT;
                moreInfoButtonText.wordWrap = true;
                moreInfoButtonText.multiline = false;
              //ADD CHILD
                addChild(moreInfoButtonText);
    When I set       moreInfoButtonText.embedFonts = false;    the text is shown with system font, so the problem must cohere with embedding.

    In case you haven't seen these
    http://www.dotstrosity.net/2010/05/10/flash-cs5-font-embedding-its-totally-different/
    http://kb2.adobe.com/cps/831/cpsid_83162.html

  • Printing all text in a dynamic scrollable textfield

    Hi,
    I have search alot about solutions for solving the problem
    about trying to print all text in a dynamic Scrollable Text. There
    is no answer for this. So, is there a simpel way to print all the
    text in a dynamic scrollable textfield?
    Because the text is dynamic, there is possible that the text
    can be 1- 100 pages.
    Please help me out.
    [email protected]
    [email protected]

    Is there an easy way to determine the character count that is visible in a given multi-line text field when designing the form, so if I want to allow 500 characters, the text box I create is large enough for 500 characters?  Obviously I can just do a trial and error process using a cut and paste of 500 characters and testing it, but is there an easier way?

  • Adding AJAX support for dynamically created panelGrid components

    Hi everyone!
    I would like to ask help from anyone who may have encountered similar problem before...
    I have a panelGrid whose component is dynamically created by the backing bean. Here is my JSF code:
    <h:panelGrid styleClass="panelGrid"
              rowClasses="tsPanelGridRowClass" columns="8" cellpadding="0"
              cellspacing="2" bgcolor="transparent" style="margin-left: 10px"
              id="revCenterItemPanelGrid"
              binding="#{pc_Touchscreen_pull_select_item.revCenterItemPanelGrid}">
    </h:panelGrid>And here is the code for backing bean that adds content inside the panelGrid:
    HtmlOutputText index = (HtmlOutputText) app.createComponent(HtmlOutputText.COMPONENT_TYPE);
    index.setId("1");
    index.setValue(String.valueOf(1));
    index.setStyle("datagridtext");
    revCenterItemPanelGrid.getChildren().add(index);On click of a button...
    <a4j:commandButton value="Update"
              styleClass="commandExButtonPou2" id="button1" reRender="revCenterItemPanelGrid"
              actionListener="#{pc_Touchscreen_pull_select_item.doSortActionListener2}">
              <f:attribute name="order" value="2"></f:attribute>
              <f:attribute name="toggleState" value="off"></f:attribute>
    </a4j:commandButton>the backing bean is supposed to update the value of the outputText
    doSortActionListener2() {
    HtmlOutputText index = (HtmlOutputText) app.createComponent(HtmlOutputText.COMPONENT_TYPE);
    index.setId("2");
    index.setValue(String.valueOf(2));
    index.setStyle("datagridtext");
    revCenterItemPanelGrid.getChildren().add(index);
    }However, update doesn't seem to work. I have been successful in adding ajax support to a panelGrid that is not dynamically created but not for this one.
    Has anyone encountered this error before? Any ideas?
    Thanks in advance!

    Hi everyone!
    I would like to ask help from anyone who may have encountered similar problem before...
    I have a panelGrid whose component is dynamically created by the backing bean. Here is my JSF code:
    <h:panelGrid styleClass="panelGrid"
              rowClasses="tsPanelGridRowClass" columns="8" cellpadding="0"
              cellspacing="2" bgcolor="transparent" style="margin-left: 10px"
              id="revCenterItemPanelGrid"
              binding="#{pc_Touchscreen_pull_select_item.revCenterItemPanelGrid}">
    </h:panelGrid>And here is the code for backing bean that adds content inside the panelGrid:
    HtmlOutputText index = (HtmlOutputText) app.createComponent(HtmlOutputText.COMPONENT_TYPE);
    index.setId("1");
    index.setValue(String.valueOf(1));
    index.setStyle("datagridtext");
    revCenterItemPanelGrid.getChildren().add(index);On click of a button...
    <a4j:commandButton value="Update"
              styleClass="commandExButtonPou2" id="button1" reRender="revCenterItemPanelGrid"
              actionListener="#{pc_Touchscreen_pull_select_item.doSortActionListener2}">
              <f:attribute name="order" value="2"></f:attribute>
              <f:attribute name="toggleState" value="off"></f:attribute>
    </a4j:commandButton>the backing bean is supposed to update the value of the outputText
    doSortActionListener2() {
    HtmlOutputText index = (HtmlOutputText) app.createComponent(HtmlOutputText.COMPONENT_TYPE);
    index.setId("2");
    index.setValue(String.valueOf(2));
    index.setStyle("datagridtext");
    revCenterItemPanelGrid.getChildren().add(index);
    }However, update doesn't seem to work. I have been successful in adding ajax support to a panelGrid that is not dynamically created but not for this one.
    Has anyone encountered this error before? Any ideas?
    Thanks in advance!

  • Problem with dynamically created columnchart (FB 4 and 4.5)

    I have an application (written in FB4 but I've imported to FB4.5 with no difference in behaviour) which dynamically creates cartesian charts. The total column values should be the same but the user can group them according to different fields. This works fine except for one of the possible grouping options. When that is used, I can see that all the data is present in the dataprovider, but one of the groups is just not shown - or rather when you hover over the column it shows "0" as the value for that group.
    This is the code I run when the HTTP query comes back:
    private function gotGroupHistory():void{
        if (hsGroupHistory.lastResult.list.item is mx.utils.ObjectProxy) {
            histModelSource = new ArrayCollection;
            histModelSource.addItem(hsGroupHistory.lastResult.list.item);
        } else {
            histModelSource = hsGroupHistory.lastResult.list.item;
        var grouparray:Array=new Array();
        var cset:ColumnSet = new ColumnSet;
        cset.type="stacked";
        var csplan:LineSeries=new LineSeries();
        csplan.displayName="Target";
        csplan.yField="plan";
        for each(var thisitem:String in chartgroups) {
            var cs:ColumnSeries=new ColumnSeries();
            cs.yField=thisitem;
            cs.displayName=thisitem;
            cset.series.push(cs);
            columnchart1.series=[cset];
            columnchart1.series.push(csplan);
            columnchart1.invalidateSeriesStyles();
            columnchart1.series=columnchart1.series;
            legend1.dataProvider=columnchart1;
    As I said everything appears to be correct - the data provider has the data for all the groups but just 1 of them is not displayed. The legend also shows the name of the missing group. I really cannot figure out what is going on. Can anyone suggest my next line of investigation please?
    Thanks
    Martin

    This problem is solved after updating to IOS 7.

  • Passing variables from a dynamically created textinput in AS2?

    Hey everyone,
    I have a contact form in my flash file with name/email/message fields which a user can fill out and then click send, which passes these to a php script which then emails the information that they entered. This works fine when the text inputs are manually placed on the stage and all the information is passed to the php script and emailed to me. I am just updating it so the textinputs are created via AS2 so that I can style them more easily etc. This is fine however when created via script they no longer get passed to my php file. I am creating the textinput using the following code (which works fine):
    var my_fmt:TextFormat = new TextFormat();
    my_fmt.bold = false;
    my_fmt.font = "Arial";
    my_fmt.color = inputcol;
    contact_form.createTextField("contact_name", getNextHighestDepth(),112.6, 27, 174, 20);
    contact_form.contact_name.wordWrap = true;
    contact_form.contact_name.multiline = false;
    contact_form.contact_name.border = true;
    contact_form.contact_name.borderColor = inputcol;
    contact_form.contact_name.type = "input";
    contact_form.contact_name.setNewTextFormat(my_fmt);
    contact_form.contact_name.text = "";
    FYI I am creating this outside the movieclip containing the form (called contact_form) and then adding it into that mc specifically because I thought this may be necessary as doing it within the mc itself (using this.createTextField....) didn't work, however both seem to have the same effect.
    I am then doing various checks on the input box contents (to make sure it's not empty etc), this also works fine and gives me the relevant error if it is empty so it's accessing it correctly. I then use the following code to submit the variables and check_status checks the success/failure of the php script and alerts the user accordingly:
    loadVariables("http://www.makeaportfolio.com/send_email.php?flashmo=" + random(1000), this, "POST");
    message_status.text = "sending....";
    var interval_id = setInterval(check_status, 400);
    This works fine however does not pick up the value of the dynamically created text input (however does pick up all the text inputs that are manually added to the stage). I am rather confused as to why it's not picking this up and am not sure how I set it to do so, i would be immensely grateful if someone could point me in the right direction?
    Thanks so much for your help as ever,
    Dave

    Hi kglad,
    I'm sorry but i still don't understand what you mean? They are all text inputs which are defined in AS2 (you can see the code in my first post), the values (inputtext.text) are surely set by the user when they enter information into the input boxes. Accessing these works fine within my flash file, they just don't get passed to my php file. I got round this by manually creating duplicate textinputs on the stage for each dynamically created textinput which are all hidden, then assigning the values of the dynamically created inputs to the manually created inputs before loading the php file. This works fine as it picks up the manually placed inputs as local. I assume it's something to do with the scope of the dynamically created inputs but I cannot work out how you would ensure they would be picked up as even when you explicitly create them within the relevant mc it doesn't pick them up. As I say i've managed to get it working in a rather convoluted way which is good but would be most interested to understand why the other method doesn't work.
    Thanks so much for your help,
    Dave

  • Futureproof and dynamically created button

    I have been looking solution how to make buttons dynamically so that I can fetch dynamically values for buttons:
    - value,onclick,class,type,request
    This excellent page has very closely what I am looking: http://www.laureston.ca/2012/04/20/simple-workflow-implementation-in-apex/
    but I have challenges getting the escaped special characters to work especially for the apex.submit - part.
    Maybe that is just because 'copy-pasting' the plsql-region code from www-page didn't work out of the box
    Application Express 4.2.3.00.08
    Because dealing with the escape chars make the page easily break and there are now the new dynamic actions, I need to check what would be futureproof way of dynamically creating the buttons.
    If this is anyway the most practical way to proceed, then where I should look for further information about htp.p(....) button creation examples with rich escapes?
    Made small test page, where you can see one of my trials trying to get the escapes right.
    user test
    pass test
    http://apex.oracle.com/pls/apex/f?p=1403:2
    rgrds paavo
    --below the code for dynamic plsql region -- very likely the escape chars are not copypasted and shown correctly:
    DECLARE
    --PL/SQL Dynamic Region
    --thisworks too??
      v_showme varchar2(3000);
    BEGIN
      for c in (select sysdate||'asdasd;asdasas'  as button_label
                , 'PIMREQUEST'  as button_request
                , 'button-gray' as button_class
                , 'button'      as button_type
                , 'P38_XPIMPOM' as button_setme
                , 'JUUSTOA'     as button_setme_value
                from dual) loop
    htp.p('<button value='''||c.button_label||''' onclick=\"apex.submit('''||c.button_request||''');'' class='''||c.button_class||''' type='''||c.button_type||'''>
    <span>'||c.button_label||'</span>
    </button>');
      end loop;
    END;

    Hi Paavo,
    Your right about the button_id. It's value comes from an input parameter. The button won't show up in the "When button pressed"-list_of_values. This is not only because you write the id yourself, but more because the entire button is created on the fly. The button isn't stored internal in an apex table, that's why it won't show up in a list of values.
    If you want to trigger a dynamic action with the button, you can use a jQuery selector as triggering element. Here you can refer to the button_id using the '#' as jQuery marker for ID, e.g. '#myButton'.
    What the button that you render does, depends on what you put in the p_link parameter. A normal save button would submit the page with condition 'SAVE', you can do that by setting p_link to 'apex.submit("SAVE")'. If the button should do a page redirect, you set p_link to 'http://www.page2go.com', or whatever url you wish to redirect to.
    The text you put in the button attributes is added as HTML element definition, so if you set p_attrs to 'alt="alternate text"', that will be added to the html of your button.
    An example for a conditional button call could be:
          if p_order_id is null
          then
            create_button
              ( p_id        => 'newOrder'
              , p_link    => 'javascript:apex.submit("CREATE"');'
              , p_label     => 'New Order'
              , p_css       => 'customButton'
          else
            create_button
              ( p_id        => 'updateOrder'
              , p_link    => 'javascript:apex.submit("SAVE"');'
              , p_label     => 'Update Order'
              , p_css       => 'customButton'
          end if;     
    This would create a 'CREATE' button for a new order (p_order_id is null), or a 'SAVE' button for an existing order.
    Regarding your ps: if you mean can you conditionaly create a button using dynamic actions? Then the answer would be yes. Yes you can use the create_button procedure in a dynamic action, however by writing it as stored procedure in the database, or in a database package, you can easily reuse your code and still have only one version of your procedure that you need to maintain.
    Regards,
    Vincent
    http://vincentdeelen.blogspot.com

  • Dynamically created COLLAPSIBLE PANELS

    In case this might help others, I thought I would share how I
    dynamically create Collapsible Panels using MySQL, PHP, and SPRY.
    Please note that I am not a master PHP coder and so there might be
    a more efficient method but this does work great for me. Here is my
    scenario. I have a MySQL table which holds a list of user
    applications. Some applications then have individual modules which
    are stored in a seperate table and related to applications by
    app_id. I want to display the list of applications and then for
    applications that have modules I create a collapsible panel to
    display the modules.
    My Applications:
    mysql_select_db($database_ppg_conn, $ppg_conn);
    $query_applications = "SELECT * FROM applications ORDER BY
    active desc, name ASC";
    $applications = mysql_query($query_applications, $ppg_conn)
    or die(mysql_error());
    $row_applications = mysql_fetch_assoc($applications);
    $totalRows_applications = mysql_num_rows($applications);
    code for application lists and collapsible panels:
    <div id="maincontainerbox" align="center">
    <div class="ppgaccounthdr">
    PPG Applications
    </div>
    <div class="ppgaccountrow_active">
    <a href="ppgaccounts_update.php?app=new">Add New
    Application</a>
    </div>
    <?php
    $icount = 0;
    do { ?>
    <?php switch ($row_applications['modules']) {
    case "Y":
    $modules = 1; //flags the building of collapsible panel to
    display available modules for current application.
    ++$icount; //tracks # of applications that have modules.
    This is used to properly create multiple collapsible panels.
    break;
    default:
    $modules = 0; //no modules for current app
    break;
    } ?>
    <?php switch ($row_applications['active']) {
    case "Y":
    if ($modules == 1) {
    echo '<div id="CollapsiblePanel'.$icount.'"
    class="ppgaccountrow_active1"><div
    class="ppgaccountrow_active">';
    } else {
    echo '<div class="ppgaccountrow_active">'; }
    break;
    default:
    echo '<div class="ppgaccountrow_notactive">';
    break;
    ?>
    <a href="ppgaccounts_update.php?app=<?php echo
    $row_applications['id'];?>"><?php echo
    $row_applications['name']; ?></a>
    <?php if ($modules == 1) {
    echo '</div>';
    echo '<div class="CollapsiblePanelContent">';
    $query_appmodules = "SELECT *
    FROM app_modules
    WHERE app_id = {$row_applications['id']}
    ORDER BY active desc, name ASC";
    $appmodules = mysql_query($query_appmodules, $ppg_conn) or
    die(mysql_error());
    $row_appmodules = mysql_fetch_assoc($appmodules);
    $totalRows_appmodules = mysql_num_rows($appmodules);
    echo '<div class="appmodulerow_active">';
    echo '<a
    href="ppg_app_modules_update.php?id=new&app_id='.$row_applications['id'].'">Add
    New Module</a>';
    echo '</div>';
    do {
    switch ($row_appmodules['active']) {
    case "Y":
    echo '<div class="appmodulerow_active">';
    break;
    default:
    echo '<div class="appmodulerow_notactive">';
    break;
    echo '<a
    href="ppg_app_modules_update.php?id='.$row_appmodules['id'].'"
    title="Update Application
    Module">'.$row_appmodules['name'].'</a></div>';
    } while ($row_appmodules = mysql_fetch_assoc($appmodules));
    mysql_free_result($appmodules);
    echo '</div>';//close content div for collapsible
    panal
    } ?>
    </div>
    <?php } while ($row_applications =
    mysql_fetch_assoc($applications)); ?>
    </div>
    So when my application record has a flag saying that it
    possesses modules I increment $icount and then use
    echo '<div id="CollapsiblePanel'.$icount.'"
    class="ppgaccountrow_active1"> to build the collapsible
    panel. Notice the $icount in the div id. Now at the bottom of the
    HTML I do the following.
    <?php
    $i = 0;
    do {
    ++$i;
    echo 'var CollapsiblePanel'.$i.' = new
    Spry.Widget.CollapsiblePanel("CollapsiblePanel'.$i.'",{contentIsOpen:false});';
    } while ($i <= $icount);
    ?>
    //-->
    </script>
    This creates a collapsiblepanel for each application which
    has modules.
    I hope I have described this ok and that it might help
    somebody out. If you have suggestions on how to do it better then
    please do let me know.
    Thanks,
    Lee Goolsby

    Nice. Thanks for posting this, Lee.

  • Inventory forecast help - dynamically creating formulas?

    Post Author: ddenise
    CA Forum: Formula
    I am writing a report that reconciles sales orders to inventory - essentially, group sales orders by the scheduled production date, list out all the parts that are needed and forecast the impact on inventory, highlighting any areas where inventory is foretasted to go negative. The results right now look like this:                               Part          In Inventory          Needed         Inventory RemainingOrder Number 567     Product Number 311187          Part Number 8111234          100                  5                  95          Part Number 8111235      Product Number 311189          Part Number 8111234          100                 6                  94
              Part Number 8112235 You can see the problem is that once I calculate "Inventory Remaining", the next instance of part 8111234, should have an "In Inventory" value of 95, NOT 100, but 100 is what is stored in the database.  The next time that part number is used, the database value is pulled and 100 is displayed.  A running total or summary won't work because they cannot be used on 2nd pass formulas/variables; "Inventory Remaining" is a formula evaluated on the 2nd pass.The result that I NEED to come out would be:                                Part          In Inventory          Needed         Inventory Remaining
    Order Number 567
         Product Number 311187
              Part Number 8111234          100                  5                  95
              Part Number 8111235
          Product Number 311189
              Part Number 8111234          95                  6                  89
              Part Number 8112235  So.... I am thinking that I need to create a formula that does the following while records are printed:Check to see if a variable whose name is equal to the part number that is being printed (in this case "8111234") and if it doesn't exist, then create it, setting it's value to what is in the database (in this case "100")Use the variable's current value, subtract the quantity of those parts that are needed for the current record being printed and updated the variable's value to this difference.If the variable does already exisit, then use it's current value to display in the "In Inventory" column and,Use the variable's current value, subtract the quantity of those parts
    that are needed for the current record being printed and updated the
    variable's value to this difference.What this would do is essentially, dynamically create variables that can be used for display and other evaluation and update the particular variable that is related to the part number that is being printed. Has anyone done anything like this before?  I'm sure I'm not the first to encounter this situation.  Also, if there are other ways to solve this problem that Crystal can handle, please advice - I cannot seem to find any other solution. Regards,  

    XtrmeMelissa wrote:
    Haha! I got all the formulas down except for the boxes but thank you so much!
    I do have a new problem that just arrived, how can I get it to clear itself after I'm finished? So that it acts like a calculator and the columns are automatically cleared and the bars on hand turns into the total bars amount?
    It sounds very difficult
    Melissa
    Message was edited by: XtrmeMelissa, sorry about this! Boss brought up something new
    Melissa,
    I anticipated that problem and that's why I proposed the structure that I did.
    Good luck,
    Jerry

  • Dynamically creating XML using Sap-xMII Colum and Row Action Block

    Hi,
    I am trying to create a xMII-format XML using IlluminatorDocument Action Block.
    My problem statement is during run time I am required to create columns on the fly.which I have done using xMII Colum Action block.but now I am required to assing values to these dynamically created columns.I have tried using Data Item and Row action block but am not sucessful in doing so.Can anyone help in creating this xml Dynamically.
    The steps that I have followed is
    defined
    tagquery action block and defined tagquery
    blank Illuminator Document Action block
    put a repeater on result of tag query
    set a counter
    updated the counter
    used column action block and mapped the column name i.e IlluminatorColumn_0.Name------"test"&Local.count
    my column output looks like
    Rowsets DateCreated="2007-03-27T12:59:39" EndDate="2007-03-27T11:42:40" StartDate="2007-03-27T11:42:40" Version="11.5.0">
         <Rowset>
              <Columns>
                   <Column Description="" MaxRange="100" MinRange="0" Name="test1" SQLDataType="1" SourceColumn="test1"/>
                   <Column Description="" MaxRange="100" MinRange="0" Name="test2" SQLDataType="1" SourceColumn="test2"/>
                   <Column Description="" MaxRange="100" MinRange="0" Name="test3" SQLDataType="1" SourceColumn="test3"/>
                   <Column Description="" MaxRange="100" MinRange="0" Name="test4" SQLDataType="1" SourceColumn="test4"/>
                   <Column Description="" MaxRange="100" MinRange="0" Name="test5" SQLDataType="1" SourceColumn="test5"/>
              </Columns>
    </Rowset>
    </Rowsets>
    after this action block i want to assign values to each column i.e
         <Row/>
              <Row/>
              <Row/>
              <Row/>
              <Row/>
    i.e erach row tags should be filled with columntag and value
    but i am not able to achieve the same
    Can anyone help me doing this

    After adding IllumColum Action block I have created 5 columns dynamically
    but now I am unable to add row.
    currently for everycolumn created it is giving one row  without any column node
    the configurations that I have done in Data Item Action Block is
    In My Link Editor
    IlluminatorColumn_0.Name----
    >IlluminatorDataItem_0.Name
    hardcoded the value i.e 20----
    >IlluminatorDataItem_0.Value
    IlluminatorDocument_0.Output----
    >IlluminatorDataItem_0.IlluminatorDocument
    current resultset I am getting is
    <?xml version="1.0" encoding="UTF-8"?>
    <Rowsets DateCreated="2007-03-27T12:59:39" EndDate="2007-03-27T11:42:40" StartDate="2007-03-27T11:42:40" Version="11.5.0">
         <Rowset>
              <Columns>
                   <Column Description="" MaxRange="100" MinRange="0" Name="test1" SQLDataType="1" SourceColumn="test1"/>
                   <Column Description="" MaxRange="100" MinRange="0" Name="test2" SQLDataType="1" SourceColumn="test2"/>
                   <Column Description="" MaxRange="100" MinRange="0" Name="test3" SQLDataType="1" SourceColumn="test3"/>
                   <Column Description="" MaxRange="100" MinRange="0" Name="test4" SQLDataType="1" SourceColumn="test4"/>
                   <Column Description="" MaxRange="100" MinRange="0" Name="test5" SQLDataType="1" SourceColumn="test5"/>
              </Columns>
              <Row/>
              <Row/>
              <Row/>
              <Row/>
              <Row/>
         </Rowset>
    </Rowsets>

  • Dynamically Created Trigger

    I have a Java application using Business Components. The connection was created using the connection wizard and a standard userid, password is passed to the connection. The application is deployed and launched using JWS. I dynamically create the JNLP tag in a JSP file and pass in the current user identification as a system resource. The html page that holds the link to the JSP page is protected under SSO so I can validate the user id and I know when the application is launched that it is launched by a valid user. The application is launched and I can retrieve the user id by calling System.getProperty(userID).
    So - Now that I have the user ID I would like to pass this on to the database for tracking purposes. Every time I insert/update on a table I would like a trigger that sets the userid and current date for that record.
    I have the trigger written for the current date - that was easy enough..
    TRIGGER "SPECIES"."PLANTCOMMITDT" BEFORE INSERT OR UPDATE ON "SPECIES"."PLANT"
    REFERENCING OLD AS OLD NEW AS NEW
    FOR EACH ROW
    BEGIN
    :new.Commitdt:=SYSDATE;
    END;
    The problem is how can I add the userid to this trigger? I have the userid but in the application - not in the database. Can you dynamically create a trigger? So I can pass in the userid from the application?
    Any help would be appreciated!

    hi,
    Could you please log this issue as a bug . The bug form requests for appropriate info to reproduce the bug.
    Bug report url:
    http://developers.sun.com/prodtech/javatools/jscreator/support/index.jsp
    Click on Bug Report / Feature Request
    Thanks
    K

  • Dynamically creating DataSources

    Our current client requirements dictates that as new Engineering projects are started that a seperate instance of our Engineering database needs to be set up. I have a login screen in which a user enters the project number they need to connect to and the application then connects to the correct DataSource and everything works as planned. However, new projects are added daily and I need to be made aware of the additions and update the datasources.xml then restart oc4j. This is becoming a maintenence nightmare. The way I plan on circumventing this is to catch the NamingException when a lookup on a nonexistent datasource is done then dynamically create the datasource by modifing the datasources.xml file. This I have succeeded in doing but the oc4j container still requires a restart. Can I programitically bind the required datasources to the JNDI tree so they are available without a restart or is there some other way I could accomplish this.

    Buster -- You cannot programmatically bind the data source but you could call out to admin.jar to create a new data source for you and then you do not need to restart OC4J.
    Thanks -- Jeff

Maybe you are looking for