Trying to change caption based on dropdown value

Two elements are involved:
Dropdown list called TransactionType - possible values are "A" "B" or "C"
Checkbox chkVerification
I have created the following javascript for the change event of the dropdownbox TransactionType
form1.#subform[0].TransactionType::change - (JavaScript, client)
if(this.rawValue == "A"){chkVerification.caption.value.text.value = "Verification A"}
else if(this.rawValue == "B"){chkVerification.caption.value.text.value = "Verification B";}
When I check the script syntax it comes up without any errors, but when I change the value in the drop down the caption of the checkbox never changes.
What am I missing here?
By using the app.alert function I think I can see that I need to trigger the script as xfa.event.newText  but the caption isn't changing.
I've also tried this :
form1.resolveNode("chkVerification.caption.value.#text").value = "Verification A";
Is what I'm trying to do even possible?

Hi Steve,
Its a bit of an old thread already, but I am facing similar problems to what Albert was facing.
My form is already configured to use 1)dynamic XML form as default data type and 2)Preview as Interactive form.
The techinique I am trying to use is also xfa.resolveNode("form1.page1.cb.caption.value.#text").value = "Abc";
However, it doesn't seem to work. On test, no code is ran after that line, which means that element could be invalid, but I've checked and it seemed ok.
Language used is Javascript and not FormCalc too. Any idea how I can tackle this?
Thanks!

Similar Messages

  • CAML Query to get specific item in folder based on dropdown value using Javascript client object model

    Hi,
    I am using the Javascript Client object model.
    I have a custom list and a custom document library.
    Custom list contains 2 columns - dlName , dlValue
    The document library contains 2 folders - "folder1" ,  "folder2" and contains some images.
    The image name starts with the "dlValue" available in the custom list
    I am using a visual webpart and using javascript client object model.
    I am trying to achieve the below functionality:
    1) Load a dropdown with the custom list.
    2) set the image based on the value in dropdown.
    I have achieved the first option, I have set the dropdown, but not sure how to query the folder and set the image.
    Below is the code i have used so far:
    //In Visual webpart
    <select id="ddlTest" >
    </select>
    <br/>
    <div id="PreviewLayer">
    <img id="imgPlaceHolder" runat="server" alt="Image" title="imgPlaceHolder" src=" " />
    </div>
    // In Javascript file
    function RenderHtmlOnSuccess() {
    var ddlTest = this.document.getElementById("ddlTest");
    ddlTest.options.length = 0;
    var enumerator = this.customListItems.getEnumerator();
    while (enumerator.moveNext()) {
    var currentItem = enumerator.get_current();
    var dropdownValue = currentItem.get_item("dlValue");
    ddlTest.options[ddlTest.options.length] = new Option(currentItem.get_item("dlName"), dropdownValue);
    setImage(dropdownValue); // Not sure how to query the folder and set the image based on value.
    // Also if dropdown value is changed, corresponding image should be shown
    How to query the folder and based on dropdown value, show the image? Also, how to handle the dropdown value change?
    Thanks

    Hi,
    Here are two links for your reference:
    Example of how to Get Files from a Folder using Ecmascript \ Javascript client object model in SharePoint 2010
    http://sharepointmantra.wordpress.com/2013/10/19/example-of-how-to-get-files-from-a-folder-using-ecmascript-javascript-client-object-model-in-sharepoint-2010/
    SP2010 JSOM Client Object Model: How to get all documents in libraries including all folders recursively
    http://sharepoint.stackexchange.com/questions/70185/sp2010-jsom-client-object-model-how-to-get-all-documents-in-libraries-including
    In SharePoint 2013, we can also use REST API to achieve it.
    http://msdn.microsoft.com/en-us/magazine/dn198245.aspx
    Thanks,
    Dennis Guo
    TechNet Community Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Dennis Guo
    TechNet Community Support

  • Changing fields based on database values

    Hi all,
    I have one form and two drop -down fields. The fields are Call Type and Sub Call Type and are on the SAME form. I pull data from the Call Type from the database. When the user selects a particular Call Type, I need to go back to the database and pull in values associated with that particular Call Type.
    This is the method, that I am using:-
    1) I first populate the Call Type drop down field by using a Server Side Method to fill in values for the Call Type and calling the database.
    2) I then call a method called as PopulateSubCallType by using the property On Change Invoke for the Call Type field.
    In this method I again call the database and based on the Call Type selected by the user, I pull in the associated Sub Call Types and store them in an array.
    3) I also call the same array to populate the Sub Call Types based on Call Types. But the drop down field for Sub Call Type is not auto-populated based on the values from the array. The array values although pulled up from the database are not shown on the form.
    Can you tell me a way to auto-populate the Sub Call Type from the database based on the Call Type selected by the user but on the SAME form.
    I AM NOT USING JSP's but ONLY ALBPM 6.0 PRESENTATIONS.

    refreshValidValues("someAttribute") is a method that comes with BPM Object presentations.
    This one line in this method will work because it causes the attribute (child in this case) to automatically invoke the method you created for retrieving the valid values of the children of the parent.
    Your server side method that dynamically returns valid values of the children based on the parent selected should be looking something like this:
    for each ...
    select * from child
    where parentOfChild = parentAttribute
    In this example the name of your parent attribute is "parentAttribute" column in the child database table that contains the parent's id is "parentOfChild".
    This causes the list of children to auto populate in the child combo dropdown automatically.
    To summarize - at runtime here is what happens:
    a) since the parent has a dynamic method that populates its valid values, as the presentation initializes the SQL for the valid values of the parent is run.
    b) the parent's combo dropdown is populated with a list of valid values of the parent
    c) the end user selects one of the parent's names from the combo dropdown
    d) this causes the method to fire that has only one line. This one line has the text "refreshValidValues("nameOfTheChildAttributeGoesHere")
    e) since the child has a dynamic method that populates its valid values, when the previous step caused this child attribute to refresh its valid values, the SQL in the method that dynamically retrieves the valid values of the child is run.
    f) the end user clicks the combo dropdown on the child's attribute and sees that the child valid values (based on the parent that was just selected) now appear.
    Dan

  • Populate field1 in table, based on dropdown value of a field2 in same row

    Hi Experts,
    I have created an offline interactive Adobe form and need help with java-script on events. I will describe my scenario below -
    I have written an SE38 report program which will generate the PDF. To pre-populate fields in the PDF, I have a structure Default_Values which has a few internal tables. One of the internal tables Employees has 2 fields Emp_Code and Emp_Name. I have written code to obtain a list of employees and populate this internal table Empoyees. I call the Adobe form and along with other parameters, pass this structure Default_Values. Thus all the default values along with the internal table Employees pre-populated with the Employee Code and Employee Names have been passed to the Context.
    In the Adobe form I have a table with 10 lines with Employee details (6 columns, 2 of which are Emp_Code and Emp_Name)
    In this table control, the column Employee Name is a drop down list. For this column, under List Items, I have created a binding to the internal table Employees with default values. This binding Items looks like this - $record.DEFAULT_VALUES.EMPLOYEES.DATA[*] with Item Text and Item Value having the value EMP_NAME.
    When I test the form, I can see all the Employee Names in the drop down list in the column Employee Name of the table control.
    My requirement is that when a user selects an Employee Name from the drop-down list, the field Emp_Code for that row in the table control should be automatically populated with the corresponding value of Emp_Code  depending on the Emp_Name which the user has selected.
    I am new to Java-scripts and Adobe forms. I have searched this and other forums, however I couldn't find the right code which I can place in either the Change or Exit event of the drop-down to accomplish this.
    Can someone please provide me with sample code to achieve this.
    Any help will be greatly appreciated.
    Thanks in advance.
    Regards,
    Neha

    Hi Neha,
    I would prefer not to use FormCalc for this requirement.
    Array Processing shall be done in Java Scripting and you simply cannot have two different scripting language elements in the same scripting block.
    First create a table type parameter in the interface or GT_* type in Global variable and pass all the necessary entries of dropdown to the table type parameter. Once included in the context it shall be available in your data view of the form.
    To access any repeating instance node of the form in the data view, use te following script -
    var theFields = xfa.resolveNodes(
                      "xfa.datasets.data.data.CUSTOMERS.DATA[*].NAME");
    assuming that you have a table named CUSTOMERS in the Data View.
    For more details on XFA Data Model refer to
    [http://help.adobe.com/en_US/livecycle/es/lcdesigner_scripting_reference.pdf]
    Hope these inputs help.
    Regards,
    Rohit

  • Binded based on dropdown values in a flowable table

    Can someone please help me with my practice form?  I am just started learning to make a fillable pdf form. I made my practice form patterned after the Purchase Order Form sample that came with livecyle installation.  I want my table to automatically display the unit price when I select an item from the dropdown list.  I managed to do that by using below script.  The problem comes in when I am adding rows my selection keeps on reverting back to the first item on the dropdown list or on my first selection on the first row. Should I add something on below script.  Please help.
    RefreshmentOrderform.RefreshmentOrder.details.detail[0].item::change - (JavaScript, client)
    unitprice.rawValue = this.boundItem(xfa.event.newText);
    unitprice.value = xfa.event.newText;

    Hi,
    The problem you are having is because the id values of the drop down are duplicated, if I choose cherry slice I get an id of 3 (which is meant to mean $3.00) but this is also the id of Ambassador (as well as Brownies and Coffee).  So similar problem with Chocolate Tarts going to Assorted Mini Cookies.
    So you need to keep the id unique.  At first I thought you should set the id to 1,2,3,4,.. and have a table lookup for the price, but I liked your idea of keeping it all in the drop down control, so if you changed the make them unique, something like 1:3.00, 2:1.50, 3:3.00, ... you could strip of the part before the colon by changing your change event code to;
    unitprice.rawValue = this.boundItem(xfa.event.newText).split(":")[1];
    Which turns the id into an array and takes the second element.
    Also, there are some run time errors in your form.  In Acrobat (or Reader) you should turn on "Show console on errors and messages", which is under Preferences ... JavaScript.
    The second line in your change event causes a runtime error as the value property of a numeric field is its default value and to correctly reference it you need to use;
      unitprice.value.oneOfChild.value
    But you don't need that line at all in this case.
    There is also a problem with the initialise script in numServiceChargerate, which looks like it is a problem moving from FormCalc in some parts of the form to JavaScript in others, I would try and stick with one or the other.
    Good luck
    Bruce

  • Showing and hiding dropdowns on product page, based on selected values

    Hello.
    I would like my product page to show different subsequent dropdowns based on individual dropdown values.
    I've managed to achieve this via JavaScript, but I do not like how it works.
    As far as I can tell, there is no proper identifier for each individual dropdown to determine which one it is, so all I can do at the moment is to rely on their order in the DOM, which is bad and makes it difficult for me to create a solution that would work for all products.
    For instance, if the following is a single attribute:
    <div class="catProductAttributeGroup" style="display: none;"><div class="catProdAttributeTitle">Metallic Foiling</div><div class="catProdAttributeItem"><select><option value="">-- Please select --</option><option value="6051720">Not required </option><option value="6051721">Foil ONE side + £45</option><option value="6051722">Foiling BOTH sides + £75</option></select></div></div>
    I would like the outer-most div to have some sort of html attribute that holds the product attribute id. Something like, data-attribute-id="XXXXXXX". Is that possible?
    Here's what I have up to this point:
    I use {tag_attributes_json}, {tag_product_json} and {tag_currency} to get these values into javascript on page load, so I can use them later.
    Then, I hook to change events of the drodpowns I have and then toggle their visibility based on which ones are selected. I rely on the jequery ':eq(n)' selector to achieve this, which I do not like. Is there an option for the {tag_attributes} helper which would make it add some extra information (such as attribute ID on the dropdown) on the generated HTML?
    All of this works initially, but If I then 'Add to cart', the product element get's ajax-reloaded and the events are suddenly unhooked, so it doesn't work anymore. For that one, there are two options:
    1. I could hook to an event that triggers once the product has been added to cart and the page is ready again. Is there such an event?
    2. I could implement my own add to cart using bcInternals.shop.addToCart. I tried doing this, but I have two problems with it.
    a. addToCart seems to add my selection twice, for some reason. Any ideas what I might be doing wrong?
    b. the cart info in  the top right corner doesn't refresh. it seems it tries to refresh, but there's some sort of access error in the script. This part is not yet fully added to the page, but there's a function that would do the adding to cart at the bottom of the bigger script block. Am I using the built in addToCart function incorrectly?
    This is the page I have the partially implemented functionality added on:
    Matt Laminated Business Cards
    The scripts are currently embedded inside the HTML. Once I have it properly implemented, I'd like to extract it into a separate file. Search for "$productAttributesElement" to find the block with the functionality and for "productInfo" to find the part where I store the product data with the _json tags.

    Hi,
    No worries, Didnt know if you solved or the answer wasnt helpfull
    You need to trigger you script within the product details template layout, or you could add a listener to the product container and trigger the script if any changes are detected.
    Regards

  • Enabling and disabling input filed based on the Dropdown values selection

    HI,
    I have a requirement with Adobe Interactive forms being called from HCM Forms & Processes. We have a drop-down list and a inputbox.
    based on the values selected from the drop-downlist, the input box should be visible and hidden.
    If the input value is visible, I got to send  some part of the value selected from the drop down to the input field.
    i tried to write the following script in the click event of dropdown  but the input field is not appearing with any value selection.
    if data.Layout.CH1.CHContent.ISR_DDL_1stSelected.rawValue = "00000000" then
    data.Layout.CH1.CHContent.ISR_NEW_COST.presence = 'Visible' else
    data.Layout.CH1.CHContent.ISR_NEW_COST.presence = "Hidden"
    endif
    Thanks in Advance,
    VR.

    Hi Mukesh,
    THanks alot.
    Yes,  The Split functionality is working.  I have added the code in 'Change' event and  for selecting the value from the Drop down, am  writing the code in the 'exit'.
    In addition to this, I am populating the values to the drop down from the Generic service.  The problem is, while running  the  Process from Portal and check and send button,  the fields fetched from the generic service & the dropdown values are getting refreshed. i hope, this is because of the java script.
    pls. suggest me if this can be handled .
    Thanks &Regards,
    Venkatesh.

  • Change text field based on dropdown

    Hello,
    I'm new to LiveCycle and am having trouble getting a textfield to change when I select different options in a drop-down menu.  I used the following script (tried using exit and calculate events also):
    Still not working.  What am I doing wrong?  Do I need to change any properties of the TextField?

    this.rawValue only holds the old value of the drop down list when you are scripting inside the change event. you need to to have
    if ( xfa.event.newText == " BURIED W/ BOX")
         TextField7.rawValue = "CONSTRUCTION";
    this will be on the change event of the dropdown in javascript

  • Change an Object property based on a value coming from the Excel sheet

    hi all
    i've been able to bind a value from the excel sheet to my my component
    but i want to change a property of an object in my component based on this value at the run time.
    during the design time, it works fine
    for example, if my value called "_xvisible"
    and i use to it to hide some object.
    if i set _xvisible during the design time in excel, it works fine in the run mode.
    but during the run mode, if the value got changed, there is no affect.
    thank you
    Amr

    Hi
    See the xcelsius samples present inside xcelsius SDK. there are examples describing how to bind data which will work at runtime also.
    Hope this helps
    Rush-me

  • Change dropdown values for a field in webdynpro abap

    Hi All ,
    I need to change dropdown values for a particular field ( Tax code ) in webdynpro component (FITE_VC_RECEIPTS) when selecting expense type.  Right now Tax code values are coming with respect to a company code but i need tax code with respect to other company code for two personel numbers .
    How can i change dropdown values for this taxcode in webdynpro abap . Please suggest.
    Thanks in advance.
    Regards,
    Sijin K P.

    Hi All ,
    Thanks for reply .
    In production taxcodes are coming fine but wrong in dev and quality . ( Australian taxcodes are coming in production for dropdown values but new zealand tax codes in dev and quality )
    I have not started doing any changes . Is there any configuration part to change tax codes that can reflect in expense claim portal . Please help ..
    Thanks in advance.
    Regards ,
    Sijin K P.

  • How to catch the event for change dropdown value in alv

    it has a column output by dropdown in alv. the dropdown type cl_salv_wd_uie_dropdown_by_idx.
    now the problem is if change the dropdown value, i want to catch the event to change another column value.
    how can i do it?

    This part contains other ALV initialization code
    *... init ColumnSettings
      DATA:
            lr_column_settings TYPE REF TO if_salv_wd_column_settings.
      lr_column_settings ?= wd_this->r_table.
      DATA:
            lt_columns TYPE salv_wd_t_column_ref.
      lt_columns = lr_column_settings->get_columns( ).
      DATA:
            ls_column     TYPE salv_wd_s_column_ref,
            lr_col_header TYPE REF TO cl_salv_wd_column_header,
            l_tooltip     TYPE string.
      LOOP AT lt_columns INTO ls_column.
        CASE ls_column-id.
          WHEN 'PLANETYPE'.
            DATA:
                  lr_drdn_by_key TYPE REF TO cl_salv_wd_uie_dropdown_by_key.
            CREATE OBJECT lr_drdn_by_key
              EXPORTING
                selected_key_fieldname = ls_column-id.
            lr_drdn_by_key->set_key_visible( abap_true ).
            ls_column-r_column->set_cell_editor( lr_drdn_by_key ).
          WHEN OTHERS.
        ENDCASE.
    ENDLOOP.
      DATA:
            node_info TYPE REF TO if_wd_context_node_info,
            lt_valueset   TYPE STANDARD TABLE OF wdr_context_attr_value,
            l_value       TYPE wdr_context_attr_value.
      node_info = wd_context->get_node_info( ).
      node_info = node_info->get_child_node( 'FLIGHT_INFO' ).
    data : lt_sflight type STANDARD TABLE OF sflight,
           ls_sflight like LINE OF lt_sflight.
    SELECT * from sflight into TABLE lt_sflight.
    LOOP at lt_sflight into ls_sflight.
      l_value-value = ls_sflight-planetype.
      l_value-text  = ls_sflight-planetype.
      INSERT l_value into TABLE lt_valueset.
      ENDLOOP.
      node_info->set_attribute_value_set(
      name = 'PLANETYPE'
      value_set = lt_valueset ).

  • Change Column Header / Column Background color based on a value in a specific row in the same column

    SSRS 2012
    Dataset (40 columns) including the first 3 rows for Report layout configuration (eg: the <second> row specifies the column background color).
    Starting from the 4th row, the dataset contains data to be displayed.
    I would like to change the background color of the ColumnHeader/Column based on the value in the same column in the <second> row.
    How can I accomplish the this requirement? (this must be applied for all the columns)
    Thanks

    Hi Fasttrck2,
    Per my understanding that you want to specify the background color of all the columns/column header based on the value in one special column of the special row, right?
    I have tested on my local environment and you can add expression to condition show the background color in the columns properties or the column header properties.
    Details information below for your reference:
    Specify the background color in the Column header: you can select the entire column header row and in the properties add expression in the Background color :
    If you want to specify the background color for the entire column, you can select the entire column and add the expression, repeat to add background color for other columns.
    If you want to specify the background color based on the value in the specific columns and row, you can create an hidden parameter to get the list of values from the  specific column, specify the Available values and default values by select "Get
    values from a query", finally using the expression as below to get the specific value you want:
    Expression(Backgroud Color):
    =IIF(Parameters!Para.Value(1)="1221","red","yellow")
    If your problem still exists, please try to provide some smaple data of the report and also the snapshot of the report structure to help us more effective to provide an solution.
    Any problem, please feel free to ask.
    Regards
    Vicky Liu
    If you have any feedback on our support, please click
    here.
    Vicky Liu
    TechNet Community Support

  • Change template type of region based on item value

    Hi All,
    Is it possible to change a template type of a region based on value of page item?
    For example, if I have a template type for Region A as Hide/Show region and template type for Region B as Hide/Show as well.
    I want the template type of Region B to be changed to a custom template type based on the value of an item in Region A.
    Is this possible?
    Appreciate your inputs.
    Thanks!

    spriya wrote:
    Hi All,
    Is it possible to change a template type of a region based on value of page item?
    For example, if I have a template type for Region A as Hide/Show region and template type for Region B as Hide/Show as well.
    I want the template type of Region B to be changed to a custom template type based on the value of an item in Region A.
    Is this possible?No. You'd either need to have 2 instances of Region B based on different templates, and render one of them conditionally according to the Region A value; or develop a single template with a structure flexible enough to be used in both cases, and change its appearance/behaviour by for example, swapping classes in a Dynamic Action.

  • Can we translate in captivate 7? I Have tried and changed the Caption and Notes. Can we change the on screen text of te normal slides, interactive call out boxes, screen recording slides and quizzes? If yes, please let me know the process.

    Can we translate in captivate 7? I Have tried and changed the Caption and Notes. Can we change the on screen text of te normal slides, interactive call out boxes, screen recording slides and quizzes? If yes, please let me know the process.

    Of course! Here ya go
    For the record, I did create a new project with only two slides to try and duplicate the issue. I had the same problem. I unchecked the Mouse Click Sound check box, republished and the slide auto advanced. I'm wondering if a default sound file was somehow moved or deleted? I discussed uninstalling and reinstalling C7 onto my laptop, but that's a frustrating solution haha

  • How do I change the query based on parameter value

    hi,
    Based on parameter value I want to change my query. If paramter value is 'O' i want the 'order by depno' in query if the value is null i don't want the order by clause.
    How do I achieve this.
    Thanks
    Ram

    U can use lexical parameter
    i.e u create one user parameter and in query
    u use this parameter with &param_name
    ex.
    select val,prize from stock where sr_no > :srno
    orderby &ord_by
    here ord_by is lexical parameter
    and set its intial value to 'sr_no'
    so u can get result order by sr_no
    this parameter is set from form so u will give condition in form and depending
    on condition u will pass this parameter from form.

Maybe you are looking for

  • Logic 8/Leop - Performance question in the interface...SLOW???

    Dears, just installed Logic Studio. I'm running it on the latest G5 Imac, Leopard, 2.5 GB of RAM. To note, i installed some of the audio content (actually the ~22GB pack that you can choose where to install) on a fast external HD, connected via FireW

  • Problem with searching for 'empty' emails with BAPI_BUPA_SEARCH

    Dear ABAP'ers. I have got a small problem with BAPI_BUPA_SEARCH. I Use this BAPI to search for Business Partners with the Email condition. I put rhe Email to lv_email variable, it works ok.     lv_email = ' '     CALL FUNCTION 'BAPI_BUPA_SEARCH'     

  • Need help in SQL Queries using GUI controls or variables

    Hello, all I have a big problem (I have already had with Visual Basic a few mounths ago) with Java while writing my SQL Queries. I would like to know how I must do to use variable data or GUI control data in my SQL Query to select only some records.

  • Position Page Dimension in FR

    In Financial Reporting (9.3.1), when i create a report with a page dimension, in the html version of the report, the page drop-down is always in the middle of the page. Is there a way to move and position this page drop-down to some other places, for

  • IPhoto slideshow - how to mute all videos?

    Hi there I've put together an iPhoto 11 slideshow to be displayed during a party.  This includes photos and videos.  However, since this is really a background type thing, rather than the focus of the party, I don't want the audio from the videos to