Grabbing Array Value and setting a hidden input

Not sure if anyone can help but I am having an issue grabbing a certain value from an array and setting a hidden input inside a loop that then is grabbed outside the loop using a document.getElementById.
Example to what I am trying to do.
I have a Oracle Package that returns an array for a shopping cart. Each line has its on value and the value can either be 'N', 'P', or 'Y'. Depending on if any of the lines return an 'N' or a 'P' then something else needs to happen.
So say I have a cart that has 5 lines in it.
Line 0 = 'Y'
Line 1 = 'N'
Line 2 = 'N'
Line 3 = 'Y'
Line 4 = 'Y'
Since one of the lines returns an 'N' I now want to set a hidden input with a value of 'N'. (Right now I have it setting that value in the cart display loop, which maybe be wrong.)
<input type="hidden" id="AllowCheckOut" name="AllowCheckOut" value="N">
Once the hidden input is set then outside the loop I am doing the following to determine if the 'Checkout' button should be displayed or not.
if (document.getElementById('AllowCheckOut').value == "N") {
isDisabled = true;
The reason I am having to do it this way is because the 'Checkout' button is at the parent .jsp page and this is being determined in the child .jsp page.
The problem I am having is even though I am doing an if else logic in the loop to look for an 'N' value which it does find, but it looks like it is always setting the hidden input value to whatever the last line value is which is 'Y' instead of setting it to 'N' since one of the lines had an 'N' in it.
If anyone understands what I am trying to do can you please explain what I may be doing wrong or need to do.
Thanks

Also you have strings there delimited by single quotes, which is invalid in Java.
Are you sure this is Java and not Javascript?
Though a cart implemented in Javascript seems problematical to me.

Similar Messages

  • How to get the kerning value and set it to back use script?

    hi,guys
    I come back again.
    I encountered a kerning problem.
    how to get the kerning value and set it to back use script?
    Thanks very much!

    For both cases, the filename can be found on the FILE.ReceivedFileName Context Property.  You can access this Property in a Pipeline Component or Orchestration and take any action you want, such as apply to a database.
    The value is accessed by: MyReceivedMessage(FILE.ReceivedFileName)
    In the case of a duplicate EDI Interchange, you would use the Failed Message Routing feature to capture the error message with either an Orchestration or Send Port.

  • Bex Query - How to capture characteristic value and set it as filter value?

    Dear Experts,
    I would like to create a tricky report that listed sales quantity by companis. Companies consists of production plant as well as trading company.
    Company / Sales Quantity / Sales Quantity 2 (which produced by Company itself)
    A            / 100                  / 50                     (50 was produced by company A)
    B            /  80                   / 0                      (this is a trading company)
    C            / 150                  / 150                   (All are produced by company C)
    First I thought of using variable to capture Company value and then under Sales Quantity 2 I set producing company = this variable. But this only works if I filter company values. Any workaround idea that I can get the above with all the listing of companies?
    Any assistance would be great! Thanks!
    JL

    Hi,
    Have you tried elimination of Internal business Volume?
    http://help.sap.com/saphelp_bw32/helpdata/en/d5/784d3c596f0b26e10000000a11402f/content.htm
    Impliment this solution  by adding another KF Sales qty2.  with ref. to Sales qty.
    In characteristic pair you can have Company and  Production Company(navigational attribute).
    By implimenting this solution  the system will eliminate if the quantity is produced by the company it self.  You can create CKF in query to get the result you need.
    Jaya

  • Compare step values and set document to incomplete, if value is negative

    Hi All,
    I am looking for standard feature of SAP to set the document incomplete, if the difference of the two steps value is negative.
    e.g
    Step     CT     Value     SubTot     AltCal
    10     ABC     10          D              
    20     XYZ      20          E         
    30     Total     (-10)                    12(std cal type Subtract Subtotal D - E)
    Now the requirement is to set the document incomplete when the step 30 value is negative. Using custom routine it is feasible but I am looking for standard, if any.
    The idea is to check value of step 10 and 20, if the value of step 10 is less than step 20, then set the document to incomplete.
    Not necessary to check negative and then set to document to incomplete.
    I am also looking to use minimum order value concept but no success.
    Request to kindly let me know your valuable inputs. Thanks
    Regards
    Kalyan

    Hi
    Once I did this using EDI1 and EDI2 functioanlity. I changed that according to my own requirement. You could also use this and change this as per your own requirement but I think yours is very much similar to mine Check this below document.
    How to Implement minimum Price check in Sale order and billing.
    Thank$

  • How to get Select menu to determine next set of (hidden) inputs?

    Operating System: Mac OSX 10.6
    Software: Dreamweaver CS4, with local testing environment.
    The website i am currently creating uses form based quotes, (for a printing business).
    See here,      http://www.barringtonprint.com/perfect/quote-continuous.html      for the current webpage i am working on.
    I want to use a select menu to determine how many 'parts' the user requires, and for it to then display the necessary text fields for them to fill in. 
    At the monent the form just has the maximun amount (7) already on the form, and just requires the user to leave the non-required fields empty.
    However i would like the form to just have inputs for the first 'part' (Part 1), with a select menu that gives the user the option to select more than 1 'part' and then display how many more rows of text fields are needed depending on the outcome of the select menu.
    I presume i will need to use javascript to do this but i am unsure on how to proceed.
    NOTE: these are old forms that i have inherited and do use tables, im aware this is not the best way to proceed, however im sticking with them for now.
    Any help will be much appreciated, as this is driving me nuts.
    Andrew Barrington

    I'm sure there are cleaner ways of doing this, but I already had this put together from another project.  Hopefully it will get you started.
    <!doctype html>
    <html>
    <head>
    <meta charset="utf-8">
    <title>HTML5 Form with jQuery Validation</title>
    <!--[if lt IE 9]><script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
    <!--JQUERY LATEST-->
    <script src="http://code.jquery.com/jquery-latest.min.js">
    </script>
    <!--JQUERY VALIDATE-->
    <script src="http://ajax.aspnetcdn.com/ajax/jquery.validate/1.11.1/jquery.validate.min.js">
    </script>
    <style>
    /**BEGIN FORM STYLES**/
    #contact {
    font-size: 14px;
    width:800px; /**adjust width in % or px as needed*/
    margin: 0 auto; /**adjust margins as needed*/
    background: #FFF;
    border: 2px groove #999;
    padding: 2%;
    #contact fieldset {
    margin-bottom:5px;
    background:#CCC;
    #contact legend {
    padding: 8px;
    background: #000;
    font-weight: bold;
    color: #FFF;
    line-height: 1.5;
    /**wrap form lables and fields inside ordered lists for better web accessibility**/
    #contact ol {
    list-style:none;
    margin:0;
    padding:0}
    #contact li {
    padding:5px;
    margin: 0;
    clear: left;
    #contact label{
    display:inline-block;
    float:left;
    line-height: 23px; /**lines up labels with fields**/
    width:15%;
    font-size: 12px;
    text-align:right;
    margin-right: 10px; /*space between labels, fields*/
    #contact textarea,
    #contact input[type=text],
    #contact input[type=email],
    #contact input[type=number] {
    width: 45%; /**same width on fields**/
    padding: 5px;
    color:#333;
    font-family:Arial, Helvetica, sans-serif;
    font-size: 12px;
    #contact select {width:46.5%}
    /**field background on focus**/
    #contact input:focus,
    #contact input:active,
    #contact textarea:focus,
    #contact textarea:active,
    #contact select:focus,
    #contact select:active
    {background-color: #FFC;}
    #contact label.error {
        line-height:1;
        color:#F00;
        background:#FFC;
        padding:3px;
        box-shadow:1px 2px 3px #333
    /**hidden ids based on selection**/
    #one,#two,#three,#four {
        color: #03C;
        font-weight:bold;
        display:none;
    </style>
    </head>
    <body>
    <p>Conditional Form with jQuery Validation</p>
    <!--begin form-->
    <form id="contact" action="path/form-processing-script.php" method="post">
    <fieldset>
    <legend>Required Fields:</legend>
    <ol>
    <li><label for="first_name">Name:</label>
    <input name="first_name" id="first_name" type="text" required placeholder="First"></li>
    <li><label for="last_name">Last:</label>
    <input name="last_name" id="last_name" type="text" required placeholder="Last"></li>
    <li><label for="e_mail">E-mail:</label>
    <input name="e_mail" id="e_mail" type="email" required placeholder="[email protected]"></li>
    </ol>
    </fieldset>
    <fieldset>
    <legend>Conditional Select - Required:</legend>
    <ol>
    <li><label for="MySelect">Select One:</label>
    <select name="MySelect" id="MySelect" size="5" required title="Please select something!">
    <option value="0">None</option>
    <option value="1">Audi</option>
    <option value="2">Saab</option>
    <option value="3">Fiat</option>
    <option value="4">BMW</option>
    </select></li>
    <!--hidden-->
    <li id="one">
    <label for="option1">You selected Audi:</label>
    <input name="option1" id="option1" type="text" placeholder="Year and Model" />
    </li>
    <li id="two">
    <label for="option2">You selected Saab:</label>
    <input name="option2" id="option2" type="text" placeholder="Year and Model" />
    </li>
    <li id="three">
    <label for="option3">You selected Fiat:</label>
    <input name="option3" id="option3" type="text" placeholder="Year and Model" />
    </li>
    <li id="four">
    <label for="option4">You selected BMW:</label>
    <input name="option4" id="option4" type="text" placeholder="Year and Model" />
    </li>
    <!--end hidden fields-->
    </ol>
    </fieldset>
    <fieldset>
    <legend>Optional Fields:</legend>
    <ol>
    <li>
    <label for="phone">Phone:</label>
    <input name="phone" id="phone" type="number" placeholder="(area code) 123-4567" />
    </li>
    <li><label for="subject">Subject:</label>
    <input name="subject" id="subject" type="text" />
    </li>
    <li><label for="message">Message:</label>
    <textarea id="message" name="message" placeholder="remarks"></textarea>
    </li>
    <li><input name="submit" type="submit" value="Submit">
    </li>
    </ol>
    </fieldset>
    </form>
    <!--end form-->
    <!--form validation-->
    <script>
    $(document).ready(function() {
        $("#contact").validate();
        $("#MySelect").validate();
    //Custom jQuery to show/hide input fields based on selected options//
        $('#one,#two,#three,#four') .hide();
        $('#MySelect').bind('change', function (e) {
        if( $('#MySelect').val() == 1) {
            $('#one').show('slow');
        else{
          $('#one').hide();
        if( $('#MySelect').val() == 2) {
          $('#two').show('slow');
        else{
          $('#two').hide();
        if( $('#MySelect').val() == 3) {
          $('#three').show('slow');
        else{
          $('#three').hide();
        if( $('#MySelect').val() == 4) {
          $('#four').show('slow');
        else{
          $('#four').hide();
    </script>
    </body>
    </html>
    Nancy O.

  • Use VO to get DB value and set attribute

    Hi,
    I am working a page to create new order. I need some information populate. This is my code, which somehow not work
    public void createOrder() //(String[] args)
    OAViewObject vo = (OAViewObject)getxxMobileOrderVO1();
    if (!vo.isPreparedForExecution())
    vo.executeQuery();
    Row row = vo.createRow();
    vo.insertRow(row);
    row.setNewRowState(Row.STATUS_INITIALIZED);
    // Populate support information
    xxMobileSupportVOImpl sptVo = (xxMobileSupportVOImpl)getxxMobileSupportVO1();
    if (sptVo == null)
    MessageToken[] errTokens = {new MessageToken("OBJECT_NAME", "xxMobileSupportVO1")};
    throw new OAException("PER", "XXBOL_OAF_OBJECT_NOT_FOUND", errTokens);
    sptVo.initSupport();
    Row sptRow = sptVo.getCurrentRow();
    if (sptRow != null) {
    row.setAttribute("SupportPersonId", sptRow.getAttribute("PersonId"));
    row.setAttribute("SptName", sptRow.getAttribute("FullName"));
    row.setAttribute("SptEmail", sptRow.getAttribute("EmailAddress"));
    The VO xxMobileSupportVO is a simple select returns one records:
    SELECT ppx.person_id
    , ppx.employee_number
    , ppx.full_name
    , ppx.email_address
    --, lk.tag
    FROM fnd_lookup_values lk
    , per_people_x ppx
    WHERE lk.lookup_type = 'XXXX'
    AND lk.lookup_code = ppx.employee_number
    AND lk.enabled_flag = 'Y'
    AND lk.LANGUAGE = USERENV('LANG')
    AND lk.tag =
    ( SELECT MAX(NVL(tag, 0))
    FROM fnd_lookup_values
    WHERE lookup_type = 'XXXX'
    AND TRUNC(SYSDATE) BETWEEN lk.start_date_active
    AND NVL(lk.end_date_active, hr_general.END_OF_TIME)
    The VO is correctly attached to AM. I use Test feature to be sure it does get value.
    However, when the page is opened and createOrder method is called. The field does not get value populated.
    Does anyone can tell what is the issue?
    Thanks in advance.
    Rudoph

    Are you executing the VO query?
    I suppose you are executing it in sptVo.initSupport();
    If not first execute the VO using sptVo.executeQuery()
    After executing the query, do sptVO.first().
    This will give you the row of the VO.
    Then do your work based on that.
    Regards,
    Peddi.

  • Capture grid row value and set it in edit box

    hello expert
    i want to select  the perticular colum of grid and capture the three colum value of grid in three edit box on the form pls help me sir
                             thanx a lot

    Hi vmaskey,
    Use the Grid's DataTable GetValue method to get the values you need.
    Do this on the ItemPressed Item event, when the user selects a row
    Dim Value1 As String = oGrid.DataTable.GetValue(0, oGrid.GetDataTableRowIndex(oGrid.Rows.SelectedRows.Item(i, BoOrderType.ot_RowOrder)))
    Regards,
    Vítor Vieira

  • Safari 417.9.2 not changing hidden input values from page to page

    Hello,
    I have a customer who uses Safari 417.9.2 (is this 2.0.3?) on Mac OS X (must be 10.4.x for this version?) on several Macs in her computer center.
    My program has generated a multi-page web form where each of the HTML files has visible and hidden input fields. Each HTML file contains the same set of hidden input fields, a few of which having different values.
    Using the Safari browser on one of the Macs in the computer center, upon submitting the first page, she is taken to the second page. No problems so far.
    Upon submitting the second page, all of the visible input fields on the page are received by my program's script. In addition, all of the hidden input fields that were not also on the first page are received correctly. But, the hidden input fields having the same name as in the first page are received with the first page's values instead of the second.
    My program's script has an optional feature that logs the information received from and sent to the browser. I have verified that the information sent to the Safari browser is correct. The logs show that despite receiving the second page with its visible and hidden input fields, upon submission, the Safari browser sends old values for those hidden input fields that have been seen before in the previous page.
    To make it interesting, when she submits the page again, the Safari browser sends the correct information and does not exhibit this problem again.
    FireFox 1.5.0.1 is installed on these machines as well. The FireFox browser does not exhibit this behavior on any of the machines she has tried.
    The Safari browser exhibits this behavior on all of the machines she has tried.
    I have looked at the defect database for Safari and found a defect that may be related:
    http://bugzilla.opendarwin.org/show_bug.cgi?id=6733
    It is unclear if the fix for defect 6733 fixes this problem or not. Even if it does, it seems the fix is available to her if she is willing to download one of the nightly builds.
    Is there a workaround that I can suggest?
    Any advice would be greatly appreciated.
    Richard
    Unknown Mac OS X (10.4)
    Gateway E Series Windows XP Pro
    Gateway E Series Windows XP Pro
    Gateway E Series Windows XP Pro
    Gateway E Series   Windows XP Pro  

    Try deleting the cache associated with Safari ...
    Quit Safari.
    Go to ~/Library/Caches/com.apple.Safari/Cache.db.
    Move the Cache.db file to the Trash.
    Relaunch Safari to test.
    I had to check this box upon installing a software in the past but I can't remember what it was.
    Open System Preferences > Universal Access
    Make sure the box next to:  Enable access for aassitive devices is deselected.

  • Concatenating context value and non-context value

    Hi,
    I have a context binding to one of the input field(lets say field-X) and also I have another dropdown list UI element(lets say field-Y) which is not bound to any context.  When a user enters values in field-X and selects a item from field-Y hits the save button, I need to concat "Field-X - Field-Y" and assign this concatenated value to field-X context.  So in a road-map (next screen) when I retrieve field-X context value it should have concatenated value of dropdown UI element as well.
    Where do I do this concat (I mean which method e.g. WDModify) and how do I do it?
    Thanks
    Praveen.

    Hi Praveen,
    What do you mean by field-Y is not bound to any context?? I am sure you would have atleast bound the selectedKey property of the dropdown list with some attribute of the context.
    For concatinating the fileds you have to write the code on the onAction function of Save button which is taking you to the next screen of the road map. On the onActionSave() you have to get the values of the currently selected input field and the dropdown value. Then you have to concatenate the values and set it in some attribute from where you can pick it in the next screen.
    Please use this code in onActionSave() method:
    // Get the value of the currently entered value of the input field from the attribute which is bound to the input field. I am assuming the name of the attribute as InputFiledValue
    String inpValue = wdContext.currentContextElement().getInputFiledValue();
    // Get the value of the currently selected value of the drop down field from the attribute which is bound to the drop down field. I am assuming the name of the attribute as DropDownValue
    String dropDpwnValue = wdContext.currentContextElement().getDropDownValue();
    // Concatenate with "-" in between
    String concatenatedValue = inpValue+ " - " + dropDpwnValue;
    // Set the concatenated value to a temporary attribute. This will be accessed in next view of road map.
    wdContext.currentContextElement().setConcatenatedValue(concatenatedValue);
    // OR if you want to save in same inputfield Attribute then also you can do that.
    // use the similar code as above. see this:
    // wdContext.currentContextElement().setInputFiledValue(concatenatedValue);
    Here I am assuming that the attribute which have bound to the inputfield and dropdown field are directly under the context node. If not then you have to get the values from a specific node. Do it like this:
    // Get the value of the currently entered value of the input field from the attribute which is bound to the input field.
    String inpValue = wdContext.current<NODE_NAME>Element().getInputFiledValue();
    // Get the value of the currently selected value of the drop down field from the attribute which is bound to the drop down field.
    String dropDpwnValue = wdContext.current<NODE_NAME>Element().getDropDownValue();
    In the next view you can get this concatenated value and can use whereever you want. Use following code:
    // To get the value of the concatenated string.
    String value = wdContext.currentContextElement().getConcatenatedValue();
    I hope this solves the issue. Please revert back in case you need any furtehr help on this.
    Thanks and Regards,
    Pravesh

  • Retrieve list items from the textbox text value and display the dropdownlist item for that particular list item

    hi,
     I have created a custom list in my sharepoint :
    List1 name:   employeedepartment  -
                   Title       empdepartment
                   A             D1
                   B             D2
                   C             D3 
    List2  name:  employeedetails  
     emptitle            empname       empdepartment(lookup) --> from the list "employeedepartment"
       x                     Ram                 D1
       y                     Robert             D2
       z                     Rahim              D3
    My task is to create a custom webpart that will be for searching this employee details by entering emptitle
    For this, i have created a visual webpart using visual studio 2010, my webpart will be like this:
    emptitle  --->  TextBox1                        Button1--> Text property : Search
    empname---> TextBox2
    empdepartment-->  DropDownList1
    For this, i wrote the code as follows:
    protected void Button1_Click(object sender, EventArgs e)
                using (SPSite mysite = new SPSite(SPContext.Current.Site.Url))
                    using (SPWeb myweb = mysite.OpenWeb())
                        SPList mylist = myweb.Lists["employeedetails"];
                        SPQuery query = new SPQuery();
                        query.Query = "<Where><Eq><FieldRef Name='Title'/><Value Type='Text'>" + TextBox1.Text.ToString() + "</Value></Eq></Where>";
                        SPListItemCollection myitems = mylist.GetItems(query);
                        if (myitems.Count > 0)
                            foreach (SPListItem item in myitems)
                                string a1 = Convert.ToString(item["empname"]);
                                string a2 = Convert.ToString(item["empdepartment"]);
                                TextBox2.Text = a1;           // displaying   properly                    
                                //DropDownList3.SelectedIndex = 1;                           
     It is showing the list item in textbox according to the item entered in the textbox1... But I am stuck to show in the dropdown list. 
    Suppose, if i enter X in textbox and click on search, then dropdownlist need to show D1,
                               for Y --> D2 and for Z-> D3... like that.
    What code do i need to write in the button_click to show this... 
    Please don't give any links...i just want code in continuation to my code.

    Hi,
    Since you have got the data you want with the help of SharePoint Object Model, then you can focus on how to populate values and set an option selected in the Drop Down List.
    With the retrieved data, you can populate them into the Drop Down List firstly, then set a specific option selected.
    Here is a link will show how to populate DropDownList control:
    http://www.dotnetfunda.com/articles/show/30/several-ways-to-populate-dropdownlist-controls
    Another link about select an item in DropDownList:
    http://techbrij.com/select-item-aspdotnet-dropdownlist-programmatically
    Best regards
    Patrick Liang
    TechNet Community Support

  • Creating array of hidden inputs - APEX 2.2

    Hi, all.
    Thanks for all of your help with questions I've had so far.
    I want to create an array of hidden inputs and put them into a collection on page submit. My intention is to create this array in JavaScript.
    I realize I can probably just create a a bunch of inputs with names like "f01" and that they'll automagically end up in the corresponding collection. I wonder if there's a more elegant way, or at least some sort of way to declare that I want to use f01 for that purpose.
    My concern is that I happen to be getting the values into the collection by fluke, or that if I were to add a form on a table that my inputs would get clobbered or crossed.
    Thanks!

    georgemc wrote:
    you still have to fill it with Vector instances yourselfMy God! I got it up
    Vector x[]=new Vector[3];
    for(int i=0;i<=2;i++)
    x=new Vector();
    x[0].addElement("1");
    x[0].addElement("2");
    x[0].addElement("3");
    x[1].addElement("4");
    x[1].addElement("5");
    x[2].addElement("6");
    x[2].addElement("7");
    x[2].addElement("8");
    x[2].addElement("9");
    for(int i=0;i<=2;i++)
    System.out.println(x[i]);

  • Problem setting a hidden item value when button clicked with dynamic action or pl/sql process

    Apex 4.1
    Oracle 11g
    I have a page that consists of a main region and several sub regions.  I have a pl/sql process in After Header SET_DISPLAY(:P400_DISPLAY :='MAIN';)
    Three subregions have a contional display where P400_DISPLAY = STORE.  This works in hiding the sub regions.
    Now I want to change the P400_DISPLAY value to STORE to show the subregions when I hit a button.
    I tried creating a dynamic action for on click of the add button but get the following error:
    The selected button uses a 'Button Template' that does not contain the #BUTTON_ID# substitution string
    I went to the templates and found:
    Substitution Strings
    Substitution strings are used within sub templates to reference component values. This report details substitution string usage for this template.
    Substitution String
    Referenced
    From
    Description
    #LINK#
    Yes
    Template
    To be used in an "href" attribute
    #JAVASCRIPT#
    No
    To be used in an "onclick" attribute
    #LABEL#
    Yes
    Template
    Button Label
    #BUTTON_ATTRIBUTES#
    No
    Button Attributes
    #BUTTON_ID#
    No
    Generated button ID will be either the button's Static ID if defined, or if not will be an internally generated ID in the format 'B' || [Internal Button ID]
    I then tried creating a page process, pl/sql, :P400_DISPLAY :='STORE'; when the appropriate button is pressed.  The button action is submit page. However, it does not change the P400_DISPLAY value and the subregions stay hidden.
    Suggestions please on how to fix the template or change the P400_DISPLAY value?

    The root issue is that, although you change the value of your page item, it isn't visible to other areas of the page until it is in the session. So, any other action based on the value of your page item; the visibility of a control, a report based on the item's value, etc. will all be unaffected by changing the value of the page item until it has been changed in the session. Even after this the items are stored in the session, you must thereafter do something to cause the value to be reevaluated. To see the effect of this, observe that your page loads and evaluates the value of your page item, it sees that is "MAIN" and hides the regions. However, it doesn't reevaluate them after this.
    So; your choices to get this value set in the session are to either Submit the page, or use JavaScript to set the value in the session. If you use the latter of these, you'll have to do some further work to cause the visibility tests to be re-run, So, let's stick with with the submit method.
    What you've done above sounds correct for this but, there are a lot of decisions you could have made that might have caused things not to happen in the correct sequence.
    Firstly, let's confirm that what I describe above is your problem. From the development environment, load the page, click the button to change the value and submit. Now, click the link labelled Session. Is it still set to MAIN? If so; this is your issue.
    Let's start with the your After Header computation. Did you set it to *only* run if the current value of your page item is NULL??? If not, that's your problem.
    Load Page -> Item set to 'Main' by Computation -> Click Button -> Item set to STORE -> Submit -> Load Page -> Item set to 'Main' by Computation
    See the problem?
    Assuming this isn't the issue, you created a Branch to the same page, right? What is your process point for the Branch? Is it *After* Validation, Computation etc? Because if not, you aren't changing the value before the submit happens.
    I bet it is the first issue but, take a look at these.
    Cheers,
    -Joe

  • Can't set a hidden field value from onClick event with a runtime expression

    Hi,
    I need to set a hidden field in an onClick event of button but it's not working.
    <html:submit styleClass="btnLink" onclick="document.empForm.hidden.value='<%= empID%>'">
    <%= empID%>
    </html:submit>
    Althought the second expression is evaluated and written successfully "the button value"
    I heard that this is because you can't mix the value of an attribute of a custom tag with both string literal and run time expressions.
    Is there any work around to solve that?
    I can't use EL as I'm using old JSP version

    I guess, it should work; instead of html:submit, try with button.

  • Pass variable and set default value based on user's group

    Hello
    I'm using SharePoint 2010 and SQL 2012. I need to send a variable to the page and based on its value, set default value for a drop down list and send it to other web part to filter the data. Is it possible for certain users to send that value as a default
    and limit user to see only this value in the text field or drop down list; for others - to allow to see the drop down list, but also set the default value for that list?
    The main page was designed in SharePoint designer, using web parts (aspx page). I had setup a connection to Active Directory and already have the code to get user's groups and based on their group, I have that variable pulled into the web page for further
    use. But I don't know how to pass that value as a default value to the web part (currently using SharePoint Filter web part). When I tried to set a default value for the web part - it automatically puts the quotation marks around the name of the variable
    and shows it as a text instead of showing the value of the field.
    Thank you!
    P.s. I have limited knowledge of SharePoint and need guidance (links, examples, recommendations)!
    Alla Sanders

    Thank you for your response. I'll try to give you more details. On PageA I check user's groups and based on the group, assign the value and pass it to the next page (no input from the user, all done behind the scene and user is redirected to PageB).
    On the next page I read that value and would like to send it to the SharePoint List Filter Web as a default value, as well as send it to another web part that displays the list from SQL, filtered using that default value. Ideally, if the user is from Group
    A, I'd like for them to have only one value in that drop down list; if user is from Group B - give him drop down list with 40 items to choose from. Below there is a part of the code and variable fnum has the value from PageA (if I print the value on the screen
    - I do see that it has correct value, so the code that gets groups from Active directory works correctly). If I assign fnum as a default value of the list, it shows "fnum" instead of the value of variable fnum. I connect to SQL database, using external
    content - so the other list that I'm filtering based on the value in that drop down list - is XSLT Data View Web part. I also have 2 more filters on that page, that user will have full access to and based on their input, it is also sent to the XSLT web part
    to filter out more data. Since one of the filters is the date and I am filtering data starting from the date that user chooses - XSLT is the only web part that I was able to make it work with.
    I looked at the link you provided (thank you). It is using Content Query Web part. Will it work with external content, as well as accepting multiple filtering, including custom starting date? I appreciate your help!
    <%
    string fnum = Request.QueryString["field1"];
    %><table cellpadding="4" cellspacing="0" border="0" style="height: 1000px">
    <tr>
    <td id="_invisibleIfEmpty" name="_invisibleIfEmpty" colspan="2" valign="top" style="height: 101px">
    <WebPartPages:WebPartZone runat="server" Title="loc:Header" ID="Header" FrameType="TitleBarOnly"><ZoneTemplate>
    <WpNs0:SpListFilterWebPart runat="server" FilterMainControlWidthPixels="0" RequireSelection="False" ExportMode="All" PartImageLarge="/_layouts/images/wp_Filter.gif" AllowHide="False" ShowEmptyValue="True" MissingAssembly="Cannot import this Web Part." AllowClose="False" ID="g_1ccc4bca_3ba1_480b_b726_adfdb1e9e02d" IsIncludedFilter="" DetailLink="" AllowRemove="False" HelpMode="Modeless" AllowEdit="True" ValueFieldGuid="fa564e0f-0c70-4ab9-b863-0177e6ddd247" IsIncluded="True" Description="Filter the contents of web parts by using a list of values from a Office SharePoint Server list." FrameState="Normal" Dir="Default" AllowZoneChange="True" AllowMinimize="False" DefaultValue="fnum" Title="Facilities List Filter" PartOrder="2" ViewGuid="2da5d8db-6b55-4403-80a8-111e42049f8b" FrameType="None" CatalogIconImageUrl="/_layouts/images/wp_Filter.gif" FilterName="Facilities List Filter" HelpLink="" PartImageSmall="/_layouts/images/wp_Filter.gif" AllowConnect="True" DescriptionFieldGuid="2d97730a-cd0d-4cb9-8b55-424951201081" ConnectionID="00000000-0000-0000-0000-000000000000" ExportControlledProperties="True" TitleIconImageUrl="/_layouts/images/wp_Filter.gif" ChromeType="None" SuppressWebPartChrome="False" IsVisible="True" ListUrl="/Lists/FacilitiesList" AllowMultipleSelections="False" ZoneID="Header" __MarkupType="vsattributemarkup" __WebPartId="{768E2035-0461-4A09-8DDD-CA7020C2B23D}" WebPart="true" Height="" Width="615px"></WpNs0:SpListFilterWebPart>
    Alla Sanders

  • Looping and setting cfset values (from a query)

    Stuck on how to get this to work.
    How would I go about looping and setting these values instead
    of doing them individually?
    The query this <cfset> references works fine and will
    work but repeats...
    <cfset ans1 = (qryGetPcts1.q1Ct / qryGetCounts.qID2) *
    100>
    <cfset ans2 = (qryGetPcts2.q2Ct / qryGetCounts.qID2) *
    100>
    <cfset ans3 = (qryGetPcts3.q3Ct / qryGetCounts.qID2) *
    100>
    <cfset ans4 = (qryGetPcts4.q4Ct / qryGetCounts.qID2) *
    100>
    <cfset ans5 = (qryGetPcts5.q5Ct / qryGetCounts.qID2) *
    100>
    So I'd like to loop and set them all instead...
    <cfloop index="i" from="1" to="27">
    <cfset ans#i# = (qryGetPcts#i#.q#i#Ct /
    qryGetCounts.qID2) * 100>
    </cfloop>
    But it's responding with this...
    Invalid CFML construct found on line 196 at column 19.
    ColdFusion was looking at the following text:
    I'm sure I'm missing something simple b/c this must be
    possible? Can I use a cfset in a loop?
    Help is appreciated

    In the main everything is in CF is in a struct. Armed with
    this information you use array notation to help you.
    <cfloop index="iCount" from="1" to="27">
    <cfset variables["ans" & iCount] =
    (variables["qryGetPcts" & iCount]["q" & iCount & "Ct"]
    / qryGetCounts.qID2) * 100>
    </cfloop>

Maybe you are looking for

  • Can electronic signatures be utilized within a "form" that I make on forms central?

    I am trying to create waivers and forms that need signatures.  Can I somehow embed or utilized electronic signatures in forms on formcentral?

  • GradientPaint under Java 1.0

    Hello all! I have problem with painting. I need to draw rectangle for example with smooth change of one color to another. In Java 2 I do it in such way: public void paint(Graphics g){     Graphics2D g2 = (Graphics2D)g;     GradientPaint p = new Gradi

  • HT4106 Camera attachment for IPad.

    I have been downloading photos from my camera onto my ipad using the apple adapter. It's now started to say that ' accessory attached uses too much power'. It does this even when the camera isn't attached. Help..I can't download my photos now. It did

  • Limit to Number of SMS recipients

    I have a list of 44 people to whom I regularly need to send a text message of an emergency nature. As late as last Thursday I could create a new text message using the default Text Message client included with my BlackBerry, select the group containi

  • Creative Cloud App Blank Screen

    Hello guys, I have just bought Creative Cloud and i try to download my app, well: i open my creative cloud app, i enter my login details and after that the windows shows the loading icon. Dropbox - Screenshot 2014-10-20 19.33.15.png I have already tr