How to autopopulate a text field with unique data from multiple data sets

Hi,
I'm a laboratory manager in charge of a hospital project which will be using pdf forms to send and receive data from our end users across the city. I need help with the last part of our pdf form, specifically with a js that will do a bit of text-field autopopulation magic. This, unfortunately, is a beyond what I have taught myself about pdf js functionality.a
The problem:
I need to provide my end users with a text field containing a set of data [A, B, C, D, E, F ...] and the total items in this set [tot#]. The end user needs this information as part of the implementation of this particular laboratory machine.
The particulars
When the end user asks for an experiment to be run, we must specify some pieces of data to help them interpret the results. These are constructed as panels which contain discrete data elements.
For example - One experiment may use two panels, Panel#1 and Panel #2. Panel #1 includes the items A, B, D, E, Panel #2 includes the items A, B, C, F, G.
Thus, the panels may share some of the same items, but, I only want the unique members to be displayed in the text field. If I make a drop down box or checkboxes with the panels, I want to  be able to select the panels that we ran and (in this example) have the text field display only the unique items among all the panels that were used:
textfield outpute = A, B, C, D, E, F, G - 7 total.
Any assistance from the pdf community would be very much appreciated.
Thanks!

Thanks for that help.
I should have made it more apparent that I'm very new to scripting and I'm
not a programmer by trade. I have a few questions before modifying the code
you kindly provided.
1) Where should I embed this script? Within the 'selection change' area of
my listbox?
2) Can I replace the term 'arr' with the names of the various items in my
listbox or should I put 'arr#' as the output value for each term?
3) Will this script find and display the unique values when a user selects
multiple items in my listbox?
4) How does the script know where to output the unique members of the
combined set?
I appreciate your patience with me.
ck

Similar Messages

  • Auto populate blank text fields with n.a from a button or on print out.

    This seems straight forward but I cannot find an existing questions on this topic.
    I would like to add a form function that will fill any blank text fields with n.a. I do not want to use the default field value as I think it will cause confusion and cannot be applied for text fields formatted for dates. Is it possible to run a script that can do this? It would be OK if the action was triggered from a button or print activity after the rest of the form has been completed.
    Any thoughts would be appreciated.
    Thanks

    The question is whether your form is used only for filling out on screen (and not as a level 0 form, being printed out and filled out manually).
    If so, why not make the default value of the concerned fields to be "n/a" (or whatever you want to name them). That would relieve you from any validating before printing.
    Otherwise, you could maintain a list of field names which should get the n/a value if empty. This list would be an array.
    Your code in the willPrint event (if you want to have it reliably) would then look like this:
    for (var i = 0 ; i < nafieldarray.length ; i++) {
    if (this.getField(nafieldarray[i]).value == this.getField(nafieldarray[i]).defaultValue) {
    this.getField(nafieldarray[i].value = "n/a") ;
    HTH.
    Max Wyss.

  • How to populate a text field by some value from table in Oracle seeded page through Personalization?

    I have to populate Description field by default in AGIS page (Advanced Global Intercompany System).
    Field Description:
    messageTextInput: Description
    VO: FunTrxHeaderVO
    VO Attribute: Description
    VO is entity based.
    Now if the field is null then I have to populate this value by some value from table for selected batch_id.
    Example:
    (SELECT DESCRIPTION FROM fun_trx_batches WHERE batch_id =
    211061)
    Also, this value is being populated in the Batch Information region in the same page. So the problem is also be treated as to copy a value from one messageStyledText to messageTextInput in a same page.
    Can this be done through personalization, w/o coding?
    Please suggest if you any idea how to resolve..
    Regards,
    Pahari

    Not sure why it is not displying in the front page list??
    I have to search it.
    Admin team, please help.
    Regards,
    Pahari

  • Autopopulate a text field in a table from table

    I am not sure if it is possible but I will explain what I would like to do:-
    I have a table which allows the user to add a name, they also have the ability to add additional names to the table. What I would then like to do is auto populate another table with those details.
    Any assistance would be appreciated.

    Hi,
    If you had textfield objects that were outside of a table, then you would have the same name for both objects and use the global binding (see the Object > Binding palette).
    This effectively gives you two-way binding. Whatever a user types into one field, will automatically appear in the other.
    However this may not work with textfields in tables, or certainly not in dynamic tables where the user can add rows. This is because the value in an object in one row will be repeated in ALL rows.
    So if you have a static table where the user cannot add rows, then you could set up the rows and objects with different names. The associated static table would have the same naming structure. Then global binding would work.
    If the table is dynamic, then I have a scripted example here, where there is a loop on the exist event that runs through the table and replicates the data in the associated table. See here: http://assure.ly/eTOXaH.
    Hope that helps,
    Niall

  • How can i import the data from multiple sources into single rpd in obiee11g

    how can i import the data from multiple sources into single rpd in obiee11g

    Hi,
    to import from multiple data sources, first configure ODBC connections for respective data sources. then you can import data from multiple data sources. When you import the data, a connection pool will create automatically.
    tnx

  • How do I add and remove text in a text field with a checkbox?

    How do I add and/or remove text in a text field with a checkbox?
    this is my script in the text box......
    event.value="Hello, this is my narrative. \r\n\nFamily: \r\n\n" + this get.Field("FirstName").value + " " + this.getField("LastName").value + was born on"=this.getField("DOB.value + "\r\n\n + this.getField("drpField").value + "\r\n\n" + this getField("Father").value
    The text box looks like this...
    Hello, this is my narrative.
    FAMILY:
    John Smith was born on 08/02/2000
    Boby Lou
    Jack Smith
    I need to add/or remove the father field (Jack Smith) & r/n/n with a check box.
    Does anyone know how to do this?

    There are multiple errors in your code...
    Use this code instead (adjust the name of the check-box):
    var msg = "Hello, this is my narrative. \r\n\nFamily: \r\n\n" + this get.Field("FirstName").value + " " + this.getField("LastName").value + was born on" + this.getField("DOB.value) + "\r\n\n" + this.getField("drpField").value;
    if (this.getField("FatherCheckBox").value!="Off")
         msg += "\r\n\n" + this getField("Father").value;
    event.value = msg;

  • How to create Using Formatted Text Field with multiple Sliders?

    Hi i found the Java Sun tutorial at http://java.sun.com/docs/books/tutorial/uiswing/components/slider.html very useful, and it tells how to create one Formatted Text Field with a Slider - however i need to create Formatted Text Field for multiple Sliders in one GUI, how do i do this?
    my code now is as follows, and the way it is now is scroll first slider is okay but scrolling second slider also changes value of text field of first slider! homework due tomorrow, please kindly help!
    // constructor
    label1 = new JLabel( "Individuals" );
    scroller1 = new JSlider( SwingConstants.HORIZONTAL,     0, 100, 10 );
    scroller1.setMajorTickSpacing( 10 );
    scroller1.setMinorTickSpacing( 1 );
    scroller1.setPaintTicks( true );
    scroller1.setPaintLabels( true );
    scroller1.addChangeListener(this);
    java.text.NumberFormat numberFormat = java.text.NumberFormat.getIntegerInstance();
    NumberFormatter formatter = new NumberFormatter(numberFormat);
            formatter.setMinimum(new Integer(0));
            formatter.setMaximum(new Integer(100));
    textField1 = new JFormattedTextField(formatter);
    textField1.setValue(new Integer(10)); //FPS_INIT
    textField1.setColumns(1); //get some space
    textField1.addPropertyChangeListener(this);
    //React when the user presses Enter.
    textField1.getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0),  "check");
            textField1.getActionMap().put("check", new AbstractAction() {
                public void actionPerformed(ActionEvent e) {
                    if (!textField1.isEditValid()) { //The text is invalid.
                        Toolkit.getDefaultToolkit().beep();
                        textField1.selectAll();
                    } else try {                    //The text is valid,
                        textField1.commitEdit();     //so use it.
                    } catch (java.text.ParseException exc) { }
    label2 = new JLabel( "Precision" );
    scroller2 = new JSlider( SwingConstants.HORIZONTAL, 0, 100, 8 );
    scroller2.setMajorTickSpacing( 10 );
    scroller2.setMinorTickSpacing( 1 );
    scroller2.setPaintTicks( true );
    scroller2.setPaintLabels( true );
    scroller2.addChangeListener(this);
    textField2 = new JFormattedTextField(formatter);
    textField2.setValue(new Integer(10)); //FPS_INIT
    textField2.setColumns(1); //get some space
    textField2.addPropertyChangeListener(this);
    //React when the user presses Enter.
    textField2.getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0),  "check");
            textField2.getActionMap().put("check", new AbstractAction() {
                public void actionPerformed(ActionEvent e) {
                    if (!textField2.isEditValid()) { //The text is invalid.
                        Toolkit.getDefaultToolkit().beep();
                        textField2.selectAll();
                    } else try {                    //The text is valid,
                        textField2.commitEdit();     //so use it.
                    } catch (java.text.ParseException exc) { }
    // State Changed
         public void stateChanged(ChangeEvent e) {
             JSlider source = (JSlider)e.getSource();
             int fps = (int)source.getValue();
             if (!source.getValueIsAdjusting()) { //done adjusting
                  if(source==scroller1)   {
                       System.out.println("source ==scoller1\n");
                       textField1.setValue(new Integer(fps)); //update ftf value
                  else if(source==scroller2)     {
                       System.out.println("source ==scoller2\n");
                       textField2.setValue(new Integer(fps)); //update ftf value
             } else { //value is adjusting; just set the text
                 if(source==scroller1)     textField1.setText(String.valueOf(fps));
                 else if(source==scroller2)     textField2.setText(String.valueOf(fps));
    // Property Change
        public void propertyChange(PropertyChangeEvent e) {
            if ("value".equals(e.getPropertyName())) {
                Number value = (Number)e.getNewValue();
                if (scroller1 != null && value != null) {
                    scroller1.setValue(value.intValue());
                 else if (scroller2 != null && value != null) {
                    scroller2.setValue(value.intValue());
        // ACTION PERFORMED
        public void actionPerformed(ActionEvent event) {
        if (!textField1.isEditValid()) { //The text is invalid.
            Toolkit.getDefaultToolkit().beep();
            textField1.selectAll();
        } else try {                    //The text is valid,
            textField1.commitEdit();     //so use it.
        } catch (java.text.ParseException exc) { }
             if (!textField2.isEditValid()) { //The text is invalid.
            Toolkit.getDefaultToolkit().beep();
            textField2.selectAll();
        } else try {                    //The text is valid,
            textField2.commitEdit();     //so use it.
        } catch (java.text.ParseException exc) { }
    ...

    if :p3_note_id is null
    then
    insert into notes (project_id, note, notes_month, notes_year) So, p3_note_id is NULL.
    Another option is that you have a trigger on table NOTES that generates a new note_id even for an update.

  • How to add an animation to a text field with two lines?

    I have a text field with two or more lines. Why isn't it possible now to apply a text animation?

    For certain tasks, Titler and its Presets can be very good, and can simplify things greatly.
    However, when one gets beyond the limitations of the Titler, I really like to create my Titles in Photoshop, and Import those as Still Images into my Project. I then use the power of Keyframing various Effects over time. This allows me much more control, BUT does require more hand-work. Still, that added control is too important to me, and I sort of like doing the handwork.
    For the "alignment" of multiple Titles, to get multiple lines of Text, you can create the first Title, and then chose Duplicate Title. Initially, that will be identical, but you just change it, as is necessary. After you have changed that "second line of Text," place that Duplicate on the next Video Track, above the first Title, and use the Fixed Effect>Motion>Position, to move it down, to where it would be (by the height of the font, plus any desired Leading), if one had created a second line of Text on one Title.
    I also like to use Alignment Grids, when things get critical, and create those in Photoshop, with a trasparent background, and just place them, on say Video Track 2, with all of my Titles above that. Just do not forget to remove any Alignment Grids, before you Export/Share the Timeline, or they will be part of the output video.
    For more background on Keyframing (so very useful with more than just Titles), Steve Grisetti has done a multi-part tutorial, available as Basic Keyframing on Muvipix.com. I highly recommend it. Keyframing is simple to do, but can be a bit of a tough concept to grasp initially, and it's a subject that is tough to write about - takes longer to type instructions, than to do the work.
    Good luck,
    Hunt
    PS - Do not know if you saw them, but Titler has two Alignment Tools - Align Horizontally, and Align Vertically, that can be helpful to center Text.

  • How can I have two fields with the same name if it makes sense?

    Hello, folks :)
    I have a pretty hard time figuring out how I can have two text fields with the same binding name.
    The whole problem is that when I need two fields with the same binding name they are still differnent coz they have the same name but differnt indices.
    I should make a form filled at runtime by merging a pdf form file and an fdf file data file. And I have no choice to do it differently. And my form file needs some data like customerName, companyName twice in one form. But there's only one possible buinding name indexed zero.
    How can I create a field with absolutely the same name or is it just impossible due to possible name conflicts? And is there a workaround to this problem? I just need one piece of data repeated in different places.
    Thanks for your replies :)
    P.S. if u think that the problem is not clear enough let me know. I'll supply you with more details. But the general process can not be changed.
    One pdf should be mergred with an fdf with as the result of their merge a new filled and flattened form. I have no control over fdfs their are generated by Oracle and I can not fill the form using XML files coz this process should be integrated in a working application.

    I just thought about a really ugly workaround with a server-side script adding values to fdf files but it's a bit of work and tests and personally i think it's a bad idea :-(

  • How to populate the TEXT field in MIGO

    Hi folks,
    While creating material document in MIGO or MB01, i am inserting some data in TEXT ( Field in line item level ). This text data is disappearing , once mat doc is created.
    how to populate the TEXT field in MIGO?Is there any cusomisation?it's urgent .
    Regards
    pabi

    Hello Pabitra,
    I had a similar issue in my Project.
    Please verify if the SMOD enhancement MBCF0002 (EXIT_SAPMM07M_001) is active in your system.
    If this is the case, verify from two angles:
    a) Whether the Enhancement was accidentally activated - If yes, then De-activate the same
    b) If there is some logic coded in the User Exit, but, the Text is somehow not determined...even the existing content in the text field (input to EXIT_SAPMM07M_001) will get vanished.
    Hope that your problem will be resolved by this.  Pls reward points.
    With Regards
    Vijay Gajavalli

  • How can I add javascript text fields to Acrobat pages from Applescript please?

    I have a real need to add text fields to Acrobat document pages from Applescript. I can't access the Headers and Footers from Applescript in Acrobat XI. I can set watermarks using the following script, but cannot for the life of me work out how to add text fields. Any advice please?
    Regards
    set TempAttachmentName to "(20140717121212Z)"
    set PreserveFileName to "This is a test"
    set bypass to false
    tell application "Adobe Acrobat Pro"
      activate
      set CountOfPages to count of pages
      repeat with PageCounter from 1 to CountOfPages
      tell application "System Events" to tell process "AdobeAcrobat"
      try
      click menu item "Page..." of menu 1 of menu item "Go To" of menu 1 of menu bar item "View" of menu bar 1
      tell current application to delay 0.1
      keystroke PageCounter as text
      tell current application to delay 0.1
      keystroke return
      if not bypass then
      my ADDHeaderFooter(TempAttachmentName, PreserveFileName & " " & CountOfPages, PageCounter)
      end if
      end try
      end tell
      end repeat
    end tell
    on ADDHeaderFooter(The_String1, The_String2, currentPage)
      tell application "Adobe Acrobat Pro"
      activate
      set myDocument to document 1
      tell myDocument
      tell page currentPage
      set cbox to crop box
      set item 2 of cbox to (item 2 of cbox) + 44
      set item 4 of cbox to (item 4 of cbox) - 44
      set media box to cbox
      set crop box to cbox
      set theResult1 to my Add_WaterMarkText(The_String1, "IDAutomationHC39M", 12, 1, 1, 1, 0, 3, 10, 3, 0)
      do script theResult1
      set theResult2 to my Add_WaterMarkText(The_String2, "Times", 16, 1, 1, 1, 0, 4, 10, -6, 0)
      do script theResult2
      end tell
      end tell
      end tell
    end ADDHeaderFooter
    on Add_WaterMarkText(cText, cFont, nFontSize, nS, nE, nTA, nHA, nVA, nHV, nVV, nR)
      set Params to "cText: '" & cText & "'," & return
      set Params to Params & "cFont: '" & cFont & "'," & return
      set Params to Params & "nFontSize: '" & nFontSize & "'," & return
      if class of nS is integer then set Params to Params & "nStart: " & (nS - 1) & "," & return
      if class of nE is integer then set Params to Params & "nEnd: " & (nE - 1) & "," & return
      -- 0 = left, 1 = centre, 2 = right
      if class of nHA is integer then set Params to Params & "nHorizAlign: " & nHA & "," & return
      -- 3 = top, 4 = bottom
      if class of nVA is integer then set Params to Params & "nVertAlign: " & nVA & "," & return
      -- offset in points
      if class of nHV is integer then set Params to Params & "nHorizValue: " & nHV & "," & return
      -- offset in points
      if class of nVV is integer then set Params to Params & "nVertValue: " & nVV & "," & return
      if class of nR is integer then set Params to Params & "nRotation: " & nR & "," & return
      set javascript to "this.addWatermarkFromText({" & Params & "});"
      return javascript
    end Add_WaterMarkText

    G'day
    Unfortunately I don't have the API. My Adobe Reader installation updating to version XI failed, and subsequent attempts to fall back on the X version are blocked by the partial install of XI. Damn Adobe stuff.
    Could someone please post the relevant part of the API to give me some pointers, please.
    I ha mucked about with some information I found on the Web, and come up with the following, which fails because I can't work out how to address the current document with the variable myDoc.
    Regards, Brian
    set Params to Params & "var myDoc = this;" & return
    set TempAttachmentName to "(20140717121212Z)"
    set PreserveFileName to "This is a test"
    set bypass to false
    tell application "Adobe Acrobat Pro"
      activate
      set CountOfPages to count of pages
      repeat with PageCounter from 1 to 1 # CountOfPages
      tell application "System Events" to tell process "AdobeAcrobat"
      try
      click menu item "Page..." of menu 1 of menu item "Go To" of menu 1 of menu bar item "View" of menu bar 1
      tell current application to delay 0.1
      keystroke PageCounter as text
      tell current application to delay 0.1
      keystroke return
      if not bypass then
      my ADDHeaderFooter(TempAttachmentName, PreserveFileName & " " & CountOfPages, PageCounter)
      end if
      end try
      end tell
      end repeat
    end tell
    on ADDHeaderFooter(The_String1, The_String2, currentPage)
      tell application "Adobe Acrobat Pro"
      activate
      set myDoc to document 1
      tell myDoc
      tell page currentPage
      set cbox to crop box
      set item 2 of cbox to (item 2 of cbox) + 44
      set item 4 of cbox to (item 4 of cbox) - 44
      set media box to cbox
      set crop box to cbox
      set theResult1 to my Add_WaterMarkText(The_String1, "IDAutomationHC39M", 12, 1, 1, 1, 0, 3, 10, 3, 0, myDoc)
      do script theResult1
      set theResult2 to my Add_WaterMarkText(The_String2, "Times", 16, 1, 1, 1, 0, 4, 10, -6, 0, myDoc)
      do script theResult2
      end tell
      end tell
      end tell
    end ADDHeaderFooter
    on Add_WaterMarkText(cText, cFont, nFontSize, nS, nE, nTA, nHA, nVA, nHV, nVV, nR, myDoc2)
      #set Params to "var myDoc = app.newDoc();" & return
      set Params to ""
      set Params to Params & "var myDoc = this;" & return
      set Params to Params & "var inch = 72;" & return
      set Params to Params & "var Bbox = this.getPageBox(" & "\"Crop\"" & ");" & return
      set Params to Params & "var f = myDoc.addField(" & "\"Text1\"" & ", " & "\"" & cText & "\"" & ", 0, [72, Bbox[1]-inch, Bbox[2]-2*inch, Bbox[1]-2*inch ] );" & return
      set Params to Params & "f.strokecolor = color.black;" & return
      set Params to Params & "f.richText = true;" & return
      set javascript to Params
      return javascript
    end Add_WaterMarkText

  • Apex 4.02 BUG: text field with autocomplete. wrong help text

    Following the wizard for a text field with autocomplete you reach a screen where you can enter a LOV query. The text area for the query has the following help text
    Enter the query that will return the list of values. The query must select two columns in the following order, first a display value then a return value. For example:
    select ename, empno
    from emp
    When selecting two identical columns, be sure to use unique column aliases, for example:
    select ename d, ename r
    from emp
    However the query should return only 1 value.

    Thanks Rene, I have fixed that in 4.1.
    Regards
    Patrick
    My Blog: http://www.inside-oracle-apex.com
    APEX 4.0 Plug-Ins: http://apex.oracle.com/plugins
    Twitter: http://www.twitter.com/patrickwolf

  • How can i use text expander with the new Mavericks,

    how can i use text expander with the new Mavericks,

    I regret upgrading to mavericks for the same reason
    ftamez wrote:
    how can i use text expander with the new Mavericks,
    Now I have been searching - and you have to buy an app and it will cost you $34.99 (what a rip off)

  • How to add new text field in standard report

    how to add new text field in standard report?

    Hi,
    I presume you are talking about a report display in ALV and u wish to add a column to it .
    If it is a global requirement ,as in table being used there in ALV can be modified, then you can append the table and the system should pick up the same automatically from there.
    Otherwise , you can make a Z program . Modify the catalog being used in ALV.
    Regards,
    Shweta

  • Auto populate text fields with a trigger such as entering text into input fields in ADF

    Hello all,
    I am not able to auto populate text fields with a trigger such as entering text into input fields in ADF.
    I tried AdfFacesContext.getCurrentInstance().addPartialTarget(val); in the back end using setter method of input text field.
    its not working ..
    is there any way to achieve it
    Regards,
    Shakir

    Hi,
    Always mention your JDev version.
    The valueChangeListener would fire only when you set the autoSubmit property of the field to true. Can you elaborate your requirement? What do you mean by related data? Are you performing some sort of search?
    If you want to get the value you entered on the field, just set autoSubmit to true and get the new value from the valueChangeListener. If your requirement is something like as and when you type, do something, you need to check out this approach :https://blogs.oracle.com/groundside/entry/auto_reduce_search_sample
    -Arun

Maybe you are looking for

  • Adobe Creative Cloud app doesn't run

    Just tried to use my newly Adobe Creative Cloud app today after signing up for an Adobe creative cloud account. I have Mavrick Version 10.9.3 and I cannot run the application Adobe creative cloud app. Every time I run the program it starts to load an

  • Sender port in control record

    Hey guys i m trying to test my IDOC to FIle scenario and in WE19 i m getting an error with status 37 saying that sender port in control records is invalid. i have created the Sender port correctly in WE21,what might the problem be? thanx ahmad

  • In range and coerce on time stamps

    Is there any reason why I shouldn't be able to use in range and coerce on time stamps?  In this VI the value is not being coerced, but the output for in-range is false.  With values out of range, it DOES coerce the output.  Jim LV 2013 Solved! Go to

  • Icons are gone in MyGtkMenu after gnome update

    Hello, the icons of MyGtkMenu disappeared after the gnome 2.28 update, does somebody have the same issue?

  • How to create a folders and sub folders in solution manager ?

    Hi gurus, i want  2 know how to create folders and subfolders inside solution manager under configuration structure or business blue print  structure. tell me in detailed Thank you Regards sasikanth