ADD ITEMS TO DROPDOWN BOX FROM A TEXT FIELD(USER ENTERS THE ITEM) AND BOUND VALUE ALSO

I WANT TO ADD ITEMS  THE DROPDOWN BOX FROM THE TEXT FIELD(ITEM NAME) WHERE USER ENTER'S THE ITEM DESCRIPTION
AND BOUND VALUE ALSO SHOULD BE ADDED TO THE SAME ITEM.
SAME WAY REMOVE ITEMS FROM DROPDOWN BOX
PLEASE GIVE SAMPLE FORM OR JAVASCRIPT FOR THE ABOVE SCENARIO.....
INDEED HELPFUL FOR MY PROJECT PLEASE SEND ATTACHED PDF FORM

Hi Praveen,
Your form is not shared so I have not been able to access it.  But I have updated mine.  There are now two approaches, one that follows on from the above method and updates each drop down list in each row.  The second updates a separate dataset that the drop down list is bound to.  This second approach requires the remerge() method which can cause problems if your code has updates some form properties like a borders color as these will be reset, but the code is simplier and you will only have one list to maintain.  The add button click code is;
var particulars = xfa.datasets.resolveNode("particulars");
if (particulars === null)
    particulars = xfa.datasets.createNode("dataGroup","particulars");
    xfa.datasets.nodes.append(particulars);    
var particular = xfa.datasets.createNode("dataValue","particular");
particular.value = ItemName.rawValue;
var boundValue = xfa.datasets.createNode("dataValue","id");
boundValue.value = BoundValue.rawValue;
particular.nodes.append(boundValue);
boundValue.contains = "metaData";
// find sorted position to insert
for (var i = 0; i < particulars.nodes.length; i++)
    p = particulars.nodes.item(i);
    if (p.value > particular.value)
      particulars.nodes.insert(particular, p);       
             break;
// add to end if greater than all existing items
if (particular.parent === null)
    particulars.nodes.append(particular);
// clear source fields
ItemName.rawValue = null;
BoundValue.rawValue = null;
// remerge form data to pick up new item
xfa.form.remerge();
And the binding looks like;
I have updated my sample to include both methods, https://workspaces.acrobat.com/?d=OwysfJa-Q3HhPtFlgRb62g
Regards
Bruce

Similar Messages

  • Automatically update text field depending on the in select list value

    I have got 2 tables. Table A (Employee Personal Detail), Table B (Employee Academic detail). Employee no is common field between two tables).
    I have created interactive report with form on table b using in-built templates. I have added text box on form to display employee name which is stored in table A. I want to automatically display employee name depending upon value in employee no field on form. I know I can write query to get value in employee name field. It gives me error when employee no is blank. How to handle error?

    Sagar,
    For the employee name value to change according to the emp_no, your page needs to get submitted. can you use a select list with submit for emp_no? And then use the PL/SQL mentioned above to run on page submit?
    I'm not sure but I guess you can also achieve this in Ajax. May be someone expert in that could help.

  • In Flash CS6 when I embed all glyphs in a text field it corrupts the file and during a run the text

    the text no longer shows up for all texts.
    Is there a fix for this bug in CS6 flash or a work around?  I actually have to bust out the older machine and do my dev work on that.  I am wondering why I upgraded.  Please help.

    There's a Fourm for Flash Professional... this, unfortunately, isn't it.

  • I want to select a specific rectangular position from intensity graph to extract the x and y values

    I want to select specfic rectangular postion from an intensity graph to extract the X and Y values at that specific position.
    Is this possible using LabVIEW?
    @nk

    Hi nk,
    Is this possible using LabVIEW?
    Yes.
    I want to select specfic rectangular postion from an intensity graph to extract the X and Y values at that specific position.
    Just select the positions! What's your problem in doing so?
    Btw. when you select positions you already know their XY values!? I don't get the point of your task...
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • Populate drop-down list from multiple text fields.

    Just to begin, I am brand new to this application and brand new to coding in general. Anyways, this is what I am trying to accomplish. I need to populate a drop-down list from multiple text fields. I am able to populate one item using this in the calculate event:
    TextField1.rawValue
    After I type text in TextField1 and hit enter, it displays the text in the drop-down list. I need to do this but with more than just one text field to populate more options for the drop-down list. I will also need to do something similar with populating a drop-down list from selections made in multiple other drop-down lists.
    Thanks for any help you can give me.

    Thank you for your suggestion Geo Kaiser. With that, I was able to populate my drop-down lists, but now when I select an option from the drop-down list, the selection dissapears. The selection will appear briefly in the box but then dissapears although my drop-down list options remain there. Here is the code I am using for my text field to drop-down list:
    DropDownList1.clearItems()
    DropDownList1.addItem(TextField1)
    DropDownList1.addItem(TextField2)
    And here is my code for my drop-down list to populate another drop-down list:
    DropDownList3.clearItems()
    DropDownList3.addItem(DropDownList1)
    DropDownList3.additem(DropDownList2)
    Thanks again for your help. By the way, I am using Adobe Designer 7.0.

  • PR Short text getting copied to the Item text

    Hi All,
    I have a scenario in which i need the PR short text getting copied to the Item text while creating a PR. Please let me know if there are any settings for the same.
    Thanks,

    PR short text you mean line item short text field beside material is getting copied?, in such cases make sure that Item text copying rule. from where its getting copied from SPRO>Material Management> purchasing>PR>Texts for Purchase Requisitions >Define Copying Rules.
    regards,
    qsm sap

  • Caml query to retrive keyword from rich text field

    hi friends
    i am using below caml query to retrieve data from title field and Rich text field(Definition) 
    <View>
    <Query>
    <Where>
    <And>
    <Or>
    <Eq>
    <FieldRef Name=\'Title\'/>
    <Value Type=\'Text\'>'+letter+'</Value>
    </Eq>
    <Contains>
    <FieldRef Name=\'Definition\' />
    <Value Type=\'Note\'>'+letter+'</Value>
    </Contains>
    </Or>
    <Neq>
    <FieldRef Name=\'status\' />
    <Value Type=\'Text\'>Not approved</Value>
    </Neq>
    </And>
    </Where>
    <OrderBy><FieldRef Name=\'Title\' /></OrderBy>
    </Query>
    </View>
    this query is working fine. But it is retrieving some extra fields also which doesn't have the queried string. and even it is retrieving keyword from image urls which are present in rich text field. 
    Please help me to retrieve key word from plain text of rich text field.

    Hi,
    According to your post, my understanding is that you want to use caml query to retrive keyword from rich text field
    By design, when specifying a ViewFields clause, values for these fields are returned, together with a few system columns like ID, Created and Modified.
    If you query rich text field, it will return the field with HTML tags.
    To retrieve key word from plain text of rich text field, you need to use regular expression to remove the HTML tags.
    You can use the code below:
    using (SPSite site = new SPSite("http://sitename"))
    using (SPWeb spWeb = site.OpenWeb())
    SPList spList = spWeb.Lists.TryGetList("ListName");
    SPQuery qry = new SPQuery();
    if (spList != null)
    qry.Query =
    @" <Where>
    <Contains>
    <FieldRef Name='Rich_x0020_Text' />
    <Value Type='Note'>caml</Value>
    </Contains>
    </Where>";
    qry.ViewFields = @"<FieldRef Name='Title' /><FieldRef Name='Rich_x0020_Text' />";
    SPListItemCollection listItems = spList.GetItems(qry);
    foreach (SPListItem item in listItems)
    string src = item["Rich_x0020_Text"].ToString();
    Regex htmlReg = new Regex(@"<[^>]+>", RegexOptions.Compiled | RegexOptions.IgnoreCase);
    src = htmlReg.Replace(src, string.Empty);
    Console.WriteLine(src);
    Console.ReadKey();
    The result is as below:
    Best Regards,
    Linda Li
    Linda Li
    TechNet Community Support

  • I have purchased CS6 from an on line source.  The item was shipped from China.  Is it legit?

    I have purchased CS6 from an on line source.  The item hase been shipped from China.  Can this be legitimate Adobe sofware?

    The few times I have purchased Adobe software in package form, it was always shipped from inside the US.
    Now Adobe sells their software online and I would only trust Amazon outside of that.
    I don't know what you are getting,but not sure I'd want it on my computer.
    Gene

  • How to make html file from a text field data

    hi!
    I want to know how to make a file with .html extension and the data in this file should be from a text field. like i want to enter some thing in a text area and have to place it in a file on server side in html formate.

    so you told us what you want, but what is your question?

  • Where is Hint Box for Validation Text Field widget?

    I want to enter a hint for my form.
    I am following the instructions on the Adobe Using Dreamweaver CS4 page for Insert and edit the Validation Text Field widget page:
    <http://help.adobe.com/en_US/Dreamweaver/10.0_Using/WSEB5440BC-453A-4101-928C-302199E7E02F. html#WS8E6EA74E-87AC-4a81-A5CC-2DB6FB451DE0a>
    It says:
    Create a hint for a text field
    Because there are so many different kinds of formats for text fields, it is helpful to give your users a hint as to what format they need to enter. For example, a text field set with the Phone Number validation type will only accept phone numbers in the form (000) 000-0000. You can enter these sample numbers as a hint so that the text field displays the correct format when the user loads the page in a browser.
       1. Select a Validation Text Field widget in the Document window.
       2. In the Property inspector (Window > Properties), enter a hint in the Hint text box.
    However, the is no hint box in my Propeties area.
    How do I get this hint box to show up?
    Dreamweaver CS4, Windows Vista

    Hi David,
    My Property inspector looks different than what you have below.
    I do not have a Hint box and I do not have the Customize this widget.
    I did have a Hint box and the Customize this widget for CS3, howver not for CS4
    Alison

  • Display text from MySQL Text Field

    Hi,
    I am trying to display text which is stored in mysql text field. But it displays nothing. and when i try this code:
    <c:out value="${rowSrearch.pDetails}" />
    <c:set var="text" value="${rowSrearch.pDetails}"/>
    <%
    String text = (String)pageContext.getAttribute("text");
    out.print(text);
    %>
    it gives me null.
    I am just opening a resultset using <sql:query and trying to retrieve data using <c:forEach loop.
    What is the best way to retrieve data from MySQL text field.
    I am using:
    Apache2
    Tomcat 5.5.17
    MySQL 5.0.22
    mysql-connector-java-5.0.3
    Thanks

    One way is to enter them into the database with the desired formatting.

  • How to provide text formatting options to user from a text field

    Hi,
    My requirement is - in the interactive form, a comments field needs to be provided where user should be able to enter text with formatting options like
    Headers
    indentations
    bold/italic
    bullet points and numbers
    Once user enters the formatted texts in a text field, data needs to be displayed/printed in the same format. Could you help me on how to provide these formatting options to the user for a particular text field?
    I understand that once I define the text field with format XHTML (with RTF), user formatting can be captured and displayed in the same way. But I am not sure on how to provide the formatting options for the text field.
    Thank you,
    Madhu

    Hi,
    if you select a text field for Rich Text and the press Ctrl + E you'll get a bar for all available text formatting options in Acrobat/Reader.

  • From which tables i would find the delivery and billing document field..??

    I need to create an ALV report which displays the following details in the output.
    Order No  Item No     Material     Order Qty     Item Category     Plant     Delivery     Billing Document     Sales Org     Dist Channel     Division     Created By     Created On      Changed On
    For(Order No  Item No     Material     Order Qty     Item Category     Plant) i took the fields from vbap and
    for(Sales Org     Dist Channel     Division     Created By     Created On      Changed On)i took the fields from vbak..
    From which tables i would find the delivery and billing document field related to sales document.??
    need help...
    Moderator message : Requirements dumping not allowed, thread locked.
    Edited by: Vinod Kumar on Mar 6, 2012 2:53 PM

    i am new to abap...so i dont have idea about sd table relationship.
    so please reply how to add delivery and billing doc in my coding below..
    *& Report  ZINAA_SD
    REPORT  zinaa_sd.
    TABLES: vbap, vbak, vbfa.
    TYPE-POOLS: slis.
    CONSTANTS: c_x TYPE char1 VALUE 'X'.
    TYPES:
            BEGIN OF st_vbap,
             vbeln TYPE vbap-vbeln,
             posnr TYPE vbap-posnr,
             matnr TYPE vbap-matnr,
             pstyv TYPE vbap-pstyv,
             kwmeng TYPE vbap-kwmeng,
             werks TYPE vbap-werks,
            END OF st_vbap,
            BEGIN OF st_vbak,
              vbeln TYPE vbak-vbeln,
              erdat TYPE vbak-erdat,
              ernam TYPE vbak-ernam,
              vkorg TYPE vbak-vkorg,
              vtweg TYPE vbak-vtweg,
              spart TYPE vbak-spart,
              aedat TYPE vbak-aedat,
            END OF st_vbak, 
           BEGIN OF st_final,
             vbeln TYPE vbap-vbeln,
             posnr TYPE vbap-posnr,
             matnr TYPE vbap-matnr,
             pstyv TYPE vbap-pstyv,
             kwmeng TYPE vbap-kwmeng,
             werks TYPE vbap-werks,
             erdat TYPE vbak-erdat,
             ernam TYPE vbak-ernam,
             vkorg TYPE vbak-vkorg,
             vtweg TYPE vbak-vtweg,
             spart TYPE vbak-spart,
             aedat TYPE vbak-aedat,
           END OF st_final.
    DATA:
          lt_vbap TYPE TABLE OF st_vbap,
          ls_vbap TYPE st_vbap,
          lt_vbak TYPE TABLE OF st_vbak,
          ls_vbak TYPE st_vbak,
          lt_final TYPE TABLE OF st_final,
          ls_final TYPE st_final,
          lt_fieldcat TYPE slis_t_fieldcat_alv,
          ls_fieldcat TYPE slis_fieldcat_alv,
          layout TYPE slis_layout_alv,
          lt_sort TYPE slis_t_sortinfo_alv,
          ls_sort TYPE slis_sortinfo_alv.
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    SELECT-OPTIONS: s_vbeln FOR vbap-vbeln,
                    s_erdat FOR vbap-erdat.
    SELECTION-SCREEN END OF BLOCK b1.
    PERFORM select_data.
    PERFORM loop_final.
    PERFORM sort.
    PERFORM a USING:
          'VBELN' TEXT-002,
          'POSNR' TEXT-003,
          'MATNR' TEXT-004,
          'KWMENG' TEXT-005,
          'PSTYV' TEXT-006,
          'WERKS' TEXT-007,
          'VKORG' TEXT-008,
          'VTWEG' TEXT-009,
          'SPART' TEXT-010,
          'ERNAM' TEXT-011,
          'ERDAT' TEXT-012,
          'AEDAT' TEXT-013.
    PERFORM display.
    *&      Form  SELECT_DATA
          text
    FORM select_data.
      SELECT
       vbeln
       vkorg
       vtweg
       spart
       ernam
       erdat
       aedat
       INTO CORRESPONDING FIELDS OF TABLE lt_vbak
       FROM vbak
       WHERE vbeln IN s_vbeln AND erdat IN s_erdat.
      IF sy-subrc = 0.
        SORT lt_vbak by vbeln.
      ENDIF.
      SELECT
       vbeln
       posnr
       matnr
       kwmeng
       pstyv
       werks
       INTO CORRESPONDING FIELDS OF TABLE lt_vbap
       FROM vbap
       FOR ALL ENTRIES IN lt_vbak
       WHERE vbeln = lt_vbak-vbeln.
      IF sy-subrc = 0.
        SORT lt_vbap by vbeln.
      ENDIF.
    ENDFORM.                    "SELECT_DATA
    *&      Form  LOOP_FINAL
          text
    FORM loop_final.
      LOOP AT lt_vbap INTO ls_vbap.
        ls_final-vbeln = ls_vbap-vbeln.
        ls_final-posnr = ls_vbap-posnr.
        ls_final-matnr = ls_vbap-matnr.
        ls_final-kwmeng = ls_vbap-kwmeng.
        ls_final-pstyv = ls_vbap-pstyv.
        ls_final-werks = ls_vbap-werks.
        READ TABLE lt_vbak INTO ls_vbak WITH KEY vbeln = ls_vbap-vbeln BINARY SEARCH.
        ls_final-vkorg = ls_vbak-vkorg.
        ls_final-vtweg = ls_vbak-vtweg.
        ls_final-spart = ls_vbak-spart.
        ls_final-ernam = ls_vbak-ernam.
        ls_final-erdat = ls_vbak-erdat.
        ls_final-aedat = ls_vbak-aedat.
        APPEND ls_final TO lt_final.
        CLEAR ls_final.
      ENDLOOP.
      ENDFORM.                    "LOOP_FINAL
    *&      Form  SORT
          text
    FORM sort.
      ls_sort-spos = '01' .
      ls_sort-fieldname = 'VBELN'.
      ls_sort-tabname = 'LT_FINAL'.
      ls_sort-up = c_x.
      ls_sort-subtot = c_x.
      APPEND ls_sort TO lt_sort .
    ENDFORM.                    "SORT
    *&      Form  A
          text
         -->FNAME      text
         -->SELTEXT    text
         -->EMPHA      text
    FORM a USING fname TYPE string seltext TYPE string.
      IF fname = 'KWMENG'.
        ls_fieldcat-do_sum =  c_x.
      ENDIF.
      ls_fieldcat-fieldname = fname.
      ls_fieldcat-seltext_m = seltext.
      APPEND ls_fieldcat TO lt_fieldcat.
      CLEAR ls_fieldcat.
    ENDFORM.                    "A
    *&      Form  ALV
          text
    FORM display.
      layout-zebra = c_x.
      layout-colwidth_optimize = c_x.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
       EXPORTING
      I_INTERFACE_CHECK                 = ' '
      I_BYPASSING_BUFFER                = ' '
      I_BUFFER_ACTIVE                   = ' '
       i_callback_program                = sy-repid
      I_CALLBACK_PF_STATUS_SET          = ' '
      I_CALLBACK_USER_COMMAND           = ' '
      I_CALLBACK_TOP_OF_PAGE            = ' '
      I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
      I_CALLBACK_HTML_END_OF_LIST       = ' '
      I_STRUCTURE_NAME                  =
      I_BACKGROUND_ID                   = ' '
      I_GRID_TITLE                      =
      I_GRID_SETTINGS                   =
        is_layout                         = layout
        it_fieldcat                       = lt_fieldcat
      IT_EXCLUDING                      =
      IT_SPECIAL_GROUPS                 =
        it_sort                           = lt_sort
      IT_FILTER                         =
      IS_SEL_HIDE                       =
      I_DEFAULT                         = C_X
      I_SAVE                            = ' '
      IS_VARIANT                        =
      IT_EVENTS                         =
      IT_EVENT_EXIT                     =
      IS_PRINT                          =
      IS_REPREP_ID                      =
      I_SCREEN_START_COLUMN             = 0
      I_SCREEN_START_LINE               = 0
      I_SCREEN_END_COLUMN               = 0
      I_SCREEN_END_LINE                 = 0
      I_HTML_HEIGHT_TOP                 = 0
      I_HTML_HEIGHT_END                 = 0
      IT_ALV_GRAPHICS                   =
      IT_HYPERLINK                      =
      IT_ADD_FIELDCAT                   =
      IT_EXCEPT_QINFO                   =
      IR_SALV_FULLSCREEN_ADAPTER        =
    IMPORTING
      E_EXIT_CAUSED_BY_CALLER           =
      ES_EXIT_CAUSED_BY_USER            =
        TABLES
        t_outtab                          = lt_final
    EXCEPTIONS
      PROGRAM_ERROR                     = 1
      OTHERS                            = 2
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                    "ALV

  • The action could not be completed because of a conflict with the original item. The conflict may have occurred when an existing item was updated on another computer or device. Open the item again and try making your changes. If the problem continues, cont

    I have a user on an iMac 10.6 connected to our domain.  She uses Outlook web access for email on our exchange server.  Last week she received the following message which is randomly preventing her from sending emails.  She claims no attachment was involved in the original email when this all started.  I have not been able to look at her account as she is out of the office but maybe someone else dealt with this issue.  I realize this may not be Mac related but thought I'd give it a try.  She did say it occurred once over two days while working on a PC but it continued over the past weekend.
    If an internal user tries to send a message with infected attachment using Outlook Web Access, it may report the following error message: The action could not be completed because of a conflict with the original item. The conflict may have occurred when an existing item was updated on another computer or device. Open the item again and try making your changes. If the problem continues, contact technical support for your organization.
    This is because F-Secure Anti-Virus for Microsoft Exchange has detected a virus in the attachment. If the user tries to send the message again, the message will be sent but without the attachment. At the same time a blank message with an attachment named "Attachment_information.txt" will remain in the user's Drafts folder. The "Attachment_information.txt" will contain information about the virus detected in the message.

    PS - have found other posts indicating that clips smaller than 2s or sometimes 5s, or "short files" can cause this. Modern style editing often uses short takes ! Good grief I cannot believe Apple. Well I deleted a half a dozen short sections and can export, but now of course the video is a ruined piiece of junk and I need to re-do the whole thing, the sound etc. which is basically taking as much time as the original. And each time I re-do it I risk again this lovely error -50 and again trying to figure out what thing bugs it via trial and error instead of a REASONABLE ERROR MESSAGE POINTING TO THE CLIP IT CAN'T PROCESS. What a mess. I HATE this iMovie application - full of BUGS BUGS BUGS which Apple will not fix obviously, since I had this product for a few years and see just hundreds of hits on Google about this error with disappointed users. Such junk I cannot believe I paid money for it and Apple does not support it with fixes !!!
    If anyone knows of a GOOD reasonably priced video editing program NOT from APPLE I am still looking for suggestions. I want to do more video in future, but obviously NOT with iMovie !!!

  • Problem updating to iphoto 9.6 after upgrading to Yoesmite  I am getting the following message when I try top date iPhoto This update is not available for this Apple ID either because it was bought by a different user or the item was refunded or canc

    problem updating to iphoto 9.6 after upgrading to Yoesmite  I am getting the following message when I try top date iPhoto This update is not available for this Apple ID either because it was bought by a different user or the item was refunded or canc

    "This update is not available for this Apple ID either because it was bought by a different user or the item was refunded or cancelled." ?
    This error message will appear erraneously, if you skipped the update to Mavericks and iPhoto 9.5.1 and went straight from an earlier MacOS X version to Yosemite, without first updating to iPhoto 9.5.1 and associating iPhoto to your AppleID.
    Try first to buy iPhoto with your AppleID instead of updating. Delete iPhoto from Applications, but don't empty the Trash, then go to the main page of the App Store and search for iPhoto. If you are lucky, it will show as free and you can buy it directly.
    If iPhoto  is not showing as free, there is no help but contacting the App Store Support: Ask for a redemption code. You will need to provide a prove of purchase for your mac with iPhoto preinstalled.
    http://www.apple.com/support/mac/app-store/contact/

Maybe you are looking for