Ignore case

Is there a way to have the script ignore top and bottom case?

I have a script that creates a table from the drop-down items then compares users to input to see if there is a football game. The user needs to know to capitilize the first letter, or a match will not be found. I want the script to find a match, even if they don't capitalize the first letter. Here's the script:

// Check that the user has not typed in a value 
// that does not exist in the list. If they have
// then clear the dropdown. 
// First create an array of the items in the 
// dropdown list.
var vUserInput = [];
for (var i=0; i<this.length; i++) {
 vUserInput.push(this.getDisplayItem(i));
}
// Check that the value is not in the array
if (this.rawValue !== null && vUserInput.lastIndexOf(this.rawValue) === -1) {
 this.rawValue = null; // clear the dropdown
 xfa.host.beep("3"); // audio alert to the user
 this.ui.oneOfChild.border.fill.color.value = "255,225,225"; // red
} 

Ok

You can use the example of Bruce, that already does what you are looking for.

http://forums.Adobe.com/message/2372156#2372156#2372156#2372156 (it's the countries.pdf and xml)

Tags: Adobe LiveCycle

Similar Questions

  • Expection while using the string (compare-ignore-case, uppercase) function

    Hi all

    I am using soa suite 11.1.1.6

    JDeveloper 11.1.1.6

    I tried to use the string functions (only 2 xp20:upper - box (), oraext:compare-ignore-case()) with an xpath expression. But it is throwing an error saying that the xpath expression is invalid. I used the same xpath expression in an assign activity that works very well. The string functions are works well when it is used with constants. But the case failed when they are used together this way

            <assign name="Assign1">
                <copy>
                    <from expression="bpws:getVariableData(xp20:upper-case('inputVariable','payload','/client:LoanEligibiltyRequest/client:LoanType'))"/>
                    <to variable="HL"/>
                </copy>
            </assign>
    

    This is the log

    < 1 July 2013 19:07:10 IST > < error > < oracle.soa.bpel.engine.dispatch > < BEA-0000

    00 > < could not handle message

    javax.xml.xpath.XPathExpressionException: internal error xpath

    at oracle.xml.xpath.JXPathExpression.evaluate(JXPathExpression.java:242)

    at com.collaxa.cube.xml.xpath.BPELXPathUtil.evaluate(BPELXPathUtil.java:)

    247)

    Thanks in advance

    It may be wise to cast to a string also. Sometimes you get the signatures of the rear instead of content element if you specify.

  • TableFileterDemo - ignore case

    I have implemented the code from the java tutorials 'TableFilterDemo' in a part of my code and got it working. I tried to tweak it a little to have it ignore case when you enter text to filter. I took a quick glance at the String class and the equalsIgnoreCase but I am not comparing in this case. I also went the route of the pattern:
    final int flags = Pattern.CANON_EQ | Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE;
    pattern = Pattern.compile(filterText, flags);
    but who broke it where it would not filter anything. Any ideas on what I might be missing?
    package tablefilter;
    
    /*
     * Copyright (c) 1995, 2008, Oracle and/or its affiliates. All rights reserved.
     *
     * Redistribution and use in source and binary forms, with or without
     * modification, are permitted provided that the following conditions
     * are met:
     *
     *   - Redistributions of source code must retain the above copyright
     *     notice, this list of conditions and the following disclaimer.
     *
     *   - Redistributions in binary form must reproduce the above copyright
     *     notice, this list of conditions and the following disclaimer in the
     *     documentation and/or other materials provided with the distribution.
     *
     *   - Neither the name of Oracle or the names of its
     *     contributors may be used to endorse or promote products derived
     *     from this software without specific prior written permission.
     *
     * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
     * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
     * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
     * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR
     * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
     * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
     * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
     * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
     * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
     * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
     * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     */ 
    
    /*
     * TableFilterDemo.java requires SpringUtilities.java
     */
    
    import javax.swing.*;
    
    public class TableFilterDemo extends JPanel {
        private boolean DEBUG = false;
        private JTable table;
        private JTextField filterText;
        private JTextField statusText;
        private TableRowSorter<MyTableModel> sorter;
    
        public TableFilterDemo() {
            super();
            setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));
    
            //Create a table with a sorter.
            MyTableModel model = new MyTableModel();
            sorter = new TableRowSorter<MyTableModel>(model);
            table = new JTable(model);
            table.setRowSorter(sorter);
            table.setPreferredScrollableViewportSize(new Dimension(500, 70));
            table.setFillsViewportHeight(true);
    
            //For the purposes of this example, better to have a single
            //selection.
            table.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
    
            //When selection changes, provide user with row numbers for
            //both view and model.
            table.getSelectionModel().addListSelectionListener(
                    new ListSelectionListener() {
                        public void valueChanged(ListSelectionEvent event) {
                            int viewRow = table.getSelectedRow();
                            if (viewRow < 0) {
                                //Selection got filtered away.
                                statusText.setText("");
                            } else {
                                int modelRow = 
                                    table.convertRowIndexToModel(viewRow);
                                statusText.setText(
                                    String.format("Selected Row in view: %d. " +
                                        "Selected Row in model: %d.", 
                                        viewRow, modelRow));
                            }
                        }
                    }
            );
    
    
            //Create the scroll pane and add the table to it.
            JScrollPane scrollPane = new JScrollPane(table);
    
            //Add the scroll pane to this panel.
            add(scrollPane);
    
            //Create a separate form for filterText and statusText
            JPanel form = new JPanel(new SpringLayout());
            JLabel l1 = new JLabel("Filter Text:", SwingConstants.TRAILING);
            form.add(l1);
            filterText = new JTextField();
            //Whenever filterText changes, invoke newFilter.
            filterText.getDocument().addDocumentListener(
                    new DocumentListener() {
                        public void changedUpdate(DocumentEvent e) {
                            newFilter();
                        }
                        public void insertUpdate(DocumentEvent e) {
                            newFilter();
                        }
                        public void removeUpdate(DocumentEvent e) {
                            newFilter();
                        }
                    });
            l1.setLabelFor(filterText);
            form.add(filterText);
            JLabel l2 = new JLabel("Status:", SwingConstants.TRAILING);
            form.add(l2);
            statusText = new JTextField();
            l2.setLabelFor(statusText);
            form.add(statusText);
            SpringUtilities.makeCompactGrid(form, 2, 2, 6, 6, 6, 6);
            add(form);
        }
    
        /** 
         * Update the row filter regular expression from the expression in
         * the text box.
         */
        private void newFilter() {
            RowFilter<MyTableModel, Object> rf = null;
            //If current expression doesn't parse, don't update.
            try {
                rf = RowFilter.regexFilter(filterText.getText(), 0);
            } catch (java.util.regex.PatternSyntaxException e) {
                return;
            }
            sorter.setRowFilter(rf);
        }
    
    
    
    
        class MyTableModel extends AbstractTableModel {
            private String[] columnNames = {"First Name",
                                            "Last Name",
                                            "Sport",
                                            "# of Years",
                                            "Vegetarian"};
            private Object[][] data = {
             {"Kathy", "Smith",
              "Snowboarding", new Integer(5), new Boolean(false)},
             {"John", "Doe",
              "Rowing", new Integer(3), new Boolean(true)},
             {"Sue", "Black",
              "Knitting", new Integer(2), new Boolean(false)},
             {"Jane", "White",
              "Speed reading", new Integer(20), new Boolean(true)},
             {"Joe", "Brown",
              "Pool", new Integer(10), new Boolean(false)}
            };
    
            public int getColumnCount() {
                return columnNames.length;
            }
    
            public int getRowCount() {
                return data.length;
            }
    
            public String getColumnName(int col) {
                return columnNames[col];
            }
    
            public Object getValueAt(int row, int col) {
                return data[row][col];
            }
    
            /*
             * JTable uses this method to determine the default renderer/
             * editor for each cell.  If we didn't implement this method,
             * then the last column would contain text ("true"/"false"),
             * rather than a check box.
             */
            public Class getColumnClass(int c) {
                return getValueAt(0, c).getClass();
            }
    
            /*
             * Don't need to implement this method unless your table's
             * editable.
             */
            public boolean isCellEditable(int row, int col) {
                //Note that the data/cell address is constant,
                //no matter where the cell appears onscreen.
                if (col < 2) {
                    return false;
                } else {
                    return true;
                }
            }
    
            /*
             * Don't need to implement this method unless your table's
             * data can change.
             */
            public void setValueAt(Object value, int row, int col) {
                if (DEBUG) {
                    System.out.println("Setting value at " + row + "," + col
                                       + " to " + value
                                       + " (an instance of "
                                       + value.getClass() + ")");
                }
    
                data[row][col] = value;
                fireTableCellUpdated(row, col);
    
                if (DEBUG) {
                    System.out.println("New value of data:");
                    printDebugData();
                }
            }
    
            private void printDebugData() {
                int numRows = getRowCount();
                int numCols = getColumnCount();
    
                for (int i=0; i < numRows; i++) {
                    System.out.print("    row " + i + ":");
                    for (int j=0; j < numCols; j++) {
                        System.out.print("  " + data[i][j]);
                    }
                    System.out.println();
                }
                System.out.println("--------------------------");
            }
        }
    
        /**
         * Create the GUI and show it.  For thread safety,
         * this method should be invoked from the
         * event-dispatching thread.
         */
        private static void createAndShowGUI() {
            //Create and set up the window.
            JFrame frame = new JFrame("TableFilterDemo");
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    
            //Create and set up the content pane.
            TableFilterDemo newContentPane = new TableFilterDemo();
            newContentPane.setOpaque(true); //content panes must be opaque
            frame.setContentPane(newContentPane);
    
            //Display the window.
            frame.pack();
            frame.setVisible(true);
        }
    
        public static void main(String[] args) {
            //Schedule a job for the event-dispatching thread:
            //creating and showing this application's GUI.
            javax.swing.SwingUtilities.invokeLater(new Runnable() {
                public void run() {
                    createAndShowGUI();
                }
            });
        }
    }
    sorter.setRowFilter(RowFilter.regexFilter("(?i)" + text));
    

    works for ASCII, but does not work for Latin1-X and an other character sets for some close down characters (on the keaboard)

    Please for Swing rellated question is he Swing

  • How can I get replaceAll function ignore case?

    In flex and I can't seem to get the function replaceAll for strings ignoring case. For example, I

    var str:String = "This Is a Test string";

    var searchTxt:String = "is";

    public static void StringReplaceAll (source: String, find: String, replace: String): String

    {
    return source.split (find) .comes (replacement);
    }

    StringReplaceAll (str, searchTxt, ('< b >' + searchTxt + '< /b >'));

    Output:This is a Test string

    Expected results: This is a Test string

    Have you used the StringFunc API?

    StringFunc.replaceAllNoCase (str, searchTxt, ("" + searchTxt + ""));

    Please let me know if it works.

    Thank you

    Sam

  • Find a VM by RegEx name - how to ignore case

    Hello

    In vCO, there is a standard Action that looks like this:

    ----------

    Get all Virtual Machines for all vCenter connections defined for this plugin

    var allVms = VcPlugin.getAllVirtualMachines ();

    machines virtual var = new Array();

    Make sure the virtual machine matches the regular expression

    for (var i in allVms) {}

    If (allVms [i].name.match (regexp)) {}

    VMS.push (allVms [i]);

    }

    }

    VMList = MV;

    ----------

    How can I do this actions ignore the case. I searched this in Java script and found that I have to add "/ I" in the regular expression, but I can't make it work.

    If (allVms[i].name.match(regexp/i)) {}

    Anyone know how to get this working?

    / Brian

    This should work with a variable:

    var allDcs = VcPlugin.allDatacenters;
    var nameToMatch = "B00019V";
    for (var i in allDcs) {
      if (allDcs[i].name.match(new RegExp(nameToMatch, "i"))) {
        System.log("found match -> " + allDcs[i].name);
      }
    }
    
  • How to ignore case in the Apex?

    Hello

    I have provided a link to an article (Hostname) in one of the attributes of the column.
    When I click on the link, need me a page if there is an exact match in the "Hostname".
    However, a same host does not match if his name is different between uppercase and lowercase.
    Ex: EU1PAPW002 does not match eu1papw002

    Is it possible to ignore the case by matching?
    Need help on this.

    Concerning
    Sharath

    I'm glad it helped!

  • Ignore case sensitivity

    I have "ve got a SEARCH engine in my Web site. It is case sensitive. How to modify the script below to search ignoring sentitiveness case?

    For example. If someoene type "Pigs" or "PIGS" or "Pigs", should produce the same result.

    sruch_btn.onRelease = function () {}

    If (cosearchbx.text == 'Pigs') {}
    clearTimeout() (srch1TO);
    srch1TO = setTimeout (srch1F, 5000);
    srch1._visible = true;
    }
    function srch275F() {}
    srch275._visible = false;
    }

    }

    A way to do an independent research business is to level the playing field and make very tiny in comparison...

    If (String (cosearchbx.text) .toLowerCase () is {String("Pigs").toLowerCase ()})

  • How to configure the inputComboboxListOfValues case-insensitive search dialog box

    Hi all

    I use Jdev 11.1.2.3.0

    I use a inputComboboxListOfValues in a fragment of page ADF

    When I click on "search...". "I can type what I'm looking for, but here the search is case-sensitive.

    How can I configure this case-insensitive field? can someone help me please...

    Thank you

    G.Shilpa

    Hello

    View the criteria it is checkbox " Ignore Case". Just to check this box and run the application.

    For more information, refer

    http://tompeez.WordPress.com/2012/08/20/JDeveloper-ADF-afinputlistofvalues-enable-case-insensitive-search/

    Thank you

    Nitesh

  • ODI - Size Build - is - this sort take account of case?

    Hello

    We do a build size against a SQL Server of the accounts dimension view.  Our source table includes:

    Parent: ASSETS

    Alias: assets

    We have a problem we want to use the tiny ' assets under the alias but name it ' he won't because he thinks it's the same as the uppercase "ASSETS".   So we in the logic of the SQL code to change the name of the Member to the alias name, if both are equal regardless of case.  So, he built the Member as "assets".  The problem is when he tries to build his children, it fails.  The threshold will not be loaded as he seeks 'ASSETS', even if 'Assets' exists in outline.  The funny thing is, if I run again, it loads all the children of 'Assets' very well.  It's right on the first attempt.  Is it possible to change the KM or say the intention to ignore case.  Or is it not a matter of case?   When we remove the logic to use the alias instead of the member name name, it loads with zero errors.  However, it is "ACTIVE" and in reports they do not want it to be all uppercase as it looks terrible...   Any ideas?

    Parent, child, Alias, Agg, storage, Type

    ACTIVE, A-123456, assets, +, Store, has

    Yes it is possible and I answered.

    See you soon

    John

    http://John-Goodwin.blogspot.com/

  • Need a solution for the special case...

    My version of Oracle is 11.2.0

    My table name is nit_khush have a single column named as a

    Values in the table

    A

    Vincent
    Murali
    Bharath
    Nitesh
    Perron
    Married

    Case, it is I want to count number of present to each name of a column and I am trying my best here to get an output that is mentioned below


    Vincent 1
    Murali 1
    Bika 2
    Nitesh 0
    Perron 1
    Married 3

    In above example output for a single VIP is available in name is 1 the same he shoul count in each line and I have an assumption that surely by using the function nesting count with some string as SUBSTR functions can help but still substr find specific place and not dynamically so someone can suggest better idea to get a result as although I am also here but need your assisatance so and for any information required medium, let know

    Kind regards
    Nitesh...

    use regexp_count

    http://docs.Oracle.com/CD/B28359_01/server.111/b28286/functions135.htm

    SELECT REGEXP_COUNT ('Vincent', 'a', 1, 'i') REGEXP_COUNT
    FROM DUAL;

    First parameter - your channel
    second parameter - string you want to search
    third parameter - position where you want to start the search
    fourth parameter - ignore case
    Published by: Rahul India on January 24, 2013 15:19

  • retrieve values, regardless of the case

    Hi all
    How to retrieve values, regardless of the case. For Examle,.
    column_value = "name" when I try to retrieve using the
    select *  from table where column_value = 'NAME'
    
    But when i use the following query it is working
    select *  from table where column_value = Lower('NAME')
    My request will contain values higher or lower, so regardless of case-sensitive, I need to retrieve values. How this might be possible.

    Thank you

    You must apply the case function to both sides to ignore case

    select *  from table where lower(column_value) = Lower('NAME')
    
    //OR
    
    select *  from table where upper(column_value) = upper('NAME')
    
  • Query of query case Sensative

    Hi all
    You have a simple problem, I run a main request:

    < CFQUERY name = "getprice" datasource = "adatabase" >
    SELECT RTRIM (plpart) AS plpart, MIN (plunitprice) AS plunitprice
    The price LIST
    GROUP BY plpart
    < / CFQUERY >

    now to the list of price table parts are entered in lowercase it is to say that the results could look like below:

    Part___Price
    ABc, 10
    DeF, 11
    IGS, 12
    JKL, 10

    If I ask questions directly to the datasource there is no problem with the case being higher or lower, but when I ask query as below it returns only one result if the LIKE "#variable #" is the proper case, how can I get around this?

    < CFquery dbtype = "query" name = "qoq_price" >
    SELECT plunitprice
    Of getprice
    WHERE plpart LIKE ' #variable #
    < / CFquery >

    for example
    If the variable was 'ABc' the QOQ returns the correct value of 10
    but
    If the variable was "ABC" t/t does not return a result

    Problem, it's that my variables come from a table where they are at the top of the case, but in my table of prices people are entered in both cases and sometimes mixed.

    Sincere friendships Guy

    Thanks Peter

    Completely overwhelmed my mind to simply enter the SQL code in uppercase, has been busy, trying to get an ignore case.

    Everything works as a treat thank you

  • Is there a way to differentiate the string containing the characters and numbers?

    Hello, I created an application to read data from a serial port device. The problem is that the device, at startup, displays a block of text that contain characters describing the device. Shortly after, he displays a command prompt "command:" it's when I want my VI to enter the command to start to take action.

    I was looking at the VISA waiting on the event and looks that could be used to wait for the output device, only a "Serial character", but there is no distinction between the letters and numbers that I can tell.

    If the device is out of numbers in the reading string, of course, no need to enter the command to start to take action once again, which will probably only confuse the device. In this case, I want my VI to continue taking measures with VISA Read.

    The reason is that when I run the application, the device may have already been turned on. Send this command to the device using VISA Write is not necessary at this time.

    Any advice would be appreciated. Thank you.

    This makes it much easier.  In this case, this will do the trick.  You will notice that the bottom of the case does not match even if it has valid values inside.  The only thing that will match if the entire string is of the form XX. XXXX. Incidentally, since we are only matching numbers now, you can remove the "ignore case" Boolean as there is more important.

  • simple question to function test of value chain

    Hey guys,.

    I m just started using teststand.

    My simple question is related to the function "test string value '. What is the difference between the "type of comparison' CASE SENSITIVE and IGNORE CASE? From my point of view are not really meaningful names.

    To avoid simple and stupid questions like that, I tried to use the internal helper function. I'm wrong when I say that the help features are not as good as in labView? I couldn t find any answer to my question... hmmm... How other people handle this situation? (outside of just trying?)

    Thanks for your help

    Hello

    Case SENSITIVE: it will fail if you compare "HELLO" with 'Hello' or 'A' with 'a '.

    IGNORE CASE: this will pass if you compare "HELLO" with 'Hello' or 'A' with 'a '.

    Hope that explains

    Jürgen

  • Find and replace patter VI

    I fight with the help of the search and replace the sales pitch to replace a number of matches the substring in a string, can someone help and tell me what am I doing worng? Not an expert in regular expressions

    Basically, I'm trying to replace all matches for 'NONE', 'none' or 'normal' with 'OK in the '1NONE2none3normal4' string '.

    Thank you

    1. ditch that VI and use rather replace String

    2. right click and select "Regular Expression."

    3 wire True to replace all Ignore Case

    4. search string = (none | normal)

Maybe you are looking for