Search case-insensitive for VM by name

I found examples of code in communities, but it seems that the searches are case-sensitive.  We need help in modifying the script to make it case insensitive.

var vms = VcPlugin.getAllVirtualMachines(null, "xpath:name='"+vmName+"'"); 
var vmObject = null;  
if (vms != null && vms.length >0){  
  System.log("VMs Found: " + vms.length);
    if (vms.length == 1){  
        System.log("Match found for vm named: "+vmName);  
        vmObject = vms[0];  
    }else{  
        System.log("More than one VM found with that name! "+vmName);  
        for each (vm in vms){  
            System.log("VM ID: "+vm.id);  
        }  
    }  
}else{
  System.log("No VMs Found");
}

.

Hi, I was about to send another question on this same method.  Here is what I use to perform a case-insensitive search:

machines virtual var = VcPlugin.getAllVirtualMachines (null, "xpath:name [translate(.,'abcdefghijklmnopqrstuvwxyz','ABCDEFGHIJKLMNOPQRSTUVWXYZ') =" "+ arg_nameToMatch.toUpperCase () +"'"]");

Tags: VMware

Similar Questions

  • How do the function of table 1 d search case-insensitive for the array of strings

    How do the function of table 1 d search case-insensitive for the array of strings

    Hi Karine,.

    convert the two (table and search for the string) to lowercase before using this feature...

  • Case-insensitive XPATH

    Hello

    I have the following XMLs stored in a column.

    < root >
    < abc > abc < / abc >
    def < def > < / def >
    < / root >

    < root >
    < ABC > < / ABC >
    def < DEF > < / DEF >
    < / root >

    Is there a way to use a search case-insensitive in my extractValue so that I don't have to write twice?

    extractValue (XML_CLOB, / root/abc)
    extractValue (XML_CLOB, / root/ABC)

    Thank you and best regards,
    A

    Hello

    You can try

     extractvalue(XML_CLOB,'/root/*[name()="abc" or name()="ABC"]) 
    

    Thought that upper-case (name () = 'ABC' should work, but it does not appear on 10.2

    HTH,

    Chris

  • Take the attributes advance case-insensitive in af:query research?

    Hello

    I use JDeveloper 11.1.2.4

    I have an af:query on my screen. My main VO has many attributes but the af VIewCriteria: query is empty.

    Since it is empty, then there is no fields on the af: query. I goto the advanced option and a field. Research on the attribute that I added watch case-insensitive behavior.

    Is it possible that I can do the field added by advanced search case insensitive results.

    Note: I HAVE AN EMPTINESS of the CRITERIA overview

    Thank you

    You can probably not override buildViewCriteriaClauses() in the class ViewObjectImpl, then use something like viewCriteria.setUpperColumns (true)

    Dario

  • 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

  • How to: case insensitive search form

    For Jdev 11g.
    If I create a search form, using a criterion of view in the VO. I have to choose 'case insensitive search' in the display panel to change your criteria. However, if I create a search form ADF by dragging a VO (without any set of criteria from view) and by selecting the option in context menu search form ADF, I get a page JSPX with attributes of my vo and a search for and Execute button. My question is how to do this last type of search form to perform a case-insensitive search?

    Each view object in your ADF BC Impl is a congestion point method called applyViewCriteria() that is called when we apply search criteria. You can override this method to enter all the criteria to view and convert them any where you know the data are. This example converts all uppercase view criteria:

    public void applyViewCriteria(ViewCriteria vc) {
    
      if (!(vc == null || vc.size() == 0)) {
        ViewCriteriaRow criteriaRow = (ViewCriteriaRow)vc.first();
        StructureDef def = criteriaRow.getStructureDef();
        AttributeDef[] attrs = def.getAttributeDefs();
    
        boolean bFirst = true;
    
        do {
          if (vc.hasNext() && !bFirst)
            criteriaRow = (ViewCriteriaRow)vc.next();
    
          criteriaRow.setUpperColumns(true);
    
          for (int j = 0, attrCt = attrs.length; j < attrCt; j++) {
            String criteriaAttrVal = ((String)criteriaRow.getAttribute(j));
            if (criteriaAttrVal != null && !criteriaAttrVal.equals("") && !JboTypeMap.isNumericType(attrs[j].getSQLType())) {
              criteriaRow.setAttribute(j,criteriaAttrVal.toUpperCase());
            }
          }
          bFirst = false;
        } while (vc.hasNext());
      }
      super.applyViewCriteria(vc);
    }
    

    I hope this helps.

    CM.

  • case insensitive search

    Dear reader,

    I have a tabel books and the booktitle field in the database.

    JHS I want to search the booktitle.
    So it's quiet easy.
    But the problem occurs when there are some capitals in the title, IE "The JHeadstart Guide for Dummies".

    If the user searches for "jheadstart.
    then this query is returned: books.booktitle SELECTION OF BOOKS WHERE (((books.booktitle like '% jheadstart')))
    This property returns zero rows.

    I set the property to TO_UPPER_BEFORE_SEARCH (btw cannot find any documentation about this feature on the internet, using google)
    then this query is returned: books.booktitle SELECTION OF BOOKS WHERE (((books.booktitle like '% JHEADSTART')))
    I get so close.

    All what I need now is that the left site of this type is also uppercase.
    so SELECT books.booktitle BOOK books WHERE (((UPPER (books.booktitle) like '% JHEADSTART')))

    Who can help me with this? And maybe point me to documentation on the custom property?

    Published by: MarcelM, Sep 19, 2008 01:21

    This is weird. is not the default search in case-insensitive JHS? What version of JHS do you use?

    Paul

  • Mac put in place respect for case-insensitive Volume?

    I have no idea what it is; scratch, I don't know, I don't know what to do... How to be a case-insensitive volume? Disk utility does not give me the option.

    Thank you everyone

    You can only change this reformatting your hard drive and select a non-respect of case-sensitive option.

  • Problem with SQL case insensitive

    I have the following SQL query, where I want the where criteria to be case-insensitive.

    SELECT t.number, t.nom FROM Table t
    WHERE t.nom =?;

    I can solve this problem by using for example. DOWN, like this:

    SELECT t.number, t.nom FROM Table t
    WHERE LOWER (t.name) = LOWER (?);

    But, as I understand it, it is a specific solution for Oracle. If want to protect my code, so that it will work on a database, how could I do?

    You should NOT do this.
    Database-independent applications are all shrinkware, vaporware and fraudware.
    Built under sqlserver independent database application will run successfully without change on Oracle.
    The only people taking advantage of this situation are lawyers.

    Also to help 'lower () =' can delete the use of the index in Oracle.
    If you expect a concrete case, you should apply this case upon entry.

    Heck, everyone is case-sensitive. Only the Empire of evil aka Microsoft is not. You want to be enslaved by the Empire struggling or who belong to the free world?

    -----------
    Sybrand Bakker
    Senior Oracle DBA

  • SELECT INTO make case-insensitive query?

    Hi all

    I'm having a problem with a query as if it is case-insensitive when I do a «SELECT table.x variable INTO...» ». If I do the same query, without the "variable INTO", I get a result as expected.

    The query is similar to the following:
    SELECT table_id variable FROM table WHERE table.varchar2column = 'name' AND table.integercolumn = int_variable;

    There is a unique constraint, forcing the varchar2column / integercolumn of the unique values.

    If the varchar2column has two entries that differ only in this case, a regular at the statement select returns a result. However, the procedure stored with the, I get the following error message:

    ORA-01422: exact fetch returns more than number of lines

    He gets not only if I remove the entry that only differs in the case of the letters. It is 10.2.0.1.0 Oracle, if that matters.

    I need this application to be case-sensitive. I'm not an expert of the DB, I'm just a developer trying to solve a problem. I tried to run "ALTER session SET nls_sort = binary" in the stored procedure, but I guess I can't do that...

    Any suggestion would be appreciated.

    As mentioned before... name your best-er settings.

    Your setting is the same as the name of the column on the table that you query... bad move.

    Here I change the username to work things p_username and 'magically '.

    CREATE OR REPLACE FUNCTION get_cached_user_id(p_username user_security_table.username%type, authserver user_security_table.authentication_server_id%type)
      RETURN user_security_table.user_security_id%type IS
    
      cacheduserid user_security_table.user_security_id%type;
    BEGIN
      6
      SELECT uat.user_security_id
      INTO cacheduserid
      FROM user_security_table uat
      WHERE uat.username = p_username AND uat.authentication_server_id = authserver;
    
      IF cacheduserid IS NULL THEN
         SELECT uat.user_security_id INTO cacheduserid FROM user_security_table uat WHERE uat.username = 'anonymous' AND uat.authentication_server_id IS NULL;
      END IF;
      RETURN cacheduserid;
      EXCEPTION
         WHEN NO_DATA_FOUND THEN
           SELECT uat.user_security_id INTO cacheduserid FROM user_security_table uat WHERE uat.username = 'anonymous' AND uat.authentication_server_id IS NULL;
           RETURN cacheduserid;
    END;
     21   /
    
    Function created.
    
    TUBBY_TUBBZ?SELECT get_cached_user_id('sample',20) from dual;
    
    GET_CACHED_USER_ID('SAMPLE',20)
    -------------------------------
                         2
    
    1 row selected.
    
    TUBBY_TUBBZ?
    

    Simple fix... development of a standard in the future, as for all procedure using p_ settings can save you a lot of grief.

  • Case-insensitive sort, is this possible?

    Hello everyone,

    I'm doing a request to make of case insensitive sorts, but I failed miserably. I wonder if anyone has experienced the same problem...

    In a regular session of the Oracle, all I have to do is to set the NLS_SORT as BINARY_CI and sorting is case-insensitive; However, my Apex application solemnly ignores everything I try to do in this direction.

    I first tried to create a db setting process in the session (running code PL/SQL 'immediate 'alter session... » ») ; tried to put this process within a page, in many processes points and then tried to put this process in the application itself. in both cases, if I debug the page, I see that the command is executed successfully.

    And, in fact, the first time, the report is run, and the query appears in the debugging, the works of THIS sort; However, if I try to reload the page with a F5 or change something in the search bar (number of lines per page, filter, etc.), the kind regresses to the shape of the case. It's probably getting the records not in the query, but some cache weird, because any time the sorting doesn't work anymore, debugging does not show the application running.

    Then I tried to study where is - this cache and how killing, absolutely nothing helped. Tried to create another process to clear all session state, tried to disconnect and even once tried to kill all sessions of APEX database, close the browser and remove its cache... the cache with poorly sorted records has survived all this.

    Oh and even if sometimes the sort works for the records in the report, when I click on the header of column related to the field in question, and it shows all the values in this column, that the order of these values is never affected by the session NLS_SORT setting.

    Could someone has an idea about this?

    Thank you.

    What is an interactive report? If so, see [this post | http://forums.oracle.com/forums/thread.jspa?messageID=3920123].

  • Case of assignment of event names

    Hello

    I would like to know if there is a convenient way to change the names of cases in a structure of the event or to identify cases in any other way.

    The problem I'm facing: whenever I have have a structure of the event which has several cases who oversee multiple entries, each is not obvious at first sight is that a certain case. For example, I would cite a case in my structure of the event "refresh view" I know what he does and not what item of façade changes could run (cause should always be able to see this :-).

    Any suggestions?

    Best regards Florian

    Florian.Ludwig wrote:

    Thanks for any suggestions,

    I already use only legends about the FP (reasons much IMHO desirable), and once your inside the case of the typedef enum'ed does a decent job of document in which case you

    (although Randall is right - it is better here, especially when you're "ctrl-mouswheeling" through the case :-).

    I just wanted there was some visible clues to the event structure of the menu drop down. The structure of the event I'm getting about 70 cases which some monitor more than 20 FP controls.

    Scrolling is not practice it either - and Yes, there is a lot of space FP in a tab control.

    It is also why events user would be too much work to do now to only a marginal improvement.

    Best regards Florian

    Have you considered an approach 'divide and conquer', by which I mean some of these events pushing down into a Subvi, which uses the dynamic event record to do the job?

    Examples of things that can be pushed down are things like "Whn this button is clicked on this thing should be shown or hidden."

    Ben

  • When I opened my computer it always tells me that the file is damaged and unreadable. Please run the Chkdsk utility... I searched my computer for "chkdsk utility" and can't find that. Help, please!

    Can someone help me please, I don't know how to use a computer I was googlen 4 days! When I opened my computer it always tells me that the file is damaged and unreadable. Please run the Chkdsk utility... I searched my computer for "chkdsk utility" and can't find that. Help, please!

    From what you say, you are probably unable to start Windows.

    In this case, when you start the computer, keep tapping the key "F8" on the keyboard until the Advanced menu comes up. Then choose "Safe Mode".

    You will see something like your ordinary, here to enter office "chkdsk volume: /f" (replace with your hard drive volume, in most cases, it's 'c') at the command prompt.

    For reference:

    http://support.Microsoft.com/kb/315265

    Hope this helps

    Post back if necessary

    ____________________

    If this post can help solve your problem, please click the 'Mark as answer' or 'Useful' at the top of this message. Marking a post as answer, or relatively useful, you help others find the answer more quickly.

  • Case-insensitive unique constraint

    Hi guys,.

    Is it possible to create a unique constraint that is case-insensitive

    I mean if there is a unique constraint on the name of col

    then
    'James' and 'JAMES' must not


    Kind regards

    PAPI

    Create a unique index to the basic function of...

    create unique index uk_name on emp(upper(ename));
    
  • the case-insensitive query results

    I got a help from 11g with the suite of version information

    Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - Production
    PL/SQL Release 11.1.0.7.0 - Production
    CORE Production 11.1.0.7.0
    AMT for 32-bit Windows: Version 11.1.0.7.0 - Production
    NLSRTL Version 11.1.0.7.0 - Production

    The result of the query are case-sensitive

    Ex: Select * from Table_1 where column like '% new % ';

    result: News

    But do not go back NEWS News or news

    The result of the query are case-sensitive

    But you want the results to be case-insensitive?
    Well, then you can use:

    Select * from Table_1 where lower(column) like '%news%';
    

    And use a function based index.

Maybe you are looking for

  • Is there an add-on that WORKS for groups of lost tabs?

    STILL lost most all my groups of tabs! Third or fourth time, Im fed up!I read some reviews on group managers, and basically, they were not very good.If I want to save something else on my computer, or copy / rename it, ITS EASY! is there a small prog

  • Windows 7 Upgrade Guide for dv2000 models

    Statement: You use this guide at your own risk. I take no responsibility for any problem. Things you need to know and do before the upgrade: 1 HP may require that reinstall you Vista back if you have hardware problems to solve the. 2 HP will not help

  • Web Cam on Satellite A350

    My Web cam was working fine and all of a sudden his almost non-existent.I tried to download the driver for it and still nothing.When I had software assistant camera it tells me just that the web cam has either been disabled or has failed and to check

  • How to remove the USB ReeadyBoot.

    Original title: permits Hello, I have an administrator account on my computer. Recently, I installed ReadyBoost on one of my memory sticks. Later, I went to remove it and told me I don't have permission to do so. How can I fix? Is it possible to give

  • Request signatures (sign your App) from command line

    Is there a way to "request for signatures" from the command line? I'm doing my deployment during development much easier and without having to enter my password of signature.