Add_item : Attributes list collection sort order

Hello:
I created multiple custom attributes and added them to my custom item type. I need to apply these attributes while adding an item programmatically.
1) How do i define the order of the Attributes list via the Portal builder so as to match the corresponding values read from a list/table,etc. ?
2) The ordering arrow buttons in the attribute list of my custom item type does not match the result set from my query. I tried all options of "order by" clause. Here is the query - (componenttype is the name of my custom item type)
select iatts.ID
,atts.caid
     ,atts.DATA_TYPE     
     ,atts.CAID
     ,atts.NAME,atts.DISPLAY_NAME
     ,iatts.ITEM_TYPE_ID
from wwsbr_item_types itypes
,wwsbr_item_type_attributes iatts
,wwsbr_attributes atts
where --itypes.caid = 133
itypes.name like 'ComponentType'
and itypes.ID = iatts.ITEM_TYPE_ID
and iatts.ATTRIBUTE_ID = atts.ID
--and atts.CAID = 133
order by atts.id
3) I need to expect a certain order of the attribute ids, when bulk collecting into the attributes array, in order to populate the values collection in the same. So, how do I determine the order of the attributes ids ?
4) Is there a better way to do this ?
Thank You.
regards
Ananth

Document Sets are great tools for grouping multiple documents together. However, if every set has exactly one document, it would be better to just upload the file and not place it within a Document Set:
Uploading documents using object model - http://msdn.microsoft.com/en-us/library/office/ms454491(v=office.14).aspx
Uploading documents using web services -
http://cecildt.blogspot.com/2010/10/upload-documents-to-sharepoint-2010.html
If you have requirements to use Document Sets, keep in mind that this adds a layer of complexity beyond a simple Document Library. Behind the scenes, each Document Set is treated as a separate folder, and although can you query items within it, there might
be extra steps for getting the sort order to ignore the folder structure. Can you try setting the Scope to be "Recursive" and also specify that you are looking only for files and not folders:
<Eq><FieldRef Name='FSObjType'/><Value Type='Lookup'>1</Value></Eq></Where>
Dimitri Ayrapetov (MCSE: SharePoint)

Similar Messages

  • Can't Manually Change Collection Sort Order

    When trying to manually change the sort order of any collection I get the following error message:
    Database "/Users/Dan Donovan/Pictures/Lightroom/Lightroom 5 Catalog.lrcat": AgLibraryCollectionImageOzSortOrder.positionInCollection may not be NULL
      Statement:  INSERT OR REPLACE INTO AgLibraryCollectionImageOzSortOrder
      ( collectionImage, collection, positionInCollection, ozSortOrder )
      VALUES( ?, ?, ?, ? )
    Any suggestions?
    Thanks!
    Dan

    Some others have reported this on the official feedback forum:
    LIGHTROOM 5.5: Error when moving grouped images in Grid view.
    Lightroom CC Re-Sorting within a collection giving error message
    LightRoom 5.5 OSX 10.9.3: Custom sort within a collection gives an error (screenshot attached)
    Please add your opinion and votes to those threads.  The threads include some workarounds you might try.

  • Calendar List View Sort Order

    If I have two appointments set to the same time and length on the calendar, the sort order on the "month" view is sorted based on the title (this is great and what I am looking for). If I go to the "day" view or the "list" view the sort order appears to be random. I have tried to figure out what the sort order is for the list view and the day view but no luck.
    I am using a second calendar in Outlook for tasks and setting all items to the same time and length. I can then create a task list that syncs to the iphone. Just can't get the sorting figured out.

    Hi,
    I have the same issue since one week ago (iPhone 3GS, iOS 4.0.2).
    Only 2 calendars on my Exchange mailbox are synced. Items show correctly on the day and month view, but in list view (which I use most), some of them appear under a wrong date. Annoying !
    After restart and/or remove/add of calendars, list view takes a long time to 'load'. switching to day view and the back to list makes it appear (but unfortunately with the same problem).
    Greetz,
    Philip

  • PNP LDB Sort Order Customization

    Hi all,
    I need to add a custom field to the list of "Sort Order" fields available on PNP LDB Selection screen. Any idea how can we achieve this??

    Hi Markus,
    No, the Sort Order has not been removed in  PNPCE.. which report are you using? If it is tied to the Report Category PNPCE, the Sort Order icon is displayed 4th from the left on the tool bar.. You can alos use the CTRL + F1 keys option.
    Regards,
    Suresh Datti

  • N^2 log(n) for Collections.sort() on a linked list in place?

    So, I was looking over the Java API regarding Collections.sort() on linked lists, and it says it dumps linked lists into an array so that it can call merge sort. Because, otherwise, sorting a linked list in place would lead to a complexity of O(n^2 log n) ... can someone explain how this happens?

    corlettk wrote:
    uj,
    ... there are other sorting methods for linked lists with an O(N*N) complexity.Please, what are those algorithms? I'm guesing they're variants off insertion sort, coz an insertion is O(1) in a linked list [and expensive in array]... Am I warm?You don't have to change the structure of a linked list to sort it. You can use an ordinary Bubblesort. (The list is repeatedly scanned. In each scan adjacent elements are compared and if they're in wrong order they're swapped. When one scan of the list passes without any swaps the list is sorted). This is an O(N*N) algoritm.
    What I mean is it's possible to sort a list with O(N*N) complexity. It doesn't have to be O(N*N*logN) as the Java documentation kind of suggests. In fact I wouldn't be surprised if there were special O(N*logN) algoritms available also for lists but I don't know really. In any case Java uses none of them.

  • Custom Sort Order in Dropdown list of translate values

    Peoplesoft sorts the dropdown translate values in ascending order by default. I wanted to change the sort order. For example:
    The translate values in alphabetic order are:
    Andrea
    Baluch
    Others
    Shumi
    I want this "Others" as the last value. So the drop down should display like this:
    Andrea
    Baluch
    Shumi
    Others

    From a document I had created ...
    This odd behavior of PeopleTools however can be overridden by implementing a few lines of JavaScript and PeopleCode.
    The approach is quite simple and summarized briefly as below:
    1.     Concatenate the value-description pairs of the dropdown list into a single string separated by a pipe “|” as delimiter (in case other delimiter is used the script shown below in Step 4 has
    to be accordingly modified) in the sequence in which it should be displayed on the page.
    2.     While concatenating, make sure to place the value first and then the description, these being separated by the delimiter. Example: “01|”|”January”|”02|”February” …and so on.
    3.     Pass this string as a parameter to an HTML definition through a GetHtmlText function. This HTML definition in turn will a have a JavaScript logic to resolve this delimited string into
    meaningful value-description pairs and use them to override the intended dropdown list.
    Below are the steps in detail:
    Step 1:
    Find out the html element-id for the dropdown field from the html source-code of the PeopleSoft page from the browser. In HTML, the tag for a dropdown field is <select> </select>
    The element-id is set by the id attribute of the <select> tag. This id would be used in Step 5.
    Step 2:
    Add a field of type Long Character to any work record that you may be using on your page for buttons, hyperlinks, etc.
    Step 3:
    Add an HTML-Area to the page (preferably alongside the dropdown field which needs need to be sorted). In the properties of the HTML-Area, assign the Record-field used in Step 2 above.
    Step 4:
    Create a HTML definition from the app-designer and add the below JavaScript code to it and save the definition.
    <script>
    var j=0;
    var str=new String('%bind(:2)');
    ar1=str.split("|");
    var fld = document.getElementById("%bind(:1)");
    fld.options.length = 0;
    fld.options[fld.options.length] = new Option('', '');
    while (j<ar1.length)
              fld.options[fld.options.length] = new Option(ar1[j+1], ar1[j]);                      
                    j=j+2;
    </script>
    Step 5:
    Write peoplecode on an appropriate event to generate the concatenated string of value-descriptions delimited by a pipe “|”. A pseudocode for the same is shown below. Here the HTML id for the dropdown field and the value-description string are passed as parameters to the JavaScript shown in Step 4; and JavaScript thus created after substitution of the Bind values is assigned to the value of Record.Field used in Step 2 & 3. The location of the below peoplecode may vary depending on the when the dropdown list needs to be sorted.
    Local string &strDropdownValues;
    &strDropdownValues = "1|" | "January|" | "2|" | "February|" | "3|" | "March|" | "4|" | "April|" | "5|" | "May|" | "6|" | "June";
    <Record.Field>.Value = GetHTMLText(<HTML.DPS_DROPDOWN_HTML>, "<DROPDOWN_ID>", &strDropdownValues);

  • Sort order in list wrong: in CAML and in view

    Hello,
    When I order my list with document sets by ID, the order is wrong. It is wrong in the list and with caml.
    This is my view (I just set the sort on the ID column):
    The first 4 objects are created by the Client Object Model; the last 4 are created by a SharePoint webpart that I developped myself...
    My code for creating document sets in COM is something like this:
    ListItemCreationInformation newItemInfo = new ListItemCreationInformation
    UnderlyingObjectType = FileSystemObjectType.Folder,
    LeafName = _strLeafname // = date in format YYYYMMDDhhmmss
    ListItem newListItem = myList.AddItem(newItemInfo);
    newListItem["ContentTypeId"] = targetDocumentSetContentType.Id.ToString();
    newListItem["Title"] = title;
    newListItem.Update();
    clientContext.Load(myList);
    clientContext.ExecuteQuery();
    The code in the webpart is this:
    SPContentType docsetCt = myLst.ContentTypes[p.GetFromResourcefile("xxxxxxxxxxxxxx")];
    Hashtable properties = new Hashtable
    {"DocumentSetDescription", ""},
    {"Title", txtTitle.Text}
    SPFolder parentFolder = myLst.RootFolder;
    int newId = GetLastId(myLst) + 1;
    DocumentSet ds = DocumentSet.Create(parentFolder, newId.ToString(CultureInfo.InvariantCulture), docsetCt.Id, properties, true);
    ds.Item["Title"] = title
    ds.Item.Update();
    why is the sort order wrong?
    if i do this query in the U2U Caml builder, the order is also wrong
    <OrderBy><FieldRef Name='ID' Ascending='FALSE' /></OrderBy>
    if i order by "created", the order is also wrong....
    i don't get it....

    Document Sets are great tools for grouping multiple documents together. However, if every set has exactly one document, it would be better to just upload the file and not place it within a Document Set:
    Uploading documents using object model - http://msdn.microsoft.com/en-us/library/office/ms454491(v=office.14).aspx
    Uploading documents using web services -
    http://cecildt.blogspot.com/2010/10/upload-documents-to-sharepoint-2010.html
    If you have requirements to use Document Sets, keep in mind that this adds a layer of complexity beyond a simple Document Library. Behind the scenes, each Document Set is treated as a separate folder, and although can you query items within it, there might
    be extra steps for getting the sort order to ignore the folder structure. Can you try setting the Scope to be "Recursive" and also specify that you are looking only for files and not folders:
    <Eq><FieldRef Name='FSObjType'/><Value Type='Lookup'>1</Value></Eq></Where>
    Dimitri Ayrapetov (MCSE: SharePoint)

  • List of found events changes sort order when pasted from clipboard

    when I find a set of events in iCal, the list appears in the window at the bottom of the page in the correct sort order when sorted by date, title or type. When I then copy that list to the clipboard and paste it into another program (Pages, MacJournal, TextEdit) the sort order changes.
    I work mostly in English, but my macbookpro keyboard is German, so I assume the problem is with the language settings. I've tried changing the system preferences for language and sort order, and that changes the sort order, but it doesn't get it right.
    Anyone have any ideas?
    Thanks

    when I find a set of events in iCal, the list appears in the window at the bottom of the page in the correct sort order when sorted by date, title or type. When I then copy that list to the clipboard and paste it into another program (Pages, MacJournal, TextEdit) the sort order changes.
    I work mostly in English, but my macbookpro keyboard is German, so I assume the problem is with the language settings. I've tried changing the system preferences for language and sort order, and that changes the sort order, but it doesn't get it right.
    Anyone have any ideas?
    Thanks

  • In my opinion, the real solution is for Apple to offer us a choice of the photo sort order in ITunes. My preference would be filename, perhaps with options to choose the Date Taken attribute, file timestamp or date modified filestamp (EXIF date fields as

    I tryed to sort my pictures with buying Apps and following suggestion from apple, but without any success. In my opinion, the real solution is for Apple to offer us a choice of the photo sort order in ITunes. My preference would be filename, perhaps with options to choose the Date Taken attribute, file timestamp or date modified filestamp.

    Not a problem when using iPhoto on a Mac, which the transfer of photos is primarily based on - not manually managing photo storage as seems to be common with Windoze.
    The same should be available with a supported photo management app on a PC.
    http://support.apple.com/kb/HT4221

  • Update all views sort order in a list using powershell

    I have a column "Employee Name" in my Lists/Library of my sitecollection ,
    I need to update Sort order of all views of that  lists and library to be sort alphabetically by "Employee Name" .
    I have already some filters applied on these views.I dont want these to get effected.I want to change only the sort order to be based on "Employee Name" column.
    Any pointers on how to achieve this by Powershell will be helpful

    Hi,
    The following PowerShell script for your reference:
    $webURL = "http://siteurl";
    $listName = "ListName";
    $web = Get-SPWeb $webURL;
    $list = $web.Lists[$listName];
    $views= $list.Views;
    for ($i = 0; $i -lt $views.Count; $i++)
    $view=$views[$i];
    $view.Query = '<OrderBy><FieldRef Name="Employee_x0020_Name"/></OrderBy>';
    $view.Update();
    $list.Update();
    Best Regards
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • Sort order of file names in list windows

    Why is the sort order of file names in the File > Open File...
    list window other than in a normal Finder list window?
    Example:
    File > Open...:
    @@@2Know.pages
    @@@2KnowQ.pages
    @@@@@2Do.pages
    @@@@eBayAmaz.pages
    @@@@pws.pages
    @@@@Sold-DE.pages
    @@@@Sold-UK.pages
    Finder Window:
    @@@@@2Do.pages
    @@@@eBayAmaz.pages
    @@@@pws.pages
    @@@@Sold-DE.pages
    @@@@Sold-UK.pages
    @@@2Know.pages
    @@@2KnowQ.pages
    How could both lists be displayed equal?
    Thanks!

    Run this short script
    set theFolder to choose folder
    set theNames to list folder theFolder
    set texte to ""
    repeat with n in theNames
    --set n to n as text
    set texte to texte & n & return
    repeat with i from 1 to count of n
    set texte to texte & (ASCII number of character i of n) & " , "
    end repeat
    set texte to texte & return
    end repeat
    set p2d to path to desktop
    set rapport to "the characters.txt"
    tell application "Finder"
    if exists file rapport of p2d then delete file rapport of p2d
    set theRapport to (make new file at p2d with properties {name:rapport})
    end tell
    write texte to (theRapport as alias) starting at 1
    navigate to the folder whose list seems curious.
    You will get a file named "the characters.txt" on the desktop.
    It will show the code of every character embedded in fileNames.
    My guess is that there are some control characters which aren't treated the same by the open dialog and by the Finder.
    Here is an example:
    .DS_Store
    46 , 68 , 83 , 95 , 83 , 116 , 111 , 114 , 101 ,
    base Kbase - copie 1.cwk
    98 , 97 , 115 , 101 , 32 , 75 , 98 , 97 , 115 , 101 , 32 , 45 , 32 , 99 , 111 , 112 , 105 , 101 , 32 , 49 , 46 , 99 , 119 , 107 ,
    base Kbase - copie.cwk
    98 , 97 , 115 , 101 , 32 , 75 , 98 , 97 , 115 , 101 , 32 , 45 , 32 , 99 , 111 , 112 , 105 , 101 , 46 , 99 , 119 , 107 ,
    base Kbase.cwk
    98 , 97 , 115 , 101 , 32 , 75 , 98 , 97 , 115 , 101 , 46 , 99 , 119 , 107 ,
    exemple wKbase
    101 , 120 , 101 , 109 , 112 , 108 , 101 , 32 , 119 , 75 , 98 , 97 , 115 , 101 ,
    Icon
    73 , 99 , 111 , 110 , 13 ,
    safe
    115 , 97 , 102 , 101 ,
    scripts pour Kbase
    115 , 99 , 114 , 105 , 112 , 116 , 115 , 32 , 112 , 111 , 117 , 114 , 32 , 75 , 98 , 97 , 115 , 101 ,
     w_Kbase vers AW.scpt
    240 , 32 , 119 , 95 , 75 , 98 , 97 , 115 , 101 , 32 , 118 , 101 , 114 , 115 , 32 , 65 , 87 , 46 , 115 , 99 , 112 , 116 ,
    Yvan KOENIG (from FRANCE samedi 7 mars 2009 23:14:15)

  • Sort Order: Case insensitive... move NULL to end of list

    Hello All,
    I am trying to sort a set a values, and NULL is a possible value. In the report I am displaying the NULL as EMPTY (I cannot leave that as NULL). I was wondering if there is a way to display this 'EMPTY' value as the last element in the list.
    I tried to append various ASCII characters in front of it, but nothing seems to work. Even is if enclose it in parenthesis, is does alphabetical sort.
    Is there a work around ?
    Thanks for your time !

    Nemi, Deborah,
    According to SAP Note 1200528 - Web Intelligence does not utilize special characters when sorting, this 'issue' is by design and not by design.
    The following is a copy-paste from the note:
    Symptom
    When attempting to sort a Web Intelligence document on a particular column, special characters such as "-" or "." are not respected.  For example, add the following into a database and then create a Web Intelligence report.
    a-Austria
    a-Austrailia
    a-Belgium
    a B-Argentina
    a B-Brazil
    a B-Egypt
    When you sort this data in Web Intelligence it appears as:
    a-Austria
    a-Austrailia
    a B-Argentina
    a B-Brazil
    a B-Egypt
    a-Belgium
    Cause
    This behavior is by design. For Enterprise XI Release 2, the Lexicographical order of the International components of Unicode has been implemented. This order sorts with respect to the language set for a data source.  This means that if we modify the sort order for English, other languages that we support will also have changes in their sort order.  In this case we must do our best to respect all the languages that we support.
    For more information please go to http://icu.sourceforge.net/
    Resolution
    To work around this behavior, complete one of the following:
    Workaround 1:
    Create a formula on the field such as
    "=Replace([Col001];"-";" ")"
    This will replace the - with a space although for this example the sort will be in the same "wrong" order, it will look much nicer.
    - or-
    Workaround 2:
    Create a custom sort:
    1. Select the section cell or table cells you want to sort.
    2. Click the down arrow next to the Apply/Remove Sort button on the Report toolbar then select Custom... from the drop-down list.
    Best,
    Srinivas

  • Update a list item based sort order of created by column value

    HI
    using powershell script how to sort a list column before update a list  item.
    here i created a document library and uploaded some documents and update ProcessNo column based sort order of created column
    value.
    Add-PSSnapin Microsoft.SharePoint.PowerShell -EA SilentlyContinue
    $webURL = "http://tspmcwfe:91" $listName = "Courts"
    Get the SPWeb object and save it to a variable
    $web = Get-SPWeb $webURL
    $list = $web.Lists[$listName] 
    $items = $list.items
    Go through all items
    foreach($item in $items)
    $item["ProcessNo"] = 1
    $item.Update()
    $web.Dispose()

    Hi,
    According to your description, my understanding is that you want to sort the list items order before updating items using PowerShell.
    I suggest you can use the Sort-Object command to sort the list items.
    Here are some detailed articles for your reference:
    Better SharePoint Lists and List Items in PowerShell
    Sort-Object
    Thanks
    Best Regards
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • Sort order of Price Lists

    My customer has recently upgraded from 2007A PL 42 to 8.81 PL 7. Before upgrade all pricelists are
    displayed in item code sort order. After upgrade, the sort order seems almost random.
    Customer maintains 175 different pricelists (mainly supplier pricelists) Customer needs to look up an
    item price from a specific price list - goes to Inventory / Price lists / Price Lists, selects the required
    price list and double clicks on the row number which then displays itemcodes, item descriptions, base
    price and unit price.
    Before upgrade, the customer could immediately start typing the item code and quickly get the required
    price. Now they must resort the displayed list by item code first, then start typing the item code.
    Process that used to be quick now takes more time. Customer can't understand why something that
    was working well for them has been changed to make life difficult
    At first I thought that the lists were now being sorted by description but the order changes even when
    double clicking at the top of the description column.
    Customer would like an option as to how they want the list displayed or for it to go back to how it was.
    Customer's sales reps need to find prices quickly - can't understand why the sort order has changed

    Tom Peterson wrote:
    This did the trick for me, Harry. Thanks!
    I was surprised to see you can/must set this on a podcast-by-podcast basis, but it is hard to argue with having finer control. Oldest to newest seems like a slightly more logical default, but that may just be personal preference.
    Not to split off in a new direction, but if I then subscribe to a podcast in Podcasts app that I already subscribe to in iTunes, is it recommended I turn off syncing between iTunes and my iPhone for that podcast? Or will this question basically go away when iOS 6.0 is released?
    Do the Podcasts app and the Music/iPod app share podcast files? Or will they be duplicated on my iPhone?
    Tom
    The podcasts will duplicate themselves on your device. I turned off podcast syncing on my devices. But the weird thing is that when I sync, podcasts then copy themselves to my iTunes library. Either sync or don't, but don't copy to both.

  • Sort order switches when changing from List to Thumbnail View

    I can't seem to get the Thumbnail view to "lock" to the same sort order as the list view.  I arrange by file name (or ingest date, or reverse media duration, or any of the other sortable metadata fields) in list view, but then when I click to the thumbnail view, the order seems to arbitrariliy change to some sort of preset.  What's worse, it appears to be changing to something that's in a jumbled order. 
    This isn't a big deal if I only have 10 clips.  If I have 100, or 1,000 clips though, they have to be in a sortable order for the thumbnail view to be of any use.
    Thanks,
    Eli

    Hi,
    Thanks for your post. Our current design doesn't support keeping order between list view and icon view. It would be good if you can drop that as a feature request / bug into the the forum.

Maybe you are looking for