Splitted Data to be Set in the respective list

Hi,
I want to set the respective spilted values in the respective List, but since the length is coming as 2 only in the firstList both the splitted values are populated.
String test = "900000005146$@$AR@L-";
        List<String> firstList = new ArrayList<String>();
        List<String> secondList = new ArrayList<String>();
        String[] parts = test.split("\\$@\\$");
            if(parts != null){
                for(int i = 0; i < parts.length; i++){
                  System.out.println(parts[0]);
                  firstList.add(parts[0]);
                  System.out.println("FirstList:"+firstList);
                  if (parts.length >= 2) {
                      secondList.add(parts[1]);
                      System.out.println("FirstList:"+secondList);
              } else {
                System.out.println("Failed!");
              }Output:-
900000005146
FirstList:[900000005146]
FirstList:[AR@L-]
900000005146
FirstList:[900000005146, 900000005146]
FirstList:[AR@L-, AR@L-]
Instead I want the data to be populated as below:-
900000005146
FirstList:[900000005146]
AR@L-
SecondtList:[AR@L-]
Please clarify.
Thanks.
Edited by: 797836 on Mar 12, 2013 7:05 AM

Thanks Guys.
String test = "900000005146$@$AR@L-";
        List<String> firstList = new ArrayList<String>();
        List<String> secondList = new ArrayList<String>();
        String[] parts = test.split("\\$@\\$");
        System.out.println("the length is:"+parts.length);
            if(parts != null){
                for(int i = 0; i < parts.length; i++){
                  firstList.add(parts[0]);
                  System.out.println("FirstList:"+firstList);
                  if (parts.length >= 2) {
                      secondList.add(parts[1]);
                      System.out.println("SecondList:"+secondList);
                      break;
              } else {
                System.out.println("Failed!");
              }Added the break; to get the correct results.
Thanks.

Similar Messages

  • Restore from time machine does not list all my backups.  I know they exist but there dates are not present on the restore list.  Any help appreciated.

    Restore from time machine does not list all my backups.  I know they exist but their dates are not present on the restore list.  Any help appreciated.  If I must use one of these older dates to restore, how do I then get the more current data off time machine?

    Ok, so am i correct in saying that the steps to fix are as follows.
    That's one option, but not what I meant by restoring in the time-travel view. The latter is what you get when you enter Time Machine.
    is the fresh install not going to be able to "see" the time machine backups that I have at the moment.
    It should, but sometimes people report that it fails. I'm not sure why that happens.

  • How to Broadcast subset of a data in a report to the respective users

    Hi
    I have to broadcast the subset of a data in a report to different users. I believe this can be done using busting email broadcasting option. But im not sure about the settings.
    My report looks like below:
    Accounting Clerk             Customer              Invoice Amount           Discount Amount
    Clerk1                               Customer1           100                              50
    Clerk1                               Customer 2           200                              70
    Clerk2                               Customer3            150                              55
    Clerk2                               Customer4            80                                10
    I need to broadcast the above report to my respective accounting clerks. ie I need to broadcast only the first two records to clerk1 as an email and only the last two records to Clerk 2.  The accouting clerk info object has email address as an attribute.
    Please let me know how to achieve the above requirement. Your help would be highly appreciated.
    Regards
    Sadeesh

    Thanks for the reply Alex.
    Is it mandatory to maintain the email address in SU01 or can the email adddress be maintained as an attribute of say accounting clerk in my example?
    For example say i have 20 accounting clerk, do i need to create 20 variants one for each accounting clerk in broadcasting? Please clarify.
    If yes for the above query, are there any way to reduce the no of variants.
    Your help would be highly appreciated.
    Regards
    Sadeesh

  • How to split data into tables based on the entries in a column?

    My problem is very similar to this thread: how to link data from one numbers sheet to another sheet, however I could get it to work the way described there. I have one big table for entering data (the first one). I would like to have a few other tables populated automatically based on the entries in one of the columns of the first table. In my example below I put everything in one sheet for clarity. The selection to the other tables is to be done on the column "fruit" in the first table. (second one is "oranges", then "apples" and then "pears" -- had to cut the width of my screenshot due to the limitations of Apple's forums).
    Here is what it would look like, just cannot figure out how to make it happen automatically.
    Tried also importing similar Excel example to Numbers, but the import did not work correctly.
    Any help will be appreciated.
    LD

    Larry,
    Here's an approach that I've used...
    In the Purchases table, Aux column, the expression is:
    =COUNTIF($A$1:A2, A) & "-"&A
    Fill Down
    This expression builds a string that identifies the item and the ocurrance of that item.
    The Date column of the Summary tables, cell a3, contains:
    =IF(ROW()-3<COUNTIF(Purchases :: $A,$A$1), LOOKUP(ROW()-2&"-"&$A$1, Purchases :: $F, Purchases :: B), "")
    Fill Across, then fill down.
    Regards,
    Jerry

  • Setting up the correct list sepparator on Application Server

    Hi,
    I have created an Oracle report in Reports 10g, with DESFORMAT = DELIMITEDDATA and DELIMITER = ','.
    MIMETYPE is set to application / vnd.ms-excel.
    Unfortunately, the output of the report is not formatted in Excel file (all lines are in the same cell).
    If i remove DELIMITER=',', it will work correctly.
    This is related to List Separator definition on the Application Server (e.g. Control Panel, Regional Settings, etc....).
    So, it should work correctly if i use DELIMITER = ',' and set up "," as List Separator on Application Server.
    Is my assumption correct ?
    Thanks,
    Mihai

    You should only need the following for excel format: *...&DESFORMAT=DELIMITEDDATA&MIMETYPE=APPLICATION/VND.MS-EXCEL&...*
    Good Luck!

  • Problem in Date Format when user chages the date format in preferences

    I want to generalize my code so that user can change what ever Date format he wants, I will get the date from the page in the format yyyy-mm-dd, and if the Date Format is
    set to MM/dd/yyyy in prefernces i need to use MM/dd/yyyy and if the Date Format is set to dd-Mon-yyyy in prefernces i need to use dd-MMM-yy, so my question is how to know what Date format is set in the preference so that i can have all the possible date format for inserting the date
    Thanks
    Babu

    Babu,
    The date format in OAF Pages is controlled by profile ICX: Date format mask.This profile can be set at site as well as user level for the individual users to set the Date format.
    But I would advice not to go for setting different profile values at user level, because i remember some old threads, where seeded Oracle pages fail, as code their is not generalised to handle date formats.
    If your are planning to have this in ur custom page, go ahead, but do check the entire flow is working fine for different values of this profile at user level.
    --Mukul                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Select Lists - Setting and Referencing (Using) the Select List variable

    I have (a login page and) 3 application pages (call them Day, Week, Month), each with similar selection lists and a chart. I have three requirements.
    1) When a new selection is made, the value of the selection list variable is updated --that is, it does what select lists do.
    2) I need to set the value of the Month selection list variable before the Month page is rendered for the first time -- I need to give it an initial value.
    3) When navigating from page to page, say from Month to Week or Day back to Month, I need to have the value of the selection list variable carried to the new page from the value on the previous page.
    It sounds simple to me -- something that one could do with an (global) application item. The logic would be like
    IF :Page_Name_Flag = 'Week' THEN -- staying on the Week page
      SELECT :WK_SelectList_Name INTO :GLOBAL_SelectList_Name FROM DUAL
    ELSE -- new pass on this page
      SELECT  :GLOBAL_SelectList_Name INTO :WK_SelectList_Name FROM DUAL
      SELECT 'Week' INTO :Page_Name_Flag
    END IF;But that doesn't work for me. The page's select list variable seems to be NULL sometimes causing the value of :GLOBAL_SelectList_Name to be set to null. Other times, the copy from the global variable to page select list varable doesn't seem to change the page select list variable.
    At http://apex.oracle.com/pls/apex/f?p=43250:101 (guest/Ima9Gue8t) is an example where I have each page's select list working (except on the initial visit to the page, where the select variable is null!!!). How can I get the select list value on the new page to sync with the value from the previous page?
    Thanks,
    Howard
    Edited by: Howard (DBA in Training) on Sep 18, 2012 11:53 AM

    I'm closing this because I got it to work. In the end, it worked as I had described above. There was some setting of the Select List variable, that I now have correct, that was incorrect before. I wonder what it was?

  • Set up of Task list across the plants

    Hello,
    I need to set up the task lists for 9 different plants. Essentially they are the same TL but used in different plants. I am looking for the best approach to set them up.
    Can we maintain a master task list at high level with central planning plant (without a counter) and then assign the same task list to different plants using group counters ? Whenever I am trying to use TL group counter, I have to set up a neww task list completely, this will result into maintaning 9 different task lists even when they are same. Also how do I set it up for a central plant without using counter ??
    Thanks
    Sarang

    Hello,
    Please have Look this Thread might you get some useful out of this [General tasklist across all plants.;
    Regards,
    Rakesh

  • How do I set up a distribution list with multiple email addresses?

    I can't figure out how to do this - I am a .mac member and really have no idea how to use the desktop mail function but I am assuming that I need to set up the distribution list in mail since I can't find anywhere to do it on .mac.
    I am really sorry for this lame question - is it a problem with my ISP (sbc) or is it my operating system - 10.3.9?

    Welcome to the discussions, CassC.
    You may need to re-post in the pre-Tiger mail forum.
    But what I THINK you need to do is use your Address Book, and make a group. Add to the group (by selecting, dragging and dropping) the contacts you need in the distribution list. Now in Mail use the name of the group in the To: or Cc: or Bcc: field to send them all mail.
    AK

  • Excel cannot connect to the SharePoint list

    Please see below for the event log information
    Log Name:      OAlerts
    Source:        Microsoft Office 14 Alerts
    Date:          22/05/2013 12:18:20 PM
    Event ID:      300
    Task Category: None
    Level:         Information
    Keywords:      Classic
    User:          N/A
    Computer:      PCNAme
    Description:
    Microsoft Excel
    Excel cannot connect to the SharePoint list.
    P1: 101359
    P2: 14.0.6029.1000
    P3: 
    P4: 
    Event Xml:
    <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
    <System>
    <Provider Name="Microsoft Office 14 Alerts" />
    <EventID Qualifiers="0">300</EventID>
    <Level>4</Level>
    <Task>0</Task>
    <Keywords>0x80000000000000</Keywords>
    <TimeCreated SystemTime="2013-05-22T10:18:20.000000000Z" />
    <EventRecordID>963</EventRecordID>
    <Channel>OAlerts</Channel>
    <Computer>Z88AE1DAB0658.pioneergroup.pioneerfoods.co.za</Computer>
    <Security />
    </System>
    <EventData>
    <Data>Microsoft Excel
    </Data>
    <Data>Excel cannot connect to the SharePoint list.
    </Data>
    <Data>101359
    </Data>
    <Data>14.0.6029.1000
    </Data>
    <Data>
    </Data>
    <Data>
    </Data>
    </EventData>
    </Event>
    May your PC's be fast and your restarts few.

    Hi there!,
    Check the following thread:
    http://community.spiceworks.com/topic/334543-excel-cannot-connect-to-the-sharepoint-list
    Our problem ended up being a 3rd party monitoring agent/service we activated on the server.
    Check the OP - I list what I've tried. Perhaps you may find your problem there?
    May your PC's be fast and your restarts few.

  • Parsing the respective data in the String which is dynamic

    Hi,
    I have customer application, in which we are handling the validation for customer details through a custom validator
    For example, if I have not entered the mandatory value for custFirstName.I will get an error message in my java class as below:-
    String errMsg = "Required value missing for CustomerVO.custFirstName"
    Here I need to parse the error message (ie) I need only the field and VO which causes this error hence i need "CustomerVO.custFirstName" only
    so that I can write the code to set the value for custFirstName
    Like
    if (mandatoryErrMsg){
    //parse the errorMsg and get the respective field with VO (ie)CustomerVO.custFirstName
    //and set the value
    CustomerVO customerVO = new CustomerVO();
    customerVO.setCustName("xxx");
    save(customerVO);
    Like wise i will get a different field with different VO
    Like :-
    String errMsg = "Required value missing for AddressVO.State"
    Here I need to write a generic method which parse the only the respective VO and field like in this case AddressVO.State.
    Since the VO and field can be anything. What is the min and max limit we need set for parsing and hoe we can parse only the
    respective VO and field. please provide your opinion on this.
    Thanks.

    Ram wrote:
    As per your previous post, it seems you need to parse only the last word of the error message. You can easily get the last word of the error message by using substring and lastIndex() methods.
    For example,
    String errMsg = "Required value missing for CustomerVO.custFirstName";
    String lastWord = errMsg.substring(errMsg.lastIndexOf(" ")+1);You will get "CustomerVO.custFirstName" as the value for lastWord. Now you can easily split the value String.split() method by "VO." as delimiter.
    lastWord.split("VO.");
    That's one possible approach. Without knowing more details about the forms the error message can take, we can't know if it will work in all cases. Which I pointed out in my first response, and which the OP chose to ignore when demanding we solve his problem for him in his reply.

  • Setting only the TO field on the Created on Field in Selection screen to Current date

    Hello,
    We have a requirement to Set only the To date in the Created on Field in Selection screen to the Current date, I have tried through Dynamic variable option to set the Date calculation but I am able to see Options to set the Current date to From or From and To Created on Date fields instead of setting the Current date only to To created on Field.
    We are in 4.7 and are not supported with user defined variables, Appreciate your inputs on this.
    Thanks and Regards
    Mohammed Roshan

    >
    sunitha j wrote:
    > Hi ,
    >
    > It would br gr8..if u could give some more info about the usage of this class..i mean if i hav to implement it in my program....wat is the necessary data that needs to b copied...
    >
    > Thanx,
    > Sunitha
    what Text field you want to change.
    Since you are working with Dynpros , you have to split the screen in two parts, and one for the Showing differenet fonts and other your normal Dynpro information.
    you need to use the Method ADD_TEXT Did you check the program DD_STYLE_TABLE.

  • The ADO NET Source was unable to process the data. ORA-64203: Destination buffer too small to hold CLOB data after character set conversion.

     We developed a SSIS Package to pull the data From Oracle source to Sql Server 2012. Here we used ADO.Net source to pull the records from Source but getting the below error after pulling some 40K records.
      [ADO NET Source [2]] Error: The ADO NET Source was unable to process the data. ORA-64203: Destination buffer too small to hold CLOB data after character set conversion.
    [SSIS.Pipeline] Error: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED. 
     The PrimeOutput method on ADO NET Source returned error code 0xC02090F5. 
     The component returned a failure code when the pipeline engine called PrimeOutput(). 
    The meaning of the failure code is defined by the component, 
    but the error is fatal and the pipeline stopped executing. 
     There may be error messages posted before this with more 
    information about the failure.
    Anything that we can do to fix this?

    Hi,
      Tried both....
      * Having schema type as Nvarchar(max). - Getting the same error.
      * Instead of ADO.Net Source used OLEDB Source with driver as " Oracle Provide for OLE DB" Getting error as below.
           [OLE DB Source [478]] Error: SSIS Error Code DTS_E_OLEDBERROR.  An OLE DB error has occurred. Error code: 0x80004005.
           [SSIS.Pipeline] Error: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED.  The PrimeOutput method on OLE DB Source returned error code 0xC0202009.  The component returned a failure
    code when the pipeline engine called PrimeOutput(). The meaning of the failure code is defined by the component, but the error is fatal and the pipeline stopped executing.  There may be error messages posted before this with more information about the
    failure.
    Additional Info:
       * Here the Source task is getting failed not the conversion or destination task.
    Thanks,
    Loganathan A.

  • Cannot add hub-managed content type with external list lookup columns to a list -- Error:Id field is not set on the external data field

    This is a variation on the issue mentioned in this
    post
    We are using SP 2010 Content Hub to manage our content types.  On the content hub we've created a couple of exteranl lists, and then created some site columns as lookups against these lists.  We then added the columns to one of our content types
    and set it to publish.
    After the publishing job executed, I tried adding the content type (which now appears on the subscriber sites) to one of the document libraries on one of the subscriber sites.  When I did that it threw the following error:
    Microsoft.SharePoint.WebControls.BusinessDataListConfigurationException: Id field is not set on the external data field    
    at Microsoft.SharePoint.SPBusinessDataField.CreateIdField(SPAddFieldOptions op)     
    at Microsoft.SharePoint.SPBusinessDataField.OnAdded(SPAddFieldOptions op)     
    at Microsoft.SharePoint.SPFieldCollection.AddFieldAsXmlInternal(String schemaXml, Boolean addToDefaultView, SPAddFieldOptions op, Boolean isMigration, Boolean fResetCTCol)     
    at Microsoft.SharePoint.SPContentType.ProvisionFieldOnList(SPField field, Boolean bRecurAllowed)     
    at Microsoft.SharePoint.SPContentType.ProvisionFieldsOnList()     
    at Microsoft.SharePoint.SPContentType.DeriveContentType(SPContentTypeCollection cts, SPContentType& ctNew)     
    at Microsoft.SharePoint.SPContentTypeCollection.AddContentTypeToList(SPContentType contentType)     
    at Microsoft.SharePoint.SPContentTypeCollection.AddContentType(SPContentType contentType, Boolean updateResourceFileProperty, Boolean checkName, Boolean setNextChildByte)     
    at Microsoft.SharePoint.SPContentTypeCollection.Add(SPContentType contentType)     
    at Microsoft.SharePoint.ApplicationPages.AddContentTypeToListPage.Update(Object o, EventArgs e)     
    at System.Web.UI.WebControls.Button.OnClick(EventArgs e)     
    at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)     
    at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)     
    at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)    b55297ed-717f-466d-8bdc-297b20344d3f
    I checked the external  content type configuration and it did specify an "id column".  Anyone know if what I am attempting to do is possible and if so, what special configurations are required?
    Thanks

    The issue is not External Content type or external list but the look up column.
    It's not possible to publish a look up column via the Content Type Hub.
    If you need to do this then an alternate way is to use a Managed Metadata column instead, otherwise you will have to implement this via a feature.
    Varun Malhotra
    =================
    If my post solves your problem could you mark the post as Answered or Vote As Helpful if my post has been helpful for you.

  • How do I set up a .pdf form to save filled data without having to print the form?

    How do I set up a .pdf form to save filled data without having to print the form?  I have provided my clients a lifecycle .pdf form they can use to record data for unique client meetings.  They want the ability to save their completed data whenever they use the form under a unique file name.  I've told them the only way I know how to do this is to print the completed form as a .pdf document and then save it. 
    Is their a way to save the data to a unique file name without printing the filled form?
    Is there a way to reset the form with blank fields after saving? or to add a clear fields button?
    Thanks.

    If you reader extend  a pdf using livecycle reader extensions then you can save the filled in data - this is true if you are using Adobe reader to view the PDF's. If you open it in Acrobat then the functionality is already there.

Maybe you are looking for

  • Problem with Union and Currval/NextVal

    Hello, I think I may have found a bug with 8.1.5 but I am not sure. Here is the SQL I am trying to execute: insert into LFI_TEST_OWNER.CURRVAL_TEST_tb SELECT lfi_seq_num_sg.currval FROM DUAL UNION ALL SELECT lfi_seq_num_sg.currval FROM DUAL When I ex

  • Every time I try to open ITunes i get a DEP error

    So im running windows XP and it gives me the error here is the error EventType : BEX P1 : iTunes.exe P2 : 10.6.0.40 P3 : 4f56cf56 P4 : unknown P5 : 0.0.0.0 P6 : 00000000 P7 : 0bb51040 P8 : c0000005 P9 : 00000008 I have tried everything i can to fix t

  • Converting UNPROTECTED Mp4 files to Mp3 format?

    I have some unprotected Mp4 files that I can't seem to convert to Mp3 format. The weird thing is, under Advanced, when I try to convert Protected Mp4 videos, there's an option that says "Convert to Mp3 format", but with my unprotected Mp3 files, ther

  • How Configure background update on windows Server

    Hi, I read Admin guide from http://www.adobe.com/devnet/flashplayer/articles/flash_player_admin_guide.html page 17-19 for background update installation and configuration but Document ask to create directory structure in Linux style and i want to con

  • Photoshop Elements 12 won't launch

    When I try to launch PSE12, I keep getting the sign-in window asking me to register. It is registered and I chatted with two service reps  neither of whom could help me. Would appreciate any help in this matter. Is there a fix for this?