Custom Sort via the XSL and custom template?

I am trying to add a sort order to a CQWP. I would like a template style that does the sorting? I have to sort by a field called SortOrder, then I want it to be by file name - here is the code:
I am thinking to do a foreach but not able to get it working? Is there another easier way?
<!--Start Custom Policy Sort-->
    <xsl:template name="PolicySortedBullets" match="Row[@Style='PolicySortedBullets']" mode="itemstyle">
        <xsl:variable name="SafeLinkUrl">
            <xsl:call-template name="OuterTemplate.GetSafeLink">
                <xsl:with-param name="UrlColumnName" select="'LinkUrl'"/>
            </xsl:call-template>
        </xsl:variable>
        <xsl:variable name="DisplayTitle">
            <xsl:call-template name="OuterTemplate.GetTitle">
                <xsl:with-param name="Title" select="@Title"/>
                <xsl:with-param name="UrlColumnName" select="'LinkUrl'"/>
            </xsl:call-template>
        </xsl:variable>
        <div class="item link-item bullet">
            <xsl:call-template name="OuterTemplate.CallPresenceStatusIconTemplate"/>
   <a href="{$SafeLinkUrl}" title="{@LinkToolTip}" target="_blank">
              <xsl:if test="$ItemsHaveStreams = 'True'">
                <xsl:attribute name="onclick">
                  <xsl:value-of select="@OnClickForWebRendering"/>
                </xsl:attribute>
              </xsl:if>
              <xsl:if test="$ItemsHaveStreams != 'True' and @OpenInNewWindow = 'True'">
                <xsl:attribute name="onclick">
                  <xsl:value-of disable-output-escaping="yes" select="$OnClickTargetAttribute"/>
                </xsl:attribute>
              </xsl:if>
              <xsl:value-of select="$DisplayTitle"/>
            </a>
        </div>
    </xsl:template>
<!--End Custom Policy Sort-->

http://stackoverflow.com/questions/5415383/xslt-sortingboth-ascending-and-descending
http://sharepoint.stackexchange.com/questions/81167/content-query-web-part-group-by-sort
You can use the XSLT <xsl:sort> element to customize your sort order.
https://sites.google.com/site/icsharepoint2010/xslt/sorting-in-xslt
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="text"/>
<xsl:template match="employees">
<xsl:apply-templates>
<xsl:sort select="salary"/>
</xsl:apply-templates>
</xsl:template>
<xsl:template match="employee">
Last: <xsl:apply-templates select="last"/>
First: <xsl:apply-templates select="first"/>
Salary: <xsl:apply-templates select="salary"/>
Hire Date: <xsl:apply-templates select="@hireDate"/>
<xsl:text>
</xsl:text>
</xsl:template>
</xsl:stylesheet>

Similar Messages

  • Profit Center population in the Vendor and Customer Line items

    hello
    our client is asking for  getting profit center in the vendor and customer line items  where in the view FBL5n and fbl1n we are not getting the profit center populated - in the new gl i understand that there is a standard report based on the gl account.
    but our business is not satisfied with the report and expecting report at profit center level.
    Can any one suggest any way of doing this.
    regards,
    Vijay

    Dear Vijay,
    Let me provide you my view of solutioning for this. This is an enahcement that needs to be done
    1. You can get the profit center from the given vendor and customer line item at the time of posting, using an enahcement you will be able to capture it.
    2. Existing the profit center field is not populated in the BSIK,BSAK,BSID and BSAD tables
    3. Hence, in the same enhancement once you capture the profit center , you can write the code that profit center is updated in these tables also.
    4. This will help you to do the vendor line item wise selection in the FBL1N,  FBL5N profit center wise.
    Constraints of this solution:
    The only constraint remains where in the for a given document if there are multiple profit center, then the system will do the splitting profit center wise for a vendor line item, which will not populate the profit center in those tables as there is only one field available in the bsid etc.. tables.
    This basically would be the one the soltuion where in as seeen from the end user ther eis no change in the front end interface , the way they are doing always they can do.
    You need to also take care the % of document splitting means cross profit center postings /cross document splitting charactericstics postings and the volume involved in this. so that you can suggest this to your client.
    Regards,
    Bharathi.

  • I am using Numbers app for the ipad and it has been working absolutely fine but now, when I want to email a spreadsheet as a PDF via the 'share and print' option, the file now doesn't appear as an attachment to the recipient. Any ideas please?

    I am using Numbers app for the ipad and it has been working absolutely fine but now, when I want to email a spreadsheet as a PDF via the 'share and print' option, the file now doesn't appear as an attachment to the recipient. Any ideas please?

    Hi mafiose15,
    Thanks for visiting Apple Support Communities.
    Restoring your iPod to factory settings is the best way to try and get it back to working order. You can use the instructions below to restore it:
    How to restore iPod
    Verify that you have an active Internet connection, because you may need to download new versions of the iTunes and iPod Software.
    Download and install the latest version of iTunes if necessary.
    Open iTunes. Connect your iPod to your computer using the USB or FireWire cable that came with your iPod.
    After a few moments, your iPod will appear in the Source panel in iTunes.
    Select your iPod in the Source panel. You will see information about your iPod appear in the Summary tab of the main iTunes window.
    Click Restore.
    If you are using a Mac, you will be asked to enter an administrator’s name and password.
    A progress bar will appear on the computer screen, indicating that stage one of the restore process has begun. When this stage is done, iTunes will present one of two messages with instructions specific to the iPod model you are restoring.
    Disconnect iPod and connect it to iPod Power Adapter (typically applies to older iPod models).
    Leave iPod connected to computer to complete restore (typically applies newer iPod models).
    During stage two of the restore process, the iPod displays an Apple logo as well as a progress bar at the bottom of the display. It is critical that the iPod remain connected to the computer or iPod power adapter during this stage.
    Note: The progress bar may be difficult to see, because the backlight on the iPod display may be off.
    After stage two of the restore process is complete, the iTunes Setup Assistant window will appear. It will ask you to name your iPod and choose your syncing preferences, as it did when you connected your iPod for the first time.
    You can find the instructions in this article:
    Restoring iPod to factory settings
    http://support.apple.com/kb/ht1339
    All the best,
    Jeremy

  • I tried updating my Photoshop CS6 via the cloud and received the following message...Update failed Errors encountered during installation.(U44M1P7).  What does that mean

    I tried updating my Photoshop CS6 via the cloud and received the following message...Update failed Errors encountered during installation.(U44M1P7).  What does that mean

    http://helpx.adobe.com/creative-suite/kb/error-u44m1p7-installing-updates-ccm.html

  • Can i use the visualiser on my ipad 2 to watch on apple tv via the pad and if so how?

    can i use the visualiser on itunes to listen and watch on my apple tv via the pad and if so how?

    Hi Meg
    i use the photon app to access live training i have been asked to do some training and need to know if i can use the camera on my ipad 2 as a web cam  and also how can i set up a microphone within the app
    i cant  seem to find an external device for ipad nor  can i get the photon app to regognise the camera or microphone on my  ipad2
    is there a way to do this please

  • My computer is all out of sort with the color and it is in like a negitative effect that i cannot seem to fix. How do i fix it?

    my computer is all out of sort with the color and it is in like a negitative effect that i cannot seem to fix. How do i fix it?

    Try System Preferences>Universal Access>Seeing>Display.  See if White on Black' has been selected.
    If so, select 'Black on White'.
    Ciao.
    Message was edited by: OGELTHORPE

  • FIOS CUSTOMER SERVICE IS THE WORST AND I AM NOT INSTALLED YET FOR NEW SERVICE!!

    So on May 20th I signed up for the triple play service for 59.99 with 2 year agreement with 4 tvs being installed with equipment, home phone service and internet/wifi. On May 25th I realized that I needed to change 3 of the boxes on my order to different ones so I called the 1800 verizon number and spoke with a woman agent who said she was able to make the changes and also wanted to verify on my order that I am getting everything that I am entitled to as a new customer to Fios so I told her okay. Never did this incompetent woman tell me that she was changing my ENTIRE ORDER. At the end of the call she said she made the changes to the equipment and gave me a confirmation number for the change.
    Today May 26th memorial day, I receive an email from Verizon confirming the changes that they said I made to my ENTIRE PLAN AT 2:46PM. She cancelled out my original order I placed online and switched it to another plan that was much higher at 79.99 with additional services I did not request and the EQUIPMENT WAS NEVER CHANGE, the whole reason for my call. After reading the email and going back to the original email I received after placing my order on May 20th I called Verizon customer service. The woman I spoke to, again incompetent and unsympathetic to the situation  couldn't tell me why my order was change. She couldn't tell me anything and was silent the most of the **bleep** time. (Don't these people work for the same company, she should have been able to see exactly what went on in her system.)
    When she did speak she said she was reviewing what was different from the last order. I said there is only ONE order that I placed and the only changes that I wanted was for the equipment. She didn't say anything after that. So after almost 10 minutes of silence, I said well at this point are you able to make the necessary changes to change me back to the original plan I signed up for with the correct equipment I needed. She told me NO, plain out.
    Are you kidding me! I never authorize the change of my package, only to the equipment and your telling me you can't do nothing about it. The woman showed no type of empathy for the situation, nor apologize on behalf of Verizon and the lady who screwed up my family order. It was like she didn't care and then said If I want to cancel the order she couldn't do that and that I would have to call back tomorrow May 27th and do so. (Shouldn't a customer service agent do whatever they could to KEEP YOU as a customer and not send you to cancel the order...big problem)  I haven't been with verizon for many many years and thought I should give you people a try. The way this initial contact with this company has been has truly set the tone of how these people/company will treat me and my family for the next 2 years. This transaction has not been smooth and not somehting that I would rave about to my friends/co workers/community, I will tell them to NOT choose this company. I see now that Verizon customer service agents will add what ever they want to your account that you didn't authorize, tell you lies and not correct anything that they are at fault of.

    Your issue has been escalated to a Verizon agent. Before the agent can begin assisting you, they will need to collect further information from you.Please go to your profile page for the forum, and look in the middle, right at the top where you will find an area titled "My Support Cases". You can reach your profile page by clicking on your name beside your post, or at the top left of this page underneath the title of the board.
    Under “My Support Cases” you will find a link to the private board where you and the agent may exchange information. This should be checked on a frequent basis as the agent may be waiting for information from you before they can proceed with any actions. To ensure you know when they have responded to you, at the top of your support case there is a drop down menu for support case options. Open that and choose "subscribe".
    Please keep all correspondence regarding your issue in the private support portal.

  • What is the scope of Live Customer Support in the Software and IT Industry?

    The Software and IT Industry is growing at a pace of 9.0% per year, with employment at Software consultancy and service firms projected to grow making it the second best industry to start and grow a business. With this pace of growth in the ruthless world of online business, only companies which succeed in creating their own niche will survive and make it big.
    Surviving this kind of competition demands a change in business strategy to create a loyal customer base, i.e. a solid investment in repeat visitors. One tool that can bring about this change in business strategy is the use of Live Chat.
    A Live Chat Operator’s role is a Software and IT Company website can be from navigation help and customer service to expert consultancy and making direct sales. Behind all of these roles though, is the constant element of the human touch on a website. Chat with a Live Operator can create an experience for web visitors which will make them come back. This creation of repeat web visitors will create a loyal customer base. This industry particularly relies on customer loyalty, since in the computers and electronics category repeat visitors are nearly 16 times more likely to make a purchase than new visitors with conversion rates of 23.12 percent and 1.49 percent respectively.
    Apart from creating repeat visitors on Software Company’s website, Live Chat Operators can do the following:
    1.     Win loyalty by providing top level service on your online store
    2.     Provide real-time answers about models, year and price of the electronics or computers that visitors are looking for.
    3.     Show items; push pages and take visitors directly to the model/price range they are looking into.
    4.     Use three dimensional images to show products.
    5.     Generate leads.
    6.     Provide consultancy on items keeping in view customer needs and price range
    7.     Update visitors on Promotional Offers,
    8.     8. Improve Multitasking in Customer Service and Sales Staff.
    Live Chat is a medium which takes online customer service to an unparalleled level; the days of static web information and the email black hole are long gone.
    Source:
    http://www.liveadmins.com

    Hi Dkdinesh,
    Excelent links provide by M.R.AshwinPrabhu!
    In 2014, Microsoft will release BizTalk Server 2013 R2 (release date will be soon) and also will keep investing and improving Microsoft Azure BizTalk Services-
    Microsoft goal in terms of Release Cadence of BizTalk Server is to have one major release every alternate year (the last one was BizTalk Server 2013, so you may expect a new major release in 2015) and one minor release every alternate year (that will be
    designated R2, so the next on is BizTalk Server 2013 R2). The major release will have new features and themes and minor releases will have bug fixes, platform alignment and customer asks.
    Sandro Pereira
    DevScope | MVP & MCTS BizTalk Server 2010
    http://sandroaspbiztalkblog.wordpress.com/ |
    @sandro_asp
    Oporto BizTalk Innovation Day | 14th March 2013 – Oporto, Portugal
    Please mark as answered if this answers your question.

  • How can i clear the vendor and customer open line items at a time same vendor as a customer of the company (same vendor same customer and equal invoices )

    my vendor and customer are same . purchase invoice due100000 and sales invoice amount is also 100000 at a time with any manual action , have any setting for cleared both vendor and customer line items at a time ...........

    X Ltd. will be Vendor & Customer.
    Purchase Invoice is booked under Vendor SAP number & Sales Invoice is booked under Customer SAP number. Then you can transfer amount from Vendor to Customer or vice versa with T-code F-04.
    Then if you have transferred amount from customer to Vendor (F-04), Vendor account will have two entries Debit & Credit. Then go for clearance with T-code F-44 clear Vendor.

  • For 3 years my iMac and miniMac both communicated with a Canon printer and the internet using an Airport Extreme.  Last winter, the miniMac lost printing via the Airpor and now can't communicate with the network at all.

    For three years my iMac and Mac mini were networked via Airport Extreme with a printer and the internet.  More recently, I added an iMac and iPhone.   PROBLEMS:  A few months ago the Mac mini lost its connection to  the printer, and now it cannot locate the network at all. 

    If you use the extreme as a router then the tc should be connected via its wan port to one of the lan ports on the extreme. Tc should be set up in bridge mode. Basically you could set it up to create another wireless network beside the one created by the extreme. There is no need to use WDS or extend the other network.
    Use the same SSID and password for both machines. Computers will connect to the strongest signal.

  • If I upgraded my MacBook Pro from Snow Leopard to Lion via the web and now wish to erase the hard drive and restore it to factory settings to sell.  How do I accomplish this?

    I upgraded the operating system on my MacBook Pro from Snow Leopard to Lion via the web.  Now I need to erase the hard drive and restore it to factory settings, so that I can pass it on.  How do I accomplish this?  When I insert the Mac OS X install disk, the only option is to erase the free space.  Any insight would be appreciated.
    Thank you

    You need to boot off the original Snow Leopard DVD's that came with the system.
    Once you are running off of the DVD you will be able to do a clean install of SL
    To boot off the DVD with the system up running Lion insert the DVD. Open Sytem Preferences->Startup Disk and select the DVD then restart the machine.
    Message was edited by: Frank Caggiano

  • I want my pictures and videos to be sorted by the time and date they were taken.   I have Lilghtroom sorting by the creation date, but the videos are sorting separately from the pictures even when the creation dates indicate they are out of order.

    I have set the sort order to be by the creation date of the pictures and media I have in the catalog.  But the pictures appear first, in chronological order, then some of the videos follow, in their chronological order, but the videos and pictures don't mix amongst each other in straight chronological order.  How can I fix this?

    I think it’s only possible to see raw and jpeg stills side by side e.g. in true chronological order after setting LR prefs. Your video files will automatically show up in the Video smart collection. So you can view them in one place regardless of which folders they are stored in. Otherwise move your images and videos into a new collection and drag them into the order you want, where they will remain fixed. Or use the library filter to define a date range.

  • How to delete the queries and WAD templates from the SAP BI

    HI,
         We had a task to delete the list of quires and WAD templates from the SAP BI landscape(development,quality and production servers)
    Please suggest the process to follow for removing the quires from the SAP BI landscape.

    Hi Venkata,
    I assume that the DEV-QA -PRD are in Sync with each other.
    When you are deleting a query from the DEV,it should ask for a NEW transport request.IF not it means it is collected in some other request ,may be in NA or in Junk request.So see to it that it is FIRST saved in your request and then using RSZDELETE T .Code you can delete it.When you transport the request to QA or to PRD ,the query automatically gets deleted from that landscape.
    Let me know if there are any issues.
    Rgds
    SVU123

  • Word 2010 hangs when adding a contact via the Envelopes and Labels dialog box

    I am having the following issue on all PC in our network.
    Open Outlook.
    Open Word 2010.
    Click the Mailings tab.
    Click Envelopes.
    Click the Address Book button.
    From the Address Book drop-down select the Contacts folder.
    Right click in the list & select New Entry.
    Select New Contact & click OK.
    Fill in the basic info: name, email, phone numbers, address.
    Click Save & Close.
    At that point the contact form closes. It looks like the address book list is trying to come back but that is where it hangs. At that point the only option is to force Word to close. However, the new contact is created in Outlook.
    I can reproduce this with Word/Outlook 2010 RTM & SP1.
    Has anyone else ran into this before?
    Patrick Hoban
    http://patrickhoban.wordpress.com

    Hi
    Thank you for using
    Microsoft Office for IT Professionals Forums.
    Ÿ  
    Rename the global template (Normal.dotm)
    Follow the steps for the operating system that you are using:
    Windows 7
    Exit Word 2010
    Click
    Start.
    In the
    Start Search box, type the following text, and then press
    ENTER:
    %userprofile%\appdata\roaming\microsoft\templates
    Right-click
    Normal.dotm, and then click Rename.
    Type
    Oldword.old, and then press ENTER.
    Close Windows Explorer.
    Start Word 2010, and then open the document.
    Reset Word registry
    key and disable Add-in you can refer to this KB article:
    “How to troubleshoot problems that occur when you start or use Word 2010, Word 2007, Word 2003, or Word 2002”
    http://support.microsoft.com/kb/921541
    Please take your time to try the suggestions and let me know the results at your earliest convenience. If anything is unclear or if there is anything I can do for you, please
    feel free to let me know.
    Best Regards, 
    William Zhou
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]

  • Is there a way to view video via the display AND TV out at the same time?

    Is there a way to display the video output for supported apps on the display as well as through the TV out at the same time? To explain my setup briefly, I'd like to have the front seat passenger in my vehicle be able to hold the iPad and watch video while the A/V cable runs through the car system and displays on the ceiling mounted TV for the back passengers.
    As of right now, it seems as though it will only allow for one display at a time, and in this case, only showing video through the TV out. I don't know if the iPad has the processing power to mirror outputs to the display and the TV out at the same time, though I imagine that it should.
    So, does anyone have any ideas on how to make this possible, if it's possible at all?
    Thanks in advance.

    If you'd emailed Steve Jobs with this question, here is what his response would have been had he blessed you with a reply:
    No.

Maybe you are looking for

  • Dvi to hdmi with sound support

    I was looking for a way to watch movies from my MBP (mid-2011 13") on a HD LCD TV, and I found an HDMI port in the back of the TV. I went to the Apple store and picked up a Kanex "Mini DisplayPort to HDMI Cable (with sound support)." The picture look

  • Start daemons with screen: rtorrent, irssi

    Hello, community! I run a headless server and, as of now, it boots with rtorrent as a daemon, using screen, like so: #!/bin/bash # file: /etc/rc.d/rtorrentd USER=myusername . /etc/rc.conf . /etc/rc.d/functions case "$1" in start) stat_busy "Starting

  • Deduct TDS amount in invoice amount with conditions ?

    Hi Experts, My client had a requirement that, the business partners deduct TDS in two conditions: 1  Deduct TDS if the single invoice amount is more than 20000 and 2  Deduct TDS total invoice amount is more than 50000. how can we configure the situat

  • CL_GUI_CHART_ENGINE Graph As Email in Background

    Hi All, I am using CL_GUI_CHART_ENGINE class to display multiple graphs  with custom container using splitter method ,when i am running it in foreground everything is fine i can print/save  graphs seperatly. If i use docking container to display CL_G

  • Can I Print hyper links in my e-mails?

    HP e-Print is great if i receive an e-mail with an attachment that i want to print.. but what if the sender simply puts a hyper link (to the content under discussion) in the body of the e-mail.  It would be great if in setting up my account i could s