Getting Value Based on Descending value of the count

Hi,
I have values in the list as below
Title,Count
title1,3
title2,5
title3,4
Now i need to fetch the title column value based on descending order of the count column value.
But writing spquery as below but not getting the exact value
"<OrderBy><FieldRef Name='Count' Ascending='FALSE' /></OrderBy>";
Please let me know if i am making any mistake here.
Regards,
Sudheer
Thanks & Regards, Sudheer

Hi,
In addition to Hemendra, there is OOB option to order items in descending order per one column value.
You could create a view for this list, and configure in Sort section.
Regards,
Rebecca Tu
TechNet Community Support

Similar Messages

  • Getting Array value based on another value

    Hi
    Im pretty new to Powershell, havnt tried to code in almost 15 years so Im a Little rusty to say the least. Im trying to make a script where I import a csv file into an array and then use foreach on one value to output another value. An example of the csv
    file could be the following.
    Client,Email,EmailAddresse
    Company1,No,[email protected]
    Company2,Yes,[email protected]
    Company3,Yes,[email protected]
    I have tried the code below to import the csv file into an array and then output the email address where email was set to "Yes"
    $clientlist = Import-Csv E:\Script\Clients.csv
    foreach ($client in $clientlist | where {$_.Email -eq "Yes"})
         Write-host $clientlist.emailaddresse
     When I execute the code I get the following output:
    [email protected] [email protected] [email protected]
    [email protected] [email protected] [email protected]
    What I would like to get is just the one email address in each line, matching the email address from the csv where the value "email" was set to "Yes". What am I doing wrong?
    Thank in advance
    Anders Lausen

    You could just filter using Where-Object without the need for the ForEach.
    Import-Csv E:\Script\Clients.csv | Where {
    $_.Email -eq 'Yes'
    } | Select EmailAddress
    Boe Prox
    Blog |
    Twitter
    PoshWSUS |
    PoshPAIG | PoshChat |
    PoshEventUI
    PowerShell Deep Dives Book

  • How to populate table of values based on selected value of dropdown list

    Hi
    I have an urgent requirement.
    Whenever I select a value in Dropdownlist, Based on the selected value I need to display serveral values in tabular form.
    I have created a dynamic LOV and created the actionListener
    I have created a table by dragging the ViewObject and i have set the partialTrigger attribute value to the LOV Id.
    Now My doubt is What should I return in the actionListener method
    Thanks

    Hi,
    So get the value what i tried is ,bind the list item of the select one choice ,
    and then i used the method something like this
    UISelectItems see=getSelectItems1();
    System.out.println("Selected Value"+ see.getValue());
    but it returns me something like this
    Selected Value[javax.faces.model.SelectItem@b20090, javax.faces.model.SelectItem@431753]
    Don't know what are those ,hoe can i get the display value.Please help.
    Thanks

  • How to select a different value based on $FLEX$ Value set

    Hi friends,
    am getting a column like position from positions_table....
    now based on this value set am selecting another column from the same table like for ex amount...using $FLEX$.vlaueset_name
    now if the value in the table is 0 or null I should make the field available for the user to enter something
    as of now it is not letting me enter any data as this value is based on the first value set we defined..
    is there a way to do that..
    hope am clear in specifying my requirement
    thanks

    Hi Balraj
    I want to select one list item value from yyy based on the xxx item value..Pls use the following andreas's link ( it's about it)
    http://andreas.weiden.orcl.over-blog.de/article-28957008.html
    pls study it carefully and develop.
    Hope it helps...
    Regards,
    Abdetu...

  • Query on DSO, KF value +/- based on flag value in DSO

    Hi Experts,
    I have a query on DSO and it is running fine.
    Current Query output :
    CHAR1 | CHAR2 | KF1
    1111       S            100
    1111       H            100
    I want to put + or - sign for KF based on value of CHAR 2 (Flag) in query output.
    So
    Desired Query output :
    CHAR1 | CHAR2 | KF1
    1111       S            -100
    1111       H             100
    I can Add CHAR3 in DSO and based on CHAR2 value CHAR3 will store +1 or -1. Add it can be used to get + or -Value of KF using CKF.
    But without doing it (CHAR3), can I do it directly at query level ?
    Regards,
    Vinod

    Try this:
    RKF1: KF restricted on S
    RKF2: KF restricted on H
    CKF: (-1)*RKF1 + RKF2
    This should give you what you are looking for.
    Regards,
    Gaurav

  • Flagging a variant by a feild value based on char,value.

    Hello SAP Gurus,
    I have a requirement in which I have to flag a variant based on characteristic values.
    During configuration, when you happen to select certain characteristic values in  a character, the material should flag with a character material master field, which changes the way the material is handled.
    Any feed backs...
    I am thinking of creating another character with the material master field and establishing an "object dependency" between characteristic values and character....
    Is this correct?
    Thanks
    Eshlok

    It seems that don't understand that you aren't asking to Apple employees but to end users like you.
    May you take time to download iWork Formulas and Functions User Guide (thru the Help menu) ?
    I will not spend time describing Nummbers functions one after an other one !
    I am unable to guess what you tried to achieve with your formula..
    To calculate 33% of the content of c6, use the formula
    =ROUNDUP(C6*.33,0)
    or
    =ROUNDUP(C6/3,0)
    Yvan KOENIG (VALLAURIS, France) lundi 27 juin 2011 18:14:03 iMac 21”5, i7, 2.8 GHz, 4 Gbytes, 1 Tbytes, mac OS X 10.6.8
    Please : Search for questions similar to your own before submitting them to the community
    To be the AW6 successor, iWork MUST integrate a TRUE DB, not a list organizer !

  • Get element based on attribute value

    Hi,
    I need to locate an element based on its unique
    attribute value. There are lots of elements in the
    hierarchy, I only show relavant ones here.
    code:
    <myElement myAttribute="attValue">
    <childElement>child value</childElement>
    </myElement>
    If "attValue" is unique for all elements, and I want to
    locate myElement and then get childElement value.
    I did the following, but it does not work:
    <xsl:value-of select="//*[myAttribute='attValue']/childElement"/>
    Could any one see what I did wrong?
    regards,

    Thanks for spotting the error. I was too careless.
    What if I want to use a xsl:variable to do the testing, can I do the following:
    <xsl:variable name="uniqueAttValue" <xsl:value-of select="..."/></xsl:variable>
    <xsl:value-of select="//*[@myAttribute={$uniqueAttValue}]/childElement"/>
    I used either {$uniqueAttValue} or '{$uniqueAttValue}', but neither works.

  • Restrict variable values based on another variable in the bex query...

    I am struggling to restrict the variable values from other varaible in the selection criteria. I have a variable which restricts he organisation(0ORGUNIT) and another to restrict employees.
    When the user selects any organisation unit form the hierarchy, I want only those employees related to that organsation in the varaible selection options.
    Is there any way I can make a variable values dependant on the another variable value in variable selection screen?
    Thanks,
    Your help in this matter will be much appreciated.
    Edited by: Kthapa on Nov 25, 2010 11:08 PM

    Hi Kthapa,
    Did u try using cmod?
    i_step = 1? Used to provide default values for the selection screen variables and
    i_step = 2 for filling up the variables after selection screen.
    Try using based on ur requirement.
    Hope this helps. Revert back for any queries.

  • Display a value based on Text value selected in the dropdown list

    I am newbie in creating PDF forms.. I recently created a form patterned with Purchase Order Form sample that came along with the LiveCycle installation.. I can say I am doing good as I was able to create a functioning form with hours of triasl and errors.  Now, I got stucked with my table calculations.. The first column is a dropdownlist with refreshment Items, the 2nd is the quantity column, 3rd is the unit price column and last is the amount column.  After so many days and hours of trying to make the unit price display automatically after you select an item.  I am not an expert in scripts or in PDFs for that matter.. Can somone please help me with my problem.. My dropdownlist is populated by script but by the object pallete in LiveCycle.

    Hi thanks for the reply... I practically copied the script from the form you made, I removed the other array... But I can't make it work, been working on it since you replied on this thread.  Please check my script below and find out what or where is the error.
    RefreshmentOrderform.RefreshmentOrder.Header.#variables[0].Myitems - (JavaScript, client)
    var Itemdesc = new Array(
    "Apple",
    "Grapes",
    "Banana",
    "Melon",
    "Grapefruit"); //5
    var MyUnitPrices = new Array(
    "1.90",
    "8.95",
    "1.00",
    "3.90",
    "2.90"); //5
    function PN_Populate(dropdownField)
    for (var i=0; i < Itemdesc.length; i++)
              dropdownField.addItem(Itemdesc[i]);
    function PN_ReadOut(Item_Alias, Price_Alias)
    for (var i = 0; i < Itemdesc.length; i++)
              if (Itemdesc[i] == Item_Alias)
            Price_Alias.rawValue = MyUnitPrices[i];
                  break;

  • Select value based on a value in a 2nd column (similar to vlookup)

    Hello all,
    Is there an alternative to VLOOKUP function in BI 11g?
    Or what else I can use to return value of 3rd column based on the value in 2nd column?
    Dept Min_Expense Description of Expense
    Acct 1000 'COGS'
    Thank you.

    Hi,
    Yes this is possible by dynamic user assignment.
    Define an output parameter for CO1 and CO2 and an input parameter for the CO under action F of type string. In design time select the processor of action F as "Filled from Context Parameter" in the Roles tab and select the input parameter you have defined as mentioned in the previous step. Now group the output parameter of the CO1 and CO2 and the input parameter of action F together.
    Now at runtime fill the context parameter from CO1 and CO2 with the actual user name. The action F will get automatically assigned to that user.
    Thanks,
    Dipankar

  • Dynamic variable value based on a value from xml

    I have a invoice template and it is for 4 different companies in my organization. Based on the organization I need to have a different value for a variable that adds blank lines to the end of the invoice. Is there anyway to assign a value to variable based on the value of a xml tag.
    Thanks

    I should have explained better before. I have one invoice template and we want to keep it one template for all companies. Each invoice is run individually, each companies footer is different, I am calling multiple headers and footers based on each company. Since the headers and footers are different I need to be able to add different amounts of lines and the end of each invoice depending on that company. I have accounted for the page break in my logic based on the amount lines the page is long. I just need a dynamic variable that I can assign different values on the fly.
    Thanks

  • How to get data based on selection screen on the output

    Hi Expert,
    Can any one tell me based on material number on slection screen correspondind field i.e on selection scren
    WERKS,MTART,EKGRP,DISPO,BESKZ,MATNR should also get. i.e if i give mtart on selection screen corresponding to material number mtart shoul get.
    NOTE: I HAVE WRITTEN SELECT QUERY FOR TWO TABLES I.E MARA,MBEW.
    Below is my code
    TABLES:MARA,MARC,MARD.
    TYPES: BEGIN OF ty_mbew,
          matnr TYPE matnr,
          bwkey TYPE werks_d,
          lbkum TYPE lbkum,
          END OF ty_mbew.
    TYPES: BEGIN OF ty_close_stk,
           mandt TYPE mandt,
           matnr TYPE matnr,
           cdate TYPE zwkdate,
           bwkey TYPE werks_d,
           meins TYPE meins,
           zlbkum TYPE lbkum,
           WERKS  TYPE WERKS,      "
           MTART  TYPE MTART,
           EKGRP  TYPE EKGRP,
           DISPO TYPE  DISPO,
           BESKZ TYPE BESKZ,      
           salk3 TYPE salk3,
           END OF ty_close_stk.
    TYPES: BEGIN OF ty_mbewh,      
           matnr type matnr,
           bwkey type bwkey,
           lbkum type lbkum,
           lfmon type lfmon,
           end of ty_mbewh.        
    TYPES: begin of wa_matnr,
                matnr type matnr,
           end of wa_matnr.
    dATA : it_matnr type standard table of wa_matnr.
    DATA : it_close_stk_del TYPE STANDARD TABLE OF zclose_stock WITH HEADER LINE.
    DATA : it_close_stk TYPE STANDARD TABLE OF ty_close_stk,
           it_mbew TYPE STANDARD TABLE OF ty_mbew,
           wa_close_stk TYPE ty_close_stk,
           wa_mbew TYPE ty_mbew,
           it_mbewh TYPE STANDARD TABLE OF ty_mbewh,            "89286
           wa_mbewh TYPE ty_mbewh.                              "89286
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE TEXT-001.
    89286*********************
    SELECT-OPTIONS: WERKS FOR MARD-WERKS,    "Plant
                    MTART FOR MARA-MTART,    "Material type
                    EKGRP FOR MARC-EKGRP,    "Purchasing group
                    DISPO FOR MARC-DISPO,    "MRP Controller
                    BESKZ FOR MARC-BESKZ,    "Procurement type
                    s_MATNR FOR MARA-MATNR.  "Material number
    ************89286***************
    SELECTION-SCREEN END OF BLOCK b1.
    SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE TEXT-002.
    select MATNR INTO CORRESPONDING FIELDS OF TABLE IT_MATNR
           FROM MARA
           WHERE MATNR IN S_MATNR.
    SELECT matnr
             bwkey
             lbkum
             salk3            "MSK25072011
             FROM mbew INTO CORRESPONDING FIELDS OF TABLE it_mbew
            WHERE lfgja = fis_year
              where matnr  in s_matnr
               and  bwkey in werks.

    Hi
    Perhaps I don't understand yet, but you have several select-options in your selection-screen, every select-options can be assigned to different tables (MARA, MARC, MBEW), so you need to decide if to use a JOIN o single SELECTION in order to get all data in one step or many steps.
    IF you need to do several selections, these have to be linked in order to get the data for the records selected in the previous selection, something like that:
    SELECT matnr mtart INTO TABLE t_mara
        FROM mara
          WHERE matnr IN s_matnr
            AND mtart IN s_mtart.
      IF sy-subrc = 0.
        SELECT matnr werks ekgrp INTO TABLE t_marc
          FROM marc
            FOR ALL ENTRIES IN t_mara
              WHERE natnr = t_mara-matnr
                AND ekgrp IN s_ekgrp.
        IF sy-subrc = 0.
          SELECT matnr bwkey lbkum salk3 INTO TABLE t_mbew
            FROM mbew
              FOR ALL ENTRIES IN t_marc
                WHERE matnr = t_marc-matnr
                  AND bwkey = t_marc-werks.
        ENDIF.
      ENDIF.
    But you can use an single join with all tables
    Max

  • Populate a another value based on input value using abap webdynpro

    Dear All,
    I am new to WDA.I have a requirement to calculate priciple amount based on the user requested amount.Here requested amount is input field and principle amount is defined as text view.
    Now let's say user entered requested amount as 12000,dynamically priciple amount has to be generated by calculating requiredamount/120(number of months).Pls help!
    Thanks,
    Reddy.

    Thanks ,I am able to do it before watching u r answer.I searched in forum and I was able to it.
    Now i have one more question.Now I want to retrict the user not to enter any amount beyong eligible amount.Eligible amount is the field which I am getting from database table and displaying in a text view and the eligible amount is different for different users.I know this validation also has to be handled in ONENTER event.But I am not sure how to show the alert?
    I have to code in ONENTER event handler like
    if lv_requiredamount>lv_eligibleamount
    what need to be done to show some alert are popup.
    Please help.
    Thanks,
    Reddy.

  • How to filter values based on prompt values

    Hi Gurus,
    Good Afternoon to all.After long i came back with new requirement.............Its very highly important.
    I have one report in dashboard..............which is having employee head count based months.when user wants to click any month in prompt..the report should display upto previous month data..............
    example..............
    when user click september/2011.........the report should display data upto august/2011
    when user click october/2011.............the report should diaplay data upto september/2011
    could any one please give solution to resolve this issue............
    Thanks & Ragards,
    Naveen kumar

    Have a interim report having the month,previous month(calculated using case statements or addmonths function) .Make this report prompted to month. Then in your dashboard report select the month filter as 'filter based on report' and then select the calculated column of the interim report.

  • Filter looking for values based on other values

    Hi, is it possible to create a filter that returns items from the cache based on some criteria of other items in the cache.
    E.g. suppose I have a cache containing cars. I would like to create a filter that filters out all blue cars, but only if the cache also contains a red car.
    Best regards
    Jan

    Hi Jan,
    it is doable in a single pass in an aggregation, but it will not be too efficient for cases where no red cars exist.
    The problem is that in case of a partitioned cache, it is possible that there is a single red car in the cache on a separate node from the blue cars. In this case the blue cars should be returned. However it is also possible that there is no red car in the cache.
    In this example the nodes with the blue cars from the previous example won't be able to distinguish the two cases from one another based on only their own data. Therefore they have to return the blue cars, and let the client throw away all data based on whether the existence of a red car was indicated.
    If red cars are an unlikely event, it is better to first query (or aggregate for minimum traffic) for the existence of the red car, and only if it exists, then query for blue cars.
    If red cars are a probable event and having as few roundtrips to the cache as possible is more important then efficiency, then it is probably better to just (in parallel) aggregate the blue cars and indicate whether a red car exists on that node or not.
    For aggregations and particularly for parallel-aware aggregations, you can look at the following page:
    http://wiki.tangosol.com/display/COH34UG/Provide+a+Data+Grid#ProvideaDataGrid-DataGridAggregation
    Best regards,
    Robert

Maybe you are looking for

  • Maintain user session in web dynpro application

    Hello Experts, I have a web dynpro application. Whenever user presses F5 or refreshes the application, user is made available with login page. Instead, I want to maintain the session for that particular logged on user, so, whenever he refreshes he la

  • No administrator found for  - Message 5W 141

    Hi I am receiving this error when trying to exectute a new standard task.  It has been setup a a general task.  Any ideas, anyone??? Cheers Ian

  • I Bought Adobe Photoshop Elements 11

    I bought Adobe Photoshop Elements 11 & Adobe Premiere Elements 11 one year ago for windows. Can i use it on my new mac?

  • Setting Default Bluetooth Volume

    I have a Storm 9550 from Verizon with Version 5.0.0.607 software and use a Jawbone 2 bluetooth.  Whenever the bluetooth is disconnected from the 9550, upon reconnection the volume is at the lowest possible level.  There was a setting I used previous

  • Adding a SHADOW to the text doesn't work

    I try to add a simple SHADOW in my Illustrator. But it not works at all. Why? I don't understand it. I show this in thi film: