Result of the SQL action in a non String table presentation

Hi all

I have a simple action with a SQL queries where I get a table as a result and which I use in a couple of the workflow.

What I need now is also an action with a SQL query, but that the result is a required string that I can set as "Default" in the presentation of the workflow.

Here is the action that I already have a table/string result

database is of Type SQL: Database entry

table is of Type SQL table

var currentUsersVMs = new Array();

Get the displayName property of the workflow Starter

try {}

jdbcConnection var = new JDBCConnection();

var connection = jdbcConnection.getConnection (database.connectionURL, database.username, database.password);

System.Debug ("... successful login");

var selectStatement = connection.createStatement ();

settle with your column names to get a string like

SELECT 'Server Name' IN 'yourTable' WHERE 'user' = 'Karl Mustermann '.

var selectString = "sΘlectionner SRV_Name from dbo. "VC_Info_All where POWERSTATE = 'On' ORDER BY SRV_NAME."

System.Debug ("request for enforcement:" + selectString);

resultSet var = selectStatement.executeQuery (selectString);

Depending on whether you expect users with no VM

If (! resultSet) throw ' no line not found in table ' "+ table.name +" ' ";

While (resultSet.next ()) {}

columns resultSet starts a 1!

currentUsersVMs.push (resultSet.getStringAt (1));

}

} catch (exception) {}

throw "error reading database:"+ exception; ".

} {Finally

try {if (resultSet! = null) () resultSet.close ;} catch (e) {};}

try {if (instructionselect! = null) selectStatement.close () ;} catch (e) {};}

try {if (connection! = null) Connection.Close ;} catch (e) {};}

}

System.Debug ("VMs for the current user:" + currentUsersVMs);

Action:

Return currentUsersVMs;

So, I already have the solution for this action.

Tags: VMware

Similar Questions

  • How to export the result of the SQL via automation like ksh file

    Hello
    I did a query sql statement, this sql file will be called using the ksh file.
    As soon as the ksh is double clicked, the sql will be called and executed on the database.

    Here is my file KSH syntax.

    sqlplus-s user/pass@database < < END
    @D:/sql/export.sql
    OUTPUT
    END

    We want to automate the generation of output result. Such that, when the ksh files are completed, the output from the export.sql will export a .csv or .dat file in the directory defined. Thus, automation is launched without having to manually export in the Toad for sql.

    Please let me know if this is possible? and give an example of the syntax to use? If not, let me know what corrective measures would be to achieve this? Thank you very much for your help.

    Published by: user10070712 on November 20, 2012 03:39
    set colsep ','
    set heading off
    set feedback off
    spool /tmp/result1.csv
    select * from table;
    spool off
    
    set heading off
    set feedback off
    spool /tmp/result2.csv
    select column1 || ',' || column2 || ',' || column3 ... from table;
    spool off
    
  • Cannot display the results in the SQL Developer tool

    Hello Experts - I installed Oracle SQL Developer (version 1.5.5), just run a simple query. Nothing appears in the results window. Can you please let me know why?

    Select * of the double

    You have an error message in the message area.

    White spaces are important in SQL!

    Good bye

    DPT

  • Why the result of the SQL query is not displayed in the HTML text box?

    Hello

    Under query result appears in home > workshop SQL > SQL commands.

    Select t.nom
    of pm_task t
    where: P5_Project_id = t.project_id
    and: P5_task_id = t.id

    But when the same code is run through EditRegion of HTML text box > region definition > sources > Source region, the result is not displayed.
    Why is this so, and what is the solution?

    Thank you
    Guy

    You need a report from the region for this ;) A region of HTML is to display a static text or page items.

    Denes Kubicek
    ------------------------------------------------------------------------------
    http://deneskubicek.blogspot.com/
    http://www.Opal-consulting.de/training
    http://Apex.Oracle.com/pls/OTN/f?p=31517:1
    ------------------------------------------------------------------------------

  • the SQL query result format

    Format the results of the SQL query, currently, show as below.

    Select license_type, correspondents of license_info where license_type in ('TEM', 'TDM') order by license_type;

    TDM 1445140800000000000
    TDM 1420952400000000000
    TDM 1444363200000000000
    TDM 1445054400000000000
    TDM 1428724800000000000
    TEM 1421125200000000000
    TEM 1423890000000000000
    TEM 1449637200000000000
    TEM 1444968000000000000
    TEM 1428724800000000000

    I need formatting like below

    Expected result:

    TDM 1445140800000000000 TEM 1421125200000000000
    TDM 1420952400000000000 TEM 1423890000000000000
    TDM 1444363200000000000 TEM 1449637200000000000
    TDM 1445054400000000000 TEM 1444968000000000000
    TDM 1428724800000000000 TEM 1428724800000000000

    I have sample data only, Blue said the change in your main table request

    Try:

    Select max (f1),

    Max (F2),

    Max (F3),

    Max (F4)

    de)

    Select decode (license_type, 'TDM' license_type) f1,

    Decode (license_type, 'TDM', expiration_date) f2,

    Decode (license_type, 'TEM' license_type) f3,

    Decode (license_type, 'TEM', expiration_date) f4,

    ROW_NUMBER() over (partition by order correspondents license_type) r

    Of

    )

    R group

    ----

    Ramin Hashimzade

  • Mouse click initiates not the selected action

    When you use safari 9.1.2, by clicking on an option (for example "advance to the next page") on a website does not result in the proposed action. A "drop-down list of the option" unnecessary and undesirable appears instead. I have to click on the desktop out of the active page and then go back and open the selection again, often several times before the mouse click allows selection. What's wrong? How can I fix this problem?

    Try the boot without failure and tests.

    Boot mode safe. https://support.Apple.com/kb/PH21875?locale=en_US

    Same problem in Mode safe?

  • PLSQL function to return the result of the query

    Dear all,

    Oracle Database SE1 11.2.0.1

    I need to create a plsql function which should accept SQL as a parameter, execute it and return the result set.

    Is this possible?

    Madhu.149 wrote:

    I need to create a plsql function which should accept SQL as a parameter, execute it and return the result set.

    Be careful - results games indicate a set of data stored in memory. This is not what are sliders. This isn't how Oracle should be used.

    Imagine that you implement such a result set function - which, on average, requires 1 MB of memory (private server) to store the results of the SQL query. A 100 users mean a 100 MB of memory required server. This is not suitable. Not at all. Never.

    The correct back 'thing' is a handle to SQL cursor (called a ref cursor in this case). A SQL cursor is a "program" - that the appellant runs via the fetch command and generates one or more lines accordingly. Appellant repeatedly runs this slider through calls to fetch until this slider found and returns all rows affected (using consistent readings).

    If you want an abstraction interface that the client can call via PL/SQL code in the database, so this crafting optimal SQL interface, creates the SQL cursor and returns the handle of the cursor (via the ref cursor data type) to the client.

  • A loop using the SQL select query.

    Hello

    I wanted to know, if the concept of loop is possible thanks to the SQL select statement.

    For example
    =======

    Table T1

    Col1 Col2
    Slim 10

    I want to write a query in such a way, so that when I get the result of the query, I format below.

    Col1 Col2
    Slim 10
    Slim 10
    Slim 10

    Basically what I'm trying to achieve is, I have a table with two columns and it has a single line displayed above.

    I want to display this line several times as the output of my SELECT query.

    Let me know, if this target is achievable.

    Kind regards
    Saurabh

    Like this?

    SQL> SELECT 10 col1, 'Sourabh' col2
      2    FROM DUAL
      3  CONNECT BY LEVEL <= 3;
    
          COL1 COL2
    ---------- -------
            10 Sourabh
            10 Sourabh
            10 Sourabh
    
    SQL> 
    
  • Working with the results of the Action generated Poweshell

    Hello

    I have an action from orchestrator of a powershell script/function that I use regularly. The function is supposed to return a System.Object with email content (n, fromAdd, body, etc) that I would use in a script task.

    The problem I'm having is that I can't access these results in my work of scriptable. I know that the performance of the action a PowerShellRemotePSObject (and I have reviewed the literature on 'Working with PowerShell results'), but none of my attempts to explore the values give the results, I'm looking for. I'd appreciate any help to know what I'm missing.

    Thank you

    Thank you once again Ivo. Sorry for the delayed reactions. I took a peek at the solution you provided but had a few mistakes - there was no GetFilter() function defined for the call to psObject.getRootObject () .getProperty ('from'). After fiddling around with the results, I found my solution.

    I basically closed the rootobject of the return value of invocation of script that turns out to be a collection data structure (last result in the enumeration in italics/bold).

    .....

    rootObject var = psObject.getRootObject

    (rootObject element)

    {

    System.log (rootObject [index])

    }

    [10:43:33.159 2013-12-10] [I] DynamicWrapper (Instance): [PowerShellPSObject]-[class com.vmware.o11n.plugin.powershell.model.result.PSObject] - VALUE: com.vmware.o11n.plugin.powershell.model.result.PSObject@e9e592

    ....

    It turns out that the value of back in my Powershell script is the last element in the collection. from there, I could get my values:

    System.log (rootObj [rootObj.length - 1] .getProperty ("to"));

    System.log (rootObj [rootObj.length - 1] .getProperty ("from"));

    System.log (rootObj [rootObj.length - 1] .getProperty ("Subject"));

    System.log (rootObj [rootObj.length - 1] .getProperty ("body"));

    System.log (rootObj [rootObj.length - 1] .getProperty ("logFile"));

    I don't know if this will always be the case with psObject return values of Powershell called scripts, but several tests will help.

    Thanks for your time.

  • How to get the sql query result?

    Hello

    Currently I use LV2012 to connect to an Oracle database server. After the Oracle Express and Oracle ODBC driver facilities/settings made.

    I managed to use the SQL command to query the data through my command prompt window.

    Now the problem is, how to do the same task in Labview using database connectivity tools?

    I have build a VI to query as being attached, but I have no idea of what range to use to get the result of the query.

    Please help me ~ ~

    Here is a piece of code that I use to test the SQL commands, you can use the part that retrieves the results of sql.

    It is also possible to get the rear column headers, but it's for the next lesson!

    ;-)

  • Restore the options popup after selecting "Non-action" and choose to use this option, whenever a device is plugged in USB?

    Restore the options popup after selecting "Non-action" and choose to use this option, whenever a device is plugged in USB?

    Hello

    Did you follow the "AutoPlay Repair Wizard"?

    You can follow the link provided in the previous post. Later, check to see if the problem persists.

    Hope the helps of information.

  • Results of the selection of the files or programs of the office or start menu in view this file does not have a program associated with it for performing this action.

    I am running Windows XP.  My deleted security a software threatens malware a few days before and since any file or program I select in the desktop, start menu or results of the status bar in a notice that "this file doesn't have a program associated with it for performing this action.  Create an association in the folder options panel.  Nothing I've tried has worked!  Help!

    Run the EXE File Association Fix http://www.dougknox.com/xp/file_assoc.htm
    You probably also need to run the LNK (shortcut) file Association problem from the same site.

    Be sure to read the instructions at the top of the page.

  • Result of the "non-response" authentication

    Hi I have a simple config of the MDA

    interface FastEthernet0/4

    switchport access vlan 84

    switchport mode access

    switchport voice vlan 70

    IP access-group default_acl in

    the host-mode multi-auth authentication

    authentication order dot1x mab

    authentication priority dot1x mab

    Auto control of the port of authentication

    MAB

    dot1x EAP authenticator

    dot1x tx-timeout 3

    dot1x max-reauth-req 3

    Storm-control broadcasts 5.00

    stop storm-control action

    spanning tree portfast

    spanning tree enable bpduguard

    When I try to conect to this port - ONLY PHONE he successfully through mab Authentificates, when I try to connect PC only he authentificates successfully through dot1x, but when I try to connect to the PC via PHONE - phone authentificate successfully, but the PC - not on my server ISE log, I see only MAB trying for PC No tent dot1x.

    ARHIV-ROOM36(Config-if) #.

    29 jan 12:08:04.380: % LINK-5-CHANGED: Interface FastEthernet0/4, changed state down administratively

    29 jan 12:08:05.387: % LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/4, has changed state down

    ARHIV-ROOM36(config-if) #exi

    ARHIV-ROOM36 (config) #exi

    29 jan 12:08:06.536: % LINK-3-UPDOWN: Interface FastEthernet0/4, changed State to

    29 jan 12:08:07.543: % LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/4, changed State to

    ARHIV-ROOM36 (config) #exi

    ARHIV-ROOM36 #.

    29 jan 12:08:08.021: % SYS-5-CONFIG_I: configured from console to ask about vty0 (10.110.11.253)

    ARHIV-ROOM36 #.

    29 jan 12:08:09.170: % AUTHMGR-5-START: start "dot1x' for the client (0023.8b84.fa32) on the Interface Fa0/4 AuditSessionID

    0A6E0A0400000077A11BEA81

    29 jan 12:08:10.076: % AUTHMGR-5-START: start "dot1x' for the client (ccef.485c.f4b9) on the Interface Fa0/4 AuditSessionID

    0A6E0A0400000078A11BF97A

    ARHIV-ROOM36 #.

    29 jan 12:08:18.591: % DOT1X-5-FAIL: failure of authentication for the client (0023.8b84.fa32) on the Interface Fa0/4 AuditSession

    ID

    29 jan 12:08:18.591: % AUTHMGR-7-RESULT: authentication result in 'no response' of 'dot1x' for the client (0023.8b84.fa32)

    on the Interface Fa0/4 AuditSessionID 0A6E0A0400000077A11BEA81

    29 jan 12:08:18.591: % AUTHMGR-7-FAILOVER: failover "dot1x' for the client on the Interface Fa0/4 (0023.8b84.fa32) to the

    ditSessionID 0A6E0A0400000077A11BEA81

    29 jan 12:08:18.591: % AUTHMGR-5-START: start "mab" for the client (0023.8b84.fa32) on the Interface Fa0/4 AuditSessionID 0

    A6E0A0400000077A11BEA81

    29 jan 12:08:18.608: % MAB-5-FAIL: failure of authentication for the client (0023.8b84.fa32) on the Interface Fa0/4 AuditSessionID

    0A6E0A0400000077A11BEA81

    29 jan 12:08:18.608: % AUTHMGR-7-RESULT: authentication result 'no response' of 'mab' for the customer (0023.8b84.fa32) on

    Interface Fa0/4 AuditSessionID 0A6E0A0400000077A11BEA81

    29 jan 12:08:18.608: % AUTHMGR-7-FAILOVER: failover "mab" for the client (0023.8b84.fa32) on the Interface Fa0/4 Audi

    tSessionID 0A6E0A0400000077A11BEA81

    29 jan 12:08:18.608: % AUTHMGR-7-NOMOREMETHODS: exhausted all methods of authentication for the client (0023.8b84.fa32) on

    Interface Fa0/4 AuditSessionID 0A6E0A0400000077A11BEA81

    ARHIV-ROOM36 #.

    29 jan 12:08:18.608: % AUTHMGR-5-FAIL: failed authorization for customer (0023.8b84.fa32) on the Interface Fa0/4 AuditSessio

    Nest 0A6E0A0400000077A11BEA81

    ARHIV-ROOM36 #.

    29 jan 12:08:21.678: % DOT1X-5-FAIL: failure of authentication for the client (ccef.485c.f4b9) on the Interface Fa0/4 AuditSession

    ID

    29 jan 12:08:21.678: % AUTHMGR-7-RESULT: authentication result in 'no response' of 'dot1x' for the client (ccef.485c.f4b9)

    on the Interface Fa0/4 AuditSessionID 0A6E0A0400000078A11BF97A

    29 jan 12:08:21.678: % AUTHMGR-7-FAILOVER: failover "dot1x' for the client on the Interface Fa0/4 (ccef.485c.f4b9) to the

    ditSessionID 0A6E0A0400000078A11BF97A

    29 jan 12:08:21.678: % AUTHMGR-5-START: start "mab" for the client (ccef.485c.f4b9) on the Interface Fa0/4 AuditSessionID 0

    A6E0A0400000078A11BF97A

    29 jan 12:08:21.728: % MAB-5-SUCCESS: authentication successful for the client (ccef.485c.f4b9) on the Interface Fa0/4 AuditSe

    ssionID 0A6E0A0400000078A11BF97A

    ARHIV-ROOM36 #.

    29 jan 12:08:21.728: % AUTHMGR-7-RESULT: result of the authentication 'success' of 'mab' for the client (ccef.485c.f4b9) on Int

    ERFACE Fa0/4 AuditSessionID 0A6E0A0400000078A11BF97A

    ARHIV-ROOM36 #.

    29 jan 12:08:22.718: % AUTHMGR-5-SUCCESS: authorization succeeded for client (ccef.485c.f4b9) on the Interface Fa0/4 Audit

    SessionID 0A6E0A0400000078A11BF97A

    ARHIV-ROOM36 #.

    29 jan 12:09:19.334: % AUTHMGR-5-START: start "dot1x' for the client (0023.8b84.fa32) on the Interface Fa0/4 AuditSessionID

    0A6E0A0400000077A11BEA81

    ARHIV-ROOM36 #.

    29 jan 12:09:31.850: % DOT1X-5-FAIL: failure of authentication for the client (0023.8b84.fa32) on the Interface Fa0/4 AuditSession

    ID

    29 jan 12:09:31.850: % AUTHMGR-7-RESULT: authentication result in 'no response' of 'dot1x' for the client (0023.8b84.fa32)

    on the Interface Fa0/4 AuditSessionID 0A6E0A0400000077A11BEA81

    29 jan 12:09:31.850: % AUTHMGR-7-FAILOVER: failover "dot1x' for the client on the Interface Fa0/4 (0023.8b84.fa32) to the

    ditSessionID 0A6E0A0400000077A11BEA81

    29 jan 12:09:31.850: % AUTHMGR-5-START: start "mab" for the client (0023.8b84.fa32) on the Interface Fa0/4 AuditSessionID 0

    A6E0A0400000077A11BEA81

    29 jan 12:09:31.866: % MAB-5-FAIL: failure of authentication for the client (0023.8b84.fa32) on the Interface Fa0/4 AuditSessionID

    0A6E0A0400000077A11BEA81

    29 jan 12:09:31.866: % AUTHMGR-7-RESULT: authentication result 'no response' of 'mab' for the customer (0023.8b84.fa32) on

    Interface Fa0/4 AuditSessionID 0A6E0A0400000077A11BEA81

    29 jan 12:09:31.866: % AUTHMGR-7-FAILOVER: failover "mab" for the client (0023.8b84.fa32) on the Interface Fa0/4 Audi

    tSessionID 0A6E0A0400000077A11BEA81

    29 jan 12:09:31.866: % AUTHMGR-7-NOMOREMETHODS: exhausted all methods of authentication for the client (0023.8b84.fa32) on

    Interface Fa0/4 AuditSessionID 0A6E0A0400000077A11BEA81

    ARHIV-ROOM36 #.

    29 jan 12:09:31.866: % AUTHMGR-5-FAIL: failed authorization for customer (0023.8b84.fa32) on the Interface Fa0/4 AuditSessio

    Nest 0A6E0A0400000077A11BEA81

    ARHIV-ROOM36 # run HS | I have aaa

    AAA new-model

    AAA authentication login default local

    the AAA authentication enable default

    Group AAA dot1x default authentication RADIUS

    AAA authorization exec default local

    Group AAA authorization network default RADIUS

    start-stop radius group AAA accounting dot1x default

    AAA - the id of the joint session

    ARHIV-ROOM36 # run HS | I have RADIUS

    Group AAA dot1x default authentication RADIUS

    Group AAA authorization network default RADIUS

    start-stop radius group AAA accounting dot1x default

    RADIUS-server host 10.5.45.128 auth-port 1812 acct-port 1813 borders 7 xxxx

    RADIUS vsa server send accounting

    RADIUS vsa server send authentication

    It seems that, as the phone was not 802 traffic. 1 x as the switch was getting no response to his request. It is very interesting and good to know. Good job on finding a solution and shares the back!

    You should probably mark the thread as answered

  • GlassFish does not have the result of the action

    My glassfish does not have the result of the action, maybe the adfc-config not the welcome-file project, because from the moment where I redirect on a bean for the workflow, it starts to run the result, perhaps the answer to this problem either, like the adfc-config is the welcome file of the application.

    Remove the .jsf and try again

  • SQL to display the results if the number of output is below a limit

    I have a requirement where I can display the SQL result set if the number of records output is 1000 or less than that... otherwise raise a user-defined exception, say "Please change the search criteria. I can achieve this by GET the the number of SQL rows first and then re-run the same SQL to display the data if the number of rows is less than 1001. Could someone let me know if this is possible without re - run the SQL several times as the SQL is the query intensive re-source

    Hello

    You can try in bulk collect into a collection.

    If the number of rows in the collection is less than 1000 triggers an application error or return results, if it is greater than 1000

    If this is suitable for your needs, please post more information on the system requirements.

    Kind regards

    Cool

Maybe you are looking for