Output value from map

Hi
I have written an application in which all the files names in a folder are saved in a string array.
Then a Map object is created with the folder name as key and the String array as the value. This is being done for all the folders till one layer deep ie: the same function is appplied for the sub folder also, but not for the sub sub folder.
Later I am merging all these maps into one single file.
Now while printing the merged map I can see the keys (folder names) but the values seen are [Ljava.lang.String;@119298d....
Can anybody tell me what do I have to do to be able to see the String array as the value????
Thanks

-- Use Iterator to iterate with Maplike this:
for(Iterator it=map.keySet().iterator(); it.hasNext(); ){
           String s=(String)it.next();
}

Similar Messages

  • Pass output parameter from mapping to external process in a Process Flow

    In Process flow, how do we pass an Output parameter from a mapping (generated by a post mapping operator) into an external process (shell script)?
    I have a mapping that generates an output parameter and I would like to pass this parameter to an external process (a shell script) with a process flow. Is this possible?

    Hi Norman,
    Unfortunately in the current release, you cannot do this. What you can do, is store the value into a table and read it in the external process, or write it into a file and read it from there. The next release will support passing output parameters from one activity to the next.
    Thanks,
    Mark.

  • Wants to eliminate null values from mapping queue

    Hi All,
    How can I eliminate null values from 'display queue' of a target mapping.
    Can it be done through a UDF? Kindly help.
    Because of null value, it is creating issue in the mapping logic.
    Thanks,
    John

    We can remove null values using node functions.
    Check the below thread:
    Re: How to remove [] form Message Mapping Display Queue
    Or
    Try with the below UDF:
    for (int i=0; i<a.length;i++)
    if (! a<i>.equals(ResultList.SUPPRESS) || ! a<i>.equals(""))
    result.addValue(a<i>);
    Thanks,

  • Custom Manage Property does not pick up the value from mapping crawl property

    Hi All,
    I have created a custom list with the column name that's called "category".
    Then I ran full crawl and I saw the "ows_category" crawl property is created.
    Then I create the manage property names as "Category" and map with the "ows_category" and run the full crawl again. (Retrivable, Searchable, Refinable options are checked)
    After full crawl, I searched Category:keyword but it returned 0 result. 
    But when I search keyword, that list item is retuned
    I tried to debug with the spsearch2013 tool and there is no "Category" manage property in the return XML.
    It seems the Manage Property does not pick up value from the crawl property. (Something might be wrong with the index schema)
    Do you have any suggestion?
    Do I need to reset the index?
    Best Regards,
    Andy

    Hi Andy,
    When you search ‘category’ in crawled properties(Central Administration->Search Service Application->Search Schema), you will see ows_Category is mapped to DiscussionCategory, like the screenshot:
    So, I suggest you create a new column using another name, then test again, compare the result.
    Best Regards,
    Wendy
    Wendy Li
    TechNet Community Support

  • How to output value from stored procedure

    Hi folks, I need to output the OrderFK from a stored procedure not really sure how to achieve this any help or tips much appreciated.
    Sql code below
    USE [TyreSanner]
    GO
    /****** Object: StoredProcedure [dbo].[AddCustomerDetails] Script Date: 11/12/2014 20:56:34 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    ALTER PROCEDURE [dbo].[AddCustomerDetails]
    /***********************Declare variables ***********************/
    /******tblCustomer******/
    @Forename nvarchar(50),
    @Surname nvarchar(50),
    @HouseNo nvarchar(50),
    @CustAddress nvarchar(50),
    @Town nvarchar(50),
    @Postcode nvarchar(50),
    @ContactNo nvarchar(50),
    @EmailAddress nvarchar(50),
    /******tblLink_OrderProduct******/
    @ProductQuantity int,
    @TotalProductSaleCost decimal,
    @ProductFK int,
    @FittingDate date,
    @FittingTime Time
    As
    DECLARE @CustomerFK int;
    DECLARE @OrderFK int;
    Begin TRANSACTION
    SET NOCOUNT ON
    INSERT INTO [TyreSanner].[dbo].[Customer](Forename, Surname, HouseNo, CustAddress, Town, Postcode, ContactNo, EmailAddress)
    VALUES (@Forename,@Surname,@HouseNo,@CustAddress,@Town,@Postcode,@ContactNo,@EmailAddress)
    Set @CustomerFK = SCOPE_IDENTITY()
    INSERT INTO [TyreSanner].[dbo].[Order] (CustomerFK)
    VALUES (@CustomerFK)
    SET @OrderFK = SCOPE_IDENTITY()
    INSERT INTO [TyreSanner].[dbo].[Link_OrderProduct](OrderFK, ProductFK, ProductQuantity, TotalProductSaleCost, FittingDate, FittingTime)
    VALUES
    (@OrderFK, @ProductFK, @ProductQuantity, @TotalProductSaleCost, @FittingDate, @FittingTime)
    COMMIT TRANSACTION

    Hi brucey54,
    There’re several ways to capture the value from a Stored Procedure. In you scenario, I would suggest 2 options, by an output parameter or by a table variable.
    By an output Parameter, you need to make a little bit modification on your code as below:
    USE [TyreSanner]
    GO
    ALTER PROCEDURE [dbo].[AddCustomerDetails]
    @Forename nvarchar(50),
    @FittingDate date,
    @FittingTime Time,
    @OrderFK int output
    As
    DECLARE @CustomerFK int;
    --DECLARE @OrderFK int;
    Run the following code, Then @OrderFKvalue holds the value you’d like.
    DECLARE @OrderFKvalue int;
    EXEC AddCustomerDetails(your parameters,@OrderFKvalue output)
    Anyway if you don’t like to add one more parameter, you can get the value by a table variable as well. Please append “SELECT @OrderFK;” to your Procedure as below:
    USE [TyreSanner]
    GO
    ALTER PROCEDURE [dbo].[AddCustomerDetails]
    SET @OrderFK = SCOPE_IDENTITY()
    INSERT INTO [TyreSanner].[dbo].[Link_OrderProduct](OrderFK, ProductFK, ProductQuantity, TotalProductSaleCost, FittingDate, FittingTime)
    VALUES
    (@OrderFK, @ProductFK, @ProductQuantity, @TotalProductSaleCost, @FittingDate, @FittingTime);
    SELECT @OrderFK;
    Then you can call the Stored Procedure as below:
    DECLARE @T TABLE (OrderFK INT);
    INSERT @T EXEC AddCustomerDetails(your parameters) ;
    SELECT OrderFK FROM @T;
    There’re more options to achieve your requirement, please see the below link:
    How to Share Data between Stored Procedures
    If you have any question, feel free to let me know.
    Best Regards,
    Eric Zhang

  • How can I use the output value from SIMPLE PID to write something to the serial port?

    I am working on my Senior Design Project that requires the use of incoming compressed air, propotional valves, continuous servo motors, and a serial servo motor microcontroller.  I have figured out how to send byte sequences to the microcontroller through LabVIEW using the VISA serial write function.  The motors are attached to the valves to control the flow rate.  I have created my own simple feedback system using a bunch of case structures but I realized that I am basically trying to recreate the wheel (I basically was writing my own PID VI).   I have an older version of LabVIEW (7.0 Express) and theres no way to upgrade or buy the PID toolkit, so I am stuck using the Simple PID VI.  Also, the only way the motor works is sending an array of bytes to tell it to turn on/off, direction, and speed.  Is there any way I can use the Simple PID VI in conjunction with the VISA SERIAL write function, or is there any other way I can communicate with the serial port using this pid vi?  Any information would be appreciated.

    Hi gpatel,
    you know how to communicate to serial port, but you don't know how to send a value from SimplePID to serial port???
    You know how to communicate, but then you don't know how to communicate???
    You should explain this in more detail...
    Edit:
    From you first post you know what values your motor driver is expecting. You know which values the PID.vi is providing. Now all you need is a formula to reshape the values from PID to the motor. It's up to you to make such a formula. Unless you provide any details we cannot give more precise answers...
    Message Edited by GerdW on 02-28-2010 08:35 PM
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • Looking up values from Map/HashMap  when Objects are used as keys

    I'm trying to understand why Map/HashMap don't test for equals() when looking up a key ( which is an Object that overrides equals() and hashCode()) in the Map.
    I've written this code, based on some code from the SCJP book, but it is not exactly the same, this code talks about a different issue not addressed in the book.
    I've added my questions inside the comments below, I think that is the best way I can ask it.
    import java.util.*;
    class Bird{
         public String name;
         public Bird(String name){
              this.name = name;
         //Override equals()
         public boolean equals(Object o){
              if(((Bird)o).name.equals(this.name)){
                   return true;
              }else{
                   return false;
            //Override hashCode
         public int hashCode(){
              return name.length();
    class TestMapLookup{
         static public void main(String[] args){
              Map<Object, Object> hashMap = new HashMap<Object, Object>();
              Bird b = new Bird("crow");
              hashMap.put(b, "somevalue");
              //according to the book, the map object calls the key's (Bird object's)
              //hashCode() first and then equals()
              //to find this key in the map
              System.out.println(hashMap.get(b));
              //Using the b reference to lookup value
              //ouputs - somevalue
              System.out.println(hashMap.get(new Bird("crow")));
              //Using a new Bird object to lookup value
              //outputs - somevalue
              //because Bird overrides equals and hashCode
              //otherwise we'd get null
              //Now change the name of the bird in the b reference
              b.name = "sparrow";
              //Notice that the crow's hashCode is 4
              //sparrow's hashCode is 7 , in the above implementation of hashCode
              System.out.println(hashMap.get(b));
              //Again using b reference to lookup value
              //ouputs - null
              //because the hashCode of b.name does not match
              //the hashCode of any of the keys stored in the map
              System.out.println(hashMap.get(new Bird("crow")));
              //This also outputs null
              //for the same reason that there's no key in the map
              //with a hashcode of 7
              //This is where it becomes strange......................
              //Change the name of the bird in the b reference
              //so that the new name has the same hashCode, as the key in the map
              b.name = "dove";
              System.out.println(hashMap.get(b));
              //In the above - the hashCode matches
              //but equals() fails
              //even though equals() fails, the key is still located and the value is output
              //output is "somevalue"
              //same here:
              b.name = "1234";
              System.out.println(hashMap.get(b));
              //output is "somevalue" instead of null
              b.name = "abcd";
              System.out.println(hashMap.get(b));
              //output is "somevalue" instead of null
              //why does it output "somevalue" instead of null , even though when the map
              //looks up the key , equals() returns false?     
              System.out.println(hashMap.get(new Bird("crow")));
              //In this case ( new Bird reference ) it prints null
    }I'm aware of best practices in coding and coding conventions but haven't used them here, because this is in preparation for SCJP - which tests on a lot of different things.
    I appreciate any info.

    It is correct that b is referring to the same object that the map's key is pointing to, but why does the following
    print null , instead of "somevalue"?
    at these lines in the code above.
    b.name = "sparrow";
    System.out.println(hashMap.get(b));Because the hashCode used when you stored b was 4, and now it's 7. You should read the Wikipedia article on Hashtable, but a simplistic explanation is that a HashMap has a bunch of "buckets," say 10, each indexed with a number 0-9. To decide which bucket to put a new key-value pair in, you take the hashcode (say 2112) and take the remainder of hashcode/number of buckets (in this case, 2112%10=2). So when you store the key-value, it gets "put" in this bucket.
    When you change the hashcode of b by changing its name attribute, it doesn't change the fact that the pair is in that bucket. But, it now looks in the wrong bucket and so can't find the pair.
    A hashtable gets its good efficiency by not having to look through all values to find the pair. It can jump directly to the correct bucket, which takes constant time instead of being dependent on the number of items in the collection.
    endasil wrote:
    You should never, ever change an object being used as a key in a map.I guess this is a best practice, I just wanted to try changing the key object to test a few things for SCJP, which does not test on coding best practices but tests on how the code behaves.Yep, and what you should take away is that this is WHY it's bad to change the key :).

  • Problem in getting Output Values from BAPI

    hi,
    When i call BAPI 'BAPI_REQUISITION_GETITEMS' with Input parmaters 'Material Number' like '1000' from xMII BLS.
    While executing from xacute query im not getting any output.
    Please suggest me how can achieve using this BAPI, what are all inputs to be passed?.
    Regards,
    Raj

    Hi Sachin,
    Thanks for your reply.
    not only OPEN_ITEMS and also need to add the following fields in BLS.
                                     ASSIGNED_ITEMS,
                                    CLOSED_ITEMS,
                                     DELETED_ITEMS,
                                    PARTIALLY_ORDERED_ITEMS,
                                     ONLY_NON_MATERIAL_ITEMS
    now its working fine.
    Thanks.

  • FETCHING OUTPUT  VALUE FROM PL/SQL BLOCK

    hI aLL,
    I'm working on ODP.NET. I'm executing below pl/sql command. while executing this command in pl/sql it's showing the output which is an xml.
    declare
    xmloutput xmltype;
    xmldata varchar(32767);
    teid t_id := t_en_id( 'L','L',NULL,12121,'ABC','USER','N');
    tgetinfo to_info := NULL;
    RETVAL NUMBER;
    begin
    RETVAL := GET_DTLS(teid,tgetinfo);
    dbms_output.put_line(RETVAL);
    xmldata := tgetinfo.XML_info.getclobval();
    dbms_output.put_line(xmldata);
    end;
    I passed above command in string variable for passing in code. like below
    string StrQry = "";
    StrQry += "declare \n";
    StrQry += "xmloutput xmltype; \n";
    StrQry += "xmldata varchar(32767); \n";
    StrQry += "teid t_id := t_en_id( 'L','L',NULL,12121,'ABC','USER','N'); \n";
    StrQry += "tgetinfo to_info := NULL; \n";
    StrQry += "RETVAL NUMBER; \n";
    StrQry += "begin \n";
    StrQry += "RETVAL := GET_DTLS(teid,tgetinfo); \n";
    StrQry += "dbms_output.put_line(RETVAL); \n";
    StrQry += "xmldata := tgetinfo.XML_info.getclobval(); \n";
    StrQry += "dbms_output.put_line(xmldata); \n";
    StrQry += "end; \n";
    I'm passing output parameter ":temp" for this command. I want to catch output xml in ":temp" variable
    which is varchar2 type.
    Added below line before printing xmldata;
    StrQry += ":temp := xmldata; \n";
    cn.Open();
    OracleCommand cmd = new OracleCommand(StrQry, cn);
    cmd.Parameters.Add(":temp", OracleDbType.Varchar2, 32767, ParameterDirection.Output);
    cmd.ExecuteNonQuery();
    But which executing through c# code it's showing the below error.
    Oracle.DataAccess.Client.OracleException ORA-06502: PL/SQL: numeric or value err
    or: character string buffer too small
    ORA-06512: at line 11 at Oracle.DataAccess.Client.OracleException.HandleError
    Helper(Int32 errCode, OracleConnection conn, IntPtr opsErrCtx, OpoSqlValCtx* pOp
    oSqlValCtx, Object src, String procedure)
    at Oracle.DataAccess.Client.OracleException.HandleError(Int32 errCode, Oracle
    Connection conn, String procedure, IntPtr opsErrCtx, OpoSqlValCtx* pOpoSqlValCtx
    , Object src)
    at Oracle.DataAccess.Client.OracleCommand.ExecuteNonQuery()
    at orclGetDetails.Program.DoProcess()
    How can i get the output to output variable ":temp".
    Pls help.
    Ideas are appreciated.

    Your PL/SQL block isn't returning anything. DBMS_OUTPUT is, at best, a way of debugging code, not passing data around. Assuming you configure and enable an appropriately sized buffer, I suppose your ODP.Net application could make DBMS_OUTPUT.GET_LINE calls to retrieve the XML. But that's not not a way to design an application.
    If you want a PL/SQL block that returns XML, you'll need to create a function and have the function return the XML (you could also create a procedure with an OUT parameter in which you could return the XML).
    Justin

  • Trying to make a testbench to check output values from I/O node

    Hello there! I am trying to make a testbench for a I/O node with analog and digital signals. I want to look at the output and see what i get. I have already made the code for the FPGA and the testbench code but it seems like i don't get them to work together... I have followed the steps from National Instruments: http://www.ni.com/white-paper/8668/en/ The only difference is that i have changed the case structures in the TestBench so it matches my I/O nodes.
    Hope i can get some help
    Attachments:
    TestBench.png ‏32 KB
    FPGA.png ‏34 KB

    Hi erlingborn, 
    When you say you cannot ge tthe testbench code to work together with the FPGA code, what exactly do you see?
    Do you see any error message? Behaviour that is not expected? 
    Your FPGA VI seems to have a true constant tied to the stop button of the while loop, which means that it will not run?
    Best Regards,
    Shazil M.
    CLAD
    Applications Engineer
    National Instruments UK & Ireland

  • Output Value From Struts Iterator tag

    I have a jsp with the following code:
    <logic:iterate id="row" name="Prefs">
    <tr>
    <td>
    <bean:write name="row" property="userPrefId"/>
    <html:submit onclick="setWKey('defaultFilter',${row.userPrefId});" value="Default"/>
    </td>
    </tr>
    how can i get the value of row.userPrefId into the onclick event for my submit button. No matter what I try it doesn't seem to work. (the bean:write in the line above prints the value I want ).
    Thanks
    troy

    I believe the "onChange" attribute has to be "onchange" in order for it to work (jsp tags are case sensitive)
    The generated html should look something like this:
    <select name="columnAssumptionsData(1)" class="YT-input-field" onchange="javascript:loadScenario(this); return false;">
    <option value="1">label1
    <option value="2">label2
    </select>Then your javascript function would be
      function loadScenario(changedSelect){
        var currentValue = changedSelect.value;
        var selectedIndex = changedSelect.selectedIndex;
        var selectedOption = changedSelect.options[selectedIndex];
      }You can then manipulate it in javascript to your hearts content.
    However you can NOT run any java code until you resubmit the form.
    Java and javascript are NOT the same thing
    (forgive me if you know that already, but the amount of posts we get here about this...)
    Cheers,
    evnafets

  • Reading the output values after each step executes in LabVIEW User Interface

    Hello all,
    Development environment: TestStand 2010 SP1 and LabVIEW 2010 SP1
    Problem: is there a way to execute the subsequent steps programatically and get the output values from each of them?
    I have already extended a little bit a Full OI interface for TestStand to load up any sequence, choose some of the steps and run them step by step (something like option to Run Selected steps). What I am trying to do is to add some actions between each step and do that in User Interface (I can't modify the sequence!), so I am starting the NewExecution with some previously configured InteractiveArgsParam and set an option breakAtFirstStep to True. Afterwards I am just doing something like Step Over when debugging the sequence and this works good, but I didn't fine a way yet to read the output values from the steps...
    Then, if I wait until the execution finishes I can read my Results by processing the ResultObject, but this works only after finalizing of the test sequence. Since I wanted to stop after each step, read the values, do some actions and continue to the next step I tried to register an event callback for Trace of Execution View Manager. I can see that after each executed step this event is triggered, but when I try to read a ResultObject returned in Event Data it is not filled with values (ResultList seems to be empty?). Is it a proper behaviour or maybe I am doing the readout in wrong way? (It is the same VI as for reading ResultObjects after sequence finishes and there it works fine for arrays, containers and other data types).
    Like I mentioned I can't modify the Test sequences, I can't add a UImessages.
    What are my options? Should the trace event returns all output values from each steps or is it just used for status checking? Or maybe there is completely different approach to that matter?
    Thanks in advance for any suggestions,
    Best Regards.
    CLA, CTD, CLED @ Test & Measurements Solutions Poland
    Solved!
    Go to Solution.

    Thanks for your replay, I have tried to build it in my LabView Block Diagramm, es seems like this image.
    But the variable GetNumSubProperties ist always 0. Why?
    PS: I need only the variable "Step.Result.PassFail" from the last step, do you know, how can I get it? I think, it is maybe easier than read all the "Result".
    Attachments:
    ReadStepResultInLabview.JPG ‏39 KB

  • How to get the Output File Name as One of the Field Value From Payload

    Hi All,
    I want to get the Output file name as one of the Field value from payload.
    Example:
    Source XML
    <?xml version="1.0" encoding="UTF-8" ?>
    - <ns0:MT_TEST xmlns:ns0="http://sample.com">
    - <Header>
      <NAME>Bopanna</NAME>
      </Header>
      </ns0:MT_TEST>
    I want to get the Output file name as " Bopanna.xml"
    Please suggest me on this.
    Regards
    Bopanna

    Hi,
    There are couple of links already available for this. Just for info see the below details,
    The Output file name could be used from the field value of payload. For this you need to use the UDF DynamicFile name with below code,
    //       Description: Function to create dynamic Filename
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File" , "FileName");
    conf.put(key,a);
    return "";
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File" , "FileName");
    conf.put(key,a);
    return "";
    With this udf map it with the MessageType as
    (File Name field from Payload) > DynamicFileConfiguration>MTReceiver
    Thanks
    Swarup

  • Sequence in process flow (output from mapping)

    I have a mapping where I am using sequence operator and creating a record in the target table I need to pass this variable out of the mapping and as input to another mapping. I am not able to pass the sequence out of the mapping. How can we assign values to mapping output variables however I do it it says you cannot assign variables to output parameters from the mapping it says.
    mapping input parameter and mapping output parameter are intended to be executed before and after the data flow of the mapping and cannopt accept inputs from any part of the data flow.
    Any ideas as to how this can be done.
    Can a pluggable mapping be called in a process flow.
    Thanks
    Edited by: user8023060 on Jun 23, 2009 6:08 AM

    Hi,
    write a plsql-function that executes returns seq_XXX.currval (or, to be on the safe side, select the value from your table).
    Assign that value to an output attribute.
    And no, pluggable mappings can just be included from other mappings, there is no way to execute them directly.
    Regards,
    Carsten.

  • How to get maximal value from the data/class for show in Map legend

    I make WAD report that using Map Web Item.
    I devide to four (4) classes for legend (Generate_Breaks).
    I want to change default value for the class by javascript and for this,
    I need to get maximal value from the class.
    How to get maximal value from the data/class.
    please give me solution for my problem.
    Many Thx
    Eddy Utomo

    use this to get the following End_date
    <?following-sibling::../END_DATE?>
    Try this
    <?for-each:/ROOT/ROW?>
    ==================
    Current StartDate <?START_DATE?>
    Current End Date <?END_DATE?>
    Next Start Date <?following-sibling::ROW/END_DATE?>
    Previous End Date <?preceding-sibling::ROW[1]/END_DATE?>
    ================
    <?end for-each?>
    o/p
    ==================
    Current StartDate 01-01-1980
    Current End Date 01-01-1988
    Next Start Date 01-01-1990
    Previous End Date
    ================
    ==================
    Current StartDate 01-01-1988
    Current End Date 01-01-1990
    Next Start Date 01-01-2005
    Previous End Date 01-01-1988
    ================
    ==================
    Current StartDate 01-01-2000
    Current End Date 01-01-2005
    Next Start Date
    Previous End Date 01

Maybe you are looking for

  • Batch Management with Moving Average Price

    Hi all, I got a question here. If we use batch management in SAP with our price control as 'V' (MAP for Moving Average Price), and we do good issue out by batch, will the system credit my stock based on MAP value or the actual value (actual PO price

  • Digital Signatures in eCATT or Sol Man

    Hi All, How can we include digital signatures feature either in eCATT scripts or in sol man. Regards, Justin

  • Maps App

    I couldn't find anyone else that has complained about these two problems although it seems unlikely that I am the only one that hates this. I am posting this in hopes that there is a fix out there or at least bring it to the attention of Apple. Here

  • Transferring files from old PC floppy disks

    I have a collection of old floppies from a PC. Although I know I won't want most of the info on them, there are treatments for various ideas I'd really like to get hold of. I've asked in the Apple shop, they said they couldn't think of a way. My only

  • Debug PO print program

    Hi friends. I am trying to debug PO print program, even after putting an endless loop.. it's not going to debug mode. Please help Thanks Lakhbir