Sorting and Grouping by multi-value Choice columns - any options?

I found out the hard way that SharePoint doesn't support sorting or grouping lists by Choice columns that are set to "Allow Multiple Values." I'm stunned by this missing capability, and my project has come to a complete halt without it. It's like Microsoft only implemented hafl the feature -- you can put data in, but then you can't do anything with it. You can't even use the column in a formula in another column, so you can't parse it.
I'm not posting just to gripe though. Does anyone have any suggestions for alternatives? What do you do when you need to let people make multiple selections, and then you want to sort or group by those values? Are there any add-on products that allow this? At this point my only option seems to be to not allow multiple choices, but that's taking away a rather significant feature.
Thanks for any ideas,
Steve

Hi Paul,
Thank you for the reply and the additional questions. For my situation I want to use the multi-value choice to indicate a "belongs to" relationship, as in "this item belongs to projectA, projectB, and project C. Because there are more than 10 projects, I didn't want to create a separate Yes/No checkbox for each one.
For viewing the information, I'm looking primarily for a "group by" function.  So if an item belongs to projectA, projectB, and projectC, it would appear three times, once under the grouping for each project. What I don't want is for a row that only belongs to projectA to be grouped separately from a row that belongs to both projectA and projectB. I want to see all the rows that belong to projectA grouped together, regardless of whether they also belong to other projects.
I'll look into using a grid control, but if you have any other suggestions I'll certainly listen.
Steve

Similar Messages

  • [Forum FAQ] SharePoint 2013: Extracting values from a multi-value enabled lookup column and merge values to a multi-value enabled column

    For some business requirements, users want to extract values from a multi-value enabled lookup column
    and add items to another list based on each separate value. In contrast, others want to find duplicate values in the list and merge associated values to a multi-value enabled column and then
    add items to another list based on the merged value. All of these can be achieved using SharePoint Designer 2013 Workflow.
    How to extract values from a multi-value enabled lookup column and add items to another list based
    on each separate value using SharePoint Designer 2013.
    Important actions: Loop Shape; Utility Actions
    Three scenarios
    Things to note
    Steps to create Workflow
    How to merge values to a multi-value enabled column and add item to another list based on the
    merged value using SharePoint Designer 2013.
    Important actions: Call HTTP Web Service; Build Dictionary
    Things to note
    Steps to create Workflow
    How to
    extract values from a multi-value enabled lookup column and
    add items to another list based on each separate value using SharePoint Designer 2013.
    For example, they have three lists as below. They want to
    extract values from the Destinations column
    in Lookup2 and add items to Lookup3 based on each country and set Title to current item: ID.
    Lookup1:
    Title (Single line of text)
    Lookup2:
    Title (Single line of text), Destinations (Lookup; Get information from: Lookup1 in Title column).\
    Lookup3:
    Title (Single line of text), Country (Single line of text).
    Important action
    1. Loop Shape: SharePoint Designer 2013 support two types of loops: loop n times and loop with condition.
    Loops must also conform to the following rules:
    Loops must be within a stage, and stages cannot be within a loop.
    Steps may be within a loop.
    Loops may have only one entry and one exit point.
    2. Utility Actions: It contains many actions, such as ‘Extract Substring from Index of String’ and ‘Find substring in String’.
    Three scenarios
    We need to loop through the string returned from the look up column and look for commas. There are three
    scenarios:
    1.  No comma but string is non-empty so there is only one country.
    2.  At least one comma so there is at least two or more countries to loop.
    3.  In the loop we have consumed all the commas so we have found the last country. 
    Things to note
    There are two things to note:
    1. "Find string in string (output to Variable:index)"  will return -1 if doesn't find
    the searched for string.
    2. In the opening statement "Set Variable: Countries to Current Item:Destinations" set the return
    field as  "Lookup Values, Comma Delimited".
    Steps to create Workflow
    Create a custom list named Lookup1.
    Create a custom list named Lookup2, add column: Destinations (Lookup; Get information from: Lookup1 in Title column).
    Create a custom list named Lookup3, add column: Country (Single line of text).
    Create a workflow associated to Lookup2.
    Add conditions and actions:
    Start the workflow automatically when an item is created.
    Add item to Lookup2, then workflow will be started automatically and create multiple items to lookup3.
    See the below in workflow History List:
    How to merge values to a multi-value enabled column and add item to another list based on the
    merged value using SharePoint Designer 2013
    For example, they have three lists as below. They want to find duplicate values in the Title column in
    Lookup3 and merge country column to a multi-value enabled column and then add item to lookup2 and set the Title to Current Item: Title.
    Lookup1:
    Title (Single line of text)
    Lookup3:
    Title (Single line of text), Country (Single line of text).
    Lookup2:
    Title (Single line of text), Test (Single line of text).
    Important actions
    "Call HTTP Web Service"
    action: In SharePoint 2013 workflows, we can call a web service using a new action introduced in SharePoint 2013 named Call HTTP Web Service. This action
    is flexible and allows you to make simple calls to a web service easily, or, if needed, you can create more complex calls using HTTP verbs as well as allowing you to add HTTP headers.
    “Build Dictionary"
    action:
    The Dictionary variable type is a new variable type in the SharePoint 2013 Workflow.
    The following are the three actions specifically designed for the Dictionary variable type: Build Dictionary, Count Items in a Dictionary and Get an Item from a Dictionary.
    The "Call HTTP Web Service" workflow action would be useless without the new "Dictionary" workflow action.
    Things to note
    The
    HTTP URI is set to https://sitename/_api/web/lists/GetByTitle('listname')/items?$orderby=Id%20desc and the HTTP method is set to “GET”. Then the list will be sort by Id in descending order.
    Use Get
    d/results(0)/Id form
    Variable: ResponseContent (Output to
    Variable: maxid) to get the Max ID.
    Use Set
    Variable: minid to Current List:ID to get the Min ID.
    Use Copy from
    Variable: destianation , starting at
    1 (Output to
    Variable: destianation) to remove the space.
    Steps to create Workflow
    Create a custom list named Lookup1.
    Create a custom list named Lookup2, add column: Test (Single line of text).
    Create a custom list named Lookup3, add column: Country (Single line of text).
    Create a workflow associated to Lookup3.
    Add a new "Build Dictionary" action
    to define the http request header:
    Add a Call HTTP Web Serviceaction, click on
    this and paste your http request.
    To associate the
    RequestHeader variable, select the Call action property,
    set the
    RequestHeaders property to
    RequestHeader:
    In the Call action, click on
    response and associate the response to a new
    variable: ResponseContent (of type Dictionary).
    After the Call action add Get item from Dictionary action to get the Max ID.
    Add Set Workflow Variable action to get the Min ID.
    Add Loop Shape (Loop with Condition) to get all the duplicate titles and integrate them to a string.
    Create item in Lookup2.
    The final Stage should look like this:
    Start the workflow automatically when an item is created.
    Add item to Lookup3, then workflow will be started automatically and create item to lookup2.
    See the below in workflow History List:
    References
    SharePoint Designer 2013 - Extracting values from a multi-value enabled lookup column into a dictionary as separate items:
    http://social.technet.microsoft.com/Forums/en-US/97d34468-1b53-4741-88b0-958472f8ca9a/sharepoint-designer-2013-extracting-values-from-a-multivalue-enabled-lookup-column-into-a
    Workflow actions quick reference (SharePoint 2013 Workflow platform):
    http://msdn.microsoft.com/en-us/library/jj164026.aspx
    Understanding Dictionary actions in SharePoint Designer 2013:
    http://msdn.microsoft.com/en-us/library/office/jj554504.aspx
    Working with Web Services in SharePoint 2013 Workflows using SharePoint Designer 2013:
    http://msdn.microsoft.com/en-us/library/office/dn567558.aspx
    Calling the SharePoint 2013 Rest API from a SharePoint Designer Workflow:
    http://sergeluca.wordpress.com/2013/04/09/calling-the-sharepoint-2013-rest-api-from-a-sharepoint-designer-workflow/

    GREAT info, but it may be helpful to note that when replacing a portion of the variable "Countries" with a whitespace character, you may cause the workflow to fail in a few specific cases (certain lookup fields will not accept this and will automatically
    cancel).  I only found this out when recreating your workflow on a similar, but much more complex list set.  
    To resolve this issue, I used another utility action (Extract Substring from Index of List) to clear out the whitespace.  I configured it as "Copy from
    Variable: Countries, starting at
    1 (Output to Variable: Countries), which takes care of this issue in those few cases.
    Otherwise, WOW!  AWESOME JOB!  Thanks!  :)

  • Sorting and Grouping -Two months in this query

    Hi All,
    many thanks for jeneesh
    i am doing project for construction company, i face this problem in grouping points according to relation between these points the
    Relation is from 1 to 100. If the point between this rang that mean there is relation between these points.
    this question already solve but the results not correct when the table has more data.
    SQL - sorting and grouping.
    from jeneesh and many thanks for him.
    This example for more clarifications
    for example i have these points
    id   location         percentage   comments
    1     loc 1,2          20%                that mean point  1 and 2 close to each other by 20%
    2     loc 1,3          40%              that mean point 1 and 3 close to each other byy 40%
    3     Loc 8,6          25%               that mean point 8 and 6 close to each other by 25%
    4     Loc  6,10        20%
    5     LOC 11,10        10 %
    6     LOC 15,14         0%Also , we can see the relation between these points as follwoing
    - points 1,2,3 in one group why becuase 1,2 has relation and 1,3 has relation that mean 1,3 also has hidden relation.
    - Points 6,8,10,11 in second group there are relations between them .
    - but no relation between 1 or 2 or 3 with any point of 6,8,9,10,11
    - as well as no relation between 15, 14 that mean 14 in third group and 15 in fourth group.
    whati need?
    to group the points that has relation according to percentage value ascending
    The most important part is to group the points. SO , the below query the gropuing is not correct.
    I have the follwoing table with data
    drop table temp_value;
    create table temp_value(id number(10),location varchar2(20), percentage number(9));
    insert into temp_value values  (1,'LOC 1,2',10);
    insert into  temp_value values (2,'LOC 1,3',0);
    insert into  temp_value values (3,'LOC 1,4',0);
    insert into  temp_value values (4,'LOC 1,5',0);
    insert into  temp_value values (5,'LOC 1,6',0);
    insert into  temp_value values (6,'LOC 2,3',0);
    insert into  temp_value  values(7,'LOC 2,4',0);
    insert into  temp_value values (8,'LOC 2,5',30);
    insert into  temp_value values (9,'LOC 2,6',0);
    insert into  temp_value values (10,'LOC 3,4',0);
    insert into  temp_value values (11,'LOC 3,5',0);
    insert into  temp_value values (12,'LOC 4,5',40);
    insert into  temp_value values (13,'LOC 4,6',0);
    insert into  temp_value values (14,'LOC 6,7',40);
    insert into  temp_value values (15,'LOC 7,2',0);
    insert into  temp_value values (16,'LOC 8,2',60);
    insert into  temp_value values (17,'LOC 8,3',0);
    insert into  temp_value values (18,'LOC 3,1',0);
    insert into  temp_value values (19,'LOC 9,6',30);
    insert into  temp_value values (20,'LOC 11,2',0);
    insert into  temp_value values (22,'LOC 12,3',10);
    insert into  temp_value values (23,'LOC 19,3',0);
    insert into  temp_value values (24,'LOC 17,3',0);
    insert into  temp_value values (24,'LOC 20,3',0);when i used this query , the results is not correct
    with t as
        (select percentage,loc1,loc2,sum(case when percentage = 0 then 1
                           when loc1 in (l1,l2) then 0
                       when loc2 in (l1,l2) then 0
                       when l1 is null and l2 is null then 0
                       else 1
                  end) over(order by rn) sm
        from (     select id,location,percentage,
                           regexp_substr(location,'\d+',1,1) LOC1,
                          regexp_substr(location,'\d+',1,2)  LOC2,
                         lag(regexp_substr(location,'\d+',1,1))
                          over(order by percentage desc) l1,
                          lag(regexp_substr(location,'\d+',1,2))
                          over(order by percentage desc) l2,
                  row_number() over(order by percentage desc) rn
          from temp_value
          order by percentage desc
       select loc,min(sm)+1 grp
         from(
           select loc,rownum rn,sm
           from(
           select percentage,decode(rn,1,loc1,loc2) loc,sm
           from t a,
                (select 1 rn from dual union all
                 select 2 from dual ) b
           order by percentage desc,decode(rn,1,loc1,loc2) asc
        group by loc
       order by min(sm),min(rn);the results
    SQL> /
    LOC                         GRP
    2                             1
    8                             1
    6                             2
    7                             2
    4                             3
    5                             3
    9                             4
    1                             5
    12                            6
    3                             6
    11                           13
    LOC                         GRP
    19                           14
    17                           15
    20                           22
    14 rows selected.SQL>
    but the correct is
    Location        group No
    2                  1
    8                  1
    4                  1
    5                  1
    1                  1
    6                  2
    7                  2
    9                  2
    12                 3
    3                  3
    19                 4
    17                 5
    20                 6many thanks in advance.
    Edited by: Ayham on Nov 30, 2012 3:07 AM

    Thanks,
    i want the sorting for each group DESC not all groups to gather
    when i used your query i get
    SQL> with connects as (
      2  select distinct
      3   loc1
      4  ,loc2
      5  ,dense_rank() over (order by connect_by_root(loc1)) grp
      6  from temp_value
      7  start with
      8  percentage != 0
      9  connect by nocycle
    10  (prior loc2 = loc1
    11  or
    12  prior loc1 = loc2
    13  or
    14  prior loc1 = loc1
    15  or
    16  prior loc2 = loc2)
    17  and
    18  percentage != 0
    19  )
    20  ,  got_grp AS
    21  (
    22     select
    23      loc
    24      ,dense_rank() over (order by grp) grp
    25      from (
    26      select
    27       loc
    28       ,max(grp) keep (dense_rank first order by grp) grp
    29       from (
    30       select
    31        loc1 loc
    32        ,grp
    33        from connects
    34        union
    35        select
    36         loc2
    37         ,grp
    38         from connects
    39         )
    40         group by
    41         loc
    42        )
    43  )
    44  SELECT       loc
    45  ,    grp
    46  FROM         got_grp
    47  ORDER BY  COUNT (*) OVER (PARTITION BY grp)   DESC
    48  ,            grp
    49  ,    loc
    50  ;The output is
    LOC                         GRP
    1                             1
    2                             1
    4                             1
    5                             1
    8                             1
    6                             3
    7                             3
    9                             3
    12                            2
    3                             2
    10 rows selected.but i want it like this
    Loc  Grp
    2      1
    8      1
    4      1
    5      1
    1      1
    12    2
    3      2
    6      3
    7      3
    9      3So , the sorting for each group Separate based on the percentage column.
    many thanks
    Edited by: Ayham on Nov 30, 2012 9:43 AM

  • Reporting counts on multi-value lookup columns

    Hi,
    I have a list containing 2 columns - student, and subjects. Subjects is a multi-value lookup column. Students may study multiple subjects. What I'm trying to achieve is a simple pie chart (I don't care if it's done using SharePoint Web Part, Excel or
    SSRS) that displays a breakdown of how many students are studying each subject.
    So if I have 2 list entries:
    Person 1, Science, Maths
    Person 2 , Maths
    Person 3 , Science
    The report/chart would report  2 Science and 3 Maths. What I'm struggling with is that because the data is stored in an un-normalized fashion ('#;') separated it's not possible to do straight charts without coding (C# or VBS). I
    would have assumed that this issue would be widely spread but I've had no luck looking through forums. Does anyone have any experience/;ideas on how to handle this??
    Thanks.
    MDB

    Hi
    From your description, my understanding is that you want to get counted values of a Multi-Value lookup column.
    You can get counted values of a Multi-Value lookup column
    in DVWP using XSLT.
    Refer to the following post:
    https://social.msdn.microsoft.com/Forums/en-US/f9d4cf16-4460-48a7-9514-dee19503b9fc/getting-counted-values-of-a-multivalue-lookup-column-in-dvwp-using-xslt?forum=sharepointdevelopmentprevious
    Best Regards,
    Lisa Chen
    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]

  • Using member sorting and grouping with two reports sharing rows

    Hi!
    I have a problem with one report and I need some help or advise here.
    I have two dimensions with dynamic expansion in rows (PRODUCT, MATERIAL), and I use the option Member Sorting and Grouping at Member selector to obtain the total amount of PRODUCT group by PARENTH1:
    PRODUCT               MATERIAL          AMOUNT
    TOTAL PROD_A-X                                   100
    PROD_A_A             MAT1                          22
    PROD_A_B             MAT1                          50
    PROD_A_A             MAT2                          28 
    TOTAL PROD_B-X                                   120
    PROD_B_A             MAT1                          30
    PROD_B_A             MAT2                          50
    PROD_B_B             MAT2                          40
    This works fine if I only have one report, but I need to create another one sharing the row and page axis with the Default Report, when I do that the option Member Sorting and Grouping doesn't work. I really need to have two reports with shared rows and also the summation by PARENTH1, how can I do that?
    Thank you very much

    Hi!
    I have a problem with one report and I need some help or advise here.
    I have two dimensions with dynamic expansion in rows (PRODUCT, MATERIAL), and I use the option Member Sorting and Grouping at Member selector to obtain the total amount of PRODUCT group by PARENTH1:
    PRODUCT               MATERIAL          AMOUNT
    TOTAL PROD_A-X                                   100
    PROD_A_A             MAT1                          22
    PROD_A_B             MAT1                          50
    PROD_A_A             MAT2                          28 
    TOTAL PROD_B-X                                   120
    PROD_B_A             MAT1                          30
    PROD_B_A             MAT2                          50
    PROD_B_B             MAT2                          40
    This works fine if I only have one report, but I need to create another one sharing the row and page axis with the Default Report, when I do that the option Member Sorting and Grouping doesn't work. I really need to have two reports with shared rows and also the summation by PARENTH1, how can I do that?
    Thank you very much

  • Ok, im new to numbers but i cant work this one out. In column A is an average of hours worked. I have 4 columns. A and B have different values. Column C is an average of hours worked. When column C is less then 8 i need column D to equal column a

    Ok, im new to numbers but i cant work this one out. I have 4 columns. A and B have different values. Column C is an average of hours worked. When column C is less then 8 i need column D to equal column A. When column C is equal or greater then 8 i need column D to equal the sum of A and B.

    Hi Lucas,
    Try this:
    Formula in D2 (and Fill Down) =IF(C2<8, A2,A2+B2)
    The IF function follows the logic of if, then, else.
    IF(this is true, then do this, else do that)
    If it is raining, then stay at home, else hold a picnic .
    Regards,
    Ian.

  • TableModel with SORT and GROUP BY functions solution.

    Hello all,
    I'd like to represent an EnvelopeTableModel. This class is developed to incapsulate another TableModel and allow user to reorder and group data without changing original values and orders.
    It allows to perform multi column sortings and grouping and
    supports following group functions: EMPTY, COUNT, MIN, MAX, SUM, AVG.
    Here you can download the library, demo version and documentation.
    http://zaval.org/products/swing/
    It would be great to know all your opinions.
    With best regards
    Stanislav Lapitsky

    About 1) and 3).
    These suggestions are almost the same. These features will change GUI component but i want to improve TableModel instead of JTable.
    Using the model user can use JTable for data representation.
    Of course I can improve JTable component and add multiline row/column headers with ability to reorder/group data from component and a lot of another widgets but it isn't my goal.
    About 2) What do you mean "crosstab"?
    Thanks for your 2-cents :-).
    With best regards
    Stas

  • Sorting and Grouping in Projects View

    In Projects view, when either of two of the three grouping options is selected, there are two sorts in effect: the groups themselves are sorted, and the contents of each group are sorted. These sorts are handled differently, depending on the grouping selected and the sort order selected.
    (It appears that there is a bit of the old Apple voodoo in here. The results are arbitrary , but they seem to have been carefully chosen to meet most users expectations. That is to say -- and this is an Apple programming trait -- the arbitrariness is faithful to the expected users' needs, not to logic.)
    There are four sorts available, and three groupings
    Sorts:
    . Name
    . Date -- Oldest First
    . Date -- Newest First
    . Library
    Groupings:
    . Ungrouped
    . Group by year
    . Group by folder
    So that's twelve possible ways to display Projects in Projects view.
    Let's look at a few of them. I'm going to refer to the groups as "Year groups" or "Folder groups" and to the contents of the groups as "Projects". So there is sorting of the groups, and sorting of the contents of the groups (same as "within the group"). These I'll refer to as "Groups sorting" and "Projects sorting".
    Sort: Date -- Newest First
    Grouping: Group by Year
    Result: Year groups are sorted in the same order as Projects. Projects which span multiple years are put in multi-year groups. Projects with the same spans are grouped together.
    Sort: Date -- Oldest First
    Grouping: Group by Year
    Results are as expected; a reversal of the "Newest First" sort, but with the same groups: Year groups are sorted in the same order as Projects. Projects which span multiple years are put in multi-year groups. Projects with the same spans are grouped together.
    Sort: Name
    Grouping: Group by Year
    Result: Year groups are sorted by year, oldest first. Projects which span multiple years are put in multi-year groups. Projects with the same spans are grouped together. Projects are sorted alphabetically, descending.
    Sort: Library
    Grouping: Group by year
    Result: Year groups are sorted by year, oldest first. Projects which span multiple years are put in multi-year groups. Projects with the same spans are grouped together. Projects are listed in the order they occur in the Library structure shown on the Library tab of the Inspector. (Note that this last is literal: a Project named "Aardvark Close-ups" if it's in a Folder named "Zoography" will be listed after all the projects in "Yellow Paintings" and all the Projects in "X-rays, thoracic" if those Projects are in alphabetical order by Folder name in the Library. You can see all the Projects in your Library listed on the Library tab of the Inspector by "{Option}+clicking" the disclosure triangle next to "PROJECTS & ALBUMS" twice.)
    Sort: Date - Newest First
    Grouping: Group by folder
    Result: Folder groups are sorted alphabetically by name, descending. Projects are sorted by date, newest first. Clicking a Folder's name in the Project viewer drills down to show the sub-Folders and Projects in the clicked Folder.
    Sort: Date - Oldest First
    Grouping: Group by folder
    Result: Folder groups are sorted alphabetically by name, descending. Projects are sorted by date, oldest first. Clicking a Folder's name in the Project viewer drills down to show the sub-Folders and Projects in the clicked Folder (where, again, Folder groups are sorted alpha-name, descending, and Projects are sorted alpha-name, descending).
    Sort: Name
    Grouping: Group by folder
    Result: Folder groups are sorted alphabetically by name, descending. Projects are sorted alphabetically by name, descending. Clicking a Folder's name in the Project viewer drills down to show the sub-Folders and Projects in the clicked Folder (where, again, Folder groups are sorted alpha-name, descending, and Projects are sorted alpha-name, descending).
    Sort: Library
    Grouping: Group by folder
    Result: Folder groups are sorted alphabetically by name, descending. Projects are listed in the order they occur in the Library structure shown on the Library tab of the Inspector (see note above). Clicking a Folder's name in the Project viewer drills down to show the sub-Folders and Projects in the clicked Folder (where, again, Folder groups are sorted alpha-name, descending, and Projects are listed in the order they appear in the Library).
    Ernie [asked:|http://discussions.apple.com/thread.jspa?threadID=2816124&tstart=0]
    +I see those icons but note that those projects in folders will be in different sections arranged alpha, and then date within. Am I correct on that?+
    The answer is, it depends.
    If "Group by year" is selected, the Groups-sorting will always be by date, regardless of the sort order specified. The Groups-sorting order will follow whatever is specified for the Projects sort order (or default to "oldest first").
    If "Group by folder" is selected, the Groups-sorting will always be alphabetical, descending, regardless of the sort order specified. (So if you use Projects view, take care in naming your Folders. Use prefixes if needed to force a desired alpha sort.)
    If "Ungrouped" is selected, there are no Groups and perforce no Groups-sorting.
    That's all I have to say on this topic (today).
    Message was edited by: Kirby Krieger

    In Projects view, when either of two of the three grouping options is selected, there are two sorts in effect: the groups themselves are sorted, and the contents of each group are sorted. These sorts are handled differently, depending on the grouping selected and the sort order selected.
    (It appears that there is a bit of the old Apple voodoo in here. The results are arbitrary , but they seem to have been carefully chosen to meet most users expectations. That is to say -- and this is an Apple programming trait -- the arbitrariness is faithful to the expected users' needs, not to logic.)
    There are four sorts available, and three groupings
    Sorts:
    . Name
    . Date -- Oldest First
    . Date -- Newest First
    . Library
    Groupings:
    . Ungrouped
    . Group by year
    . Group by folder
    So that's twelve possible ways to display Projects in Projects view.
    Let's look at a few of them. I'm going to refer to the groups as "Year groups" or "Folder groups" and to the contents of the groups as "Projects". So there is sorting of the groups, and sorting of the contents of the groups (same as "within the group"). These I'll refer to as "Groups sorting" and "Projects sorting".
    Sort: Date -- Newest First
    Grouping: Group by Year
    Result: Year groups are sorted in the same order as Projects. Projects which span multiple years are put in multi-year groups. Projects with the same spans are grouped together.
    Sort: Date -- Oldest First
    Grouping: Group by Year
    Results are as expected; a reversal of the "Newest First" sort, but with the same groups: Year groups are sorted in the same order as Projects. Projects which span multiple years are put in multi-year groups. Projects with the same spans are grouped together.
    Sort: Name
    Grouping: Group by Year
    Result: Year groups are sorted by year, oldest first. Projects which span multiple years are put in multi-year groups. Projects with the same spans are grouped together. Projects are sorted alphabetically, descending.
    Sort: Library
    Grouping: Group by year
    Result: Year groups are sorted by year, oldest first. Projects which span multiple years are put in multi-year groups. Projects with the same spans are grouped together. Projects are listed in the order they occur in the Library structure shown on the Library tab of the Inspector. (Note that this last is literal: a Project named "Aardvark Close-ups" if it's in a Folder named "Zoography" will be listed after all the projects in "Yellow Paintings" and all the Projects in "X-rays, thoracic" if those Projects are in alphabetical order by Folder name in the Library. You can see all the Projects in your Library listed on the Library tab of the Inspector by "{Option}+clicking" the disclosure triangle next to "PROJECTS & ALBUMS" twice.)
    Sort: Date - Newest First
    Grouping: Group by folder
    Result: Folder groups are sorted alphabetically by name, descending. Projects are sorted by date, newest first. Clicking a Folder's name in the Project viewer drills down to show the sub-Folders and Projects in the clicked Folder.
    Sort: Date - Oldest First
    Grouping: Group by folder
    Result: Folder groups are sorted alphabetically by name, descending. Projects are sorted by date, oldest first. Clicking a Folder's name in the Project viewer drills down to show the sub-Folders and Projects in the clicked Folder (where, again, Folder groups are sorted alpha-name, descending, and Projects are sorted alpha-name, descending).
    Sort: Name
    Grouping: Group by folder
    Result: Folder groups are sorted alphabetically by name, descending. Projects are sorted alphabetically by name, descending. Clicking a Folder's name in the Project viewer drills down to show the sub-Folders and Projects in the clicked Folder (where, again, Folder groups are sorted alpha-name, descending, and Projects are sorted alpha-name, descending).
    Sort: Library
    Grouping: Group by folder
    Result: Folder groups are sorted alphabetically by name, descending. Projects are listed in the order they occur in the Library structure shown on the Library tab of the Inspector (see note above). Clicking a Folder's name in the Project viewer drills down to show the sub-Folders and Projects in the clicked Folder (where, again, Folder groups are sorted alpha-name, descending, and Projects are listed in the order they appear in the Library).
    Ernie [asked:|http://discussions.apple.com/thread.jspa?threadID=2816124&tstart=0]
    +I see those icons but note that those projects in folders will be in different sections arranged alpha, and then date within. Am I correct on that?+
    The answer is, it depends.
    If "Group by year" is selected, the Groups-sorting will always be by date, regardless of the sort order specified. The Groups-sorting order will follow whatever is specified for the Projects sort order (or default to "oldest first").
    If "Group by folder" is selected, the Groups-sorting will always be alphabetical, descending, regardless of the sort order specified. (So if you use Projects view, take care in naming your Folders. Use prefixes if needed to force a desired alpha sort.)
    If "Ungrouped" is selected, there are no Groups and perforce no Groups-sorting.
    That's all I have to say on this topic (today).
    Message was edited by: Kirby Krieger

  • Sorting based on a specific value in Columns

    Hi All,
    Crystal 2008 version I have. And we are connecting to BW queries as source.
    In a crosstab, I want to sort my row values based on a column value.
    For example, in rows I have an element with three values . In column I have only one element(month), with couple of month values. My requirement is to sort rows based on a specific month (Mar'09 for example).
    .....................Jan'09......Feb'09.....Mar'09
    ABC...............10.............323...........33....
    XYZ...............32..............33............11....
    FGH...............5................34.............55...
    But when I try to sort based on the Month, I can not select a specific value(mar'09). And it sorts based on the total value (sum of all months).
    How can I achieve this problem?
    Thanks
    Ozan

    For {Sort Value}, if you wanted to sort on the Jan column, then substitute the field name that your example shows as 10 in row ABC.  For {row value}, substitute the field name that is used in the first column (ABC in the example).
    In other words, take the value that you want to sort on, and put it in front of the value currently displaying as the row header.  Then, sort on the results.
    The purpose of the "000000000.00" is to make the length of the number, when converted to string, a consistent size.  This is needed (a) so you know how many characters to strip off when displaying the row value, and (b) so the records don't sort as 1, 12, 2, 234, 235423, 25, 3, ...
    HTH,
    Carl

  • Issues updating/setting multi value lookup columns via powershell

    Hi All,
         I have an issue updating multi values in a lookup field via powershell
    I can update a single value  lookup field as below but can't get to update if its multi value.
    As stated below when I hardcode it. It works.
    No idea what 'm missing. Any help will be appreciated.
    #Hardcoded works below as you can see i'm setting 3 values
    $array = @($realval.Split(';'))
    for ($i = 0; $i -lt $array.Count - 1; $i += 2)
    $word = $array[$i].Trim('#')
    $number = $array[$i+1].Trim('#')
    "$number $word"
    $lookupvalue1 = GetLookUpValues -val $number
    [Microsoft.SharePoint.SPFieldLookupValueCollection] $itemValues = New-Object Microsoft.SharePoint.SPFieldLookupValueCollection
    [Microsoft.SharePoint.SPFieldLookupValue] $lookupvalue = New-Object Microsoft.SharePoint.SPFieldLookupValue
    [Microsoft.SharePoint.SPFieldLookupValue] $lookupvalue2 = New-Object Microsoft.SharePoint.SPFieldLookupValue
    [Microsoft.SharePoint.SPFieldLookupValue] $lookupvalue3 = New-Object Microsoft.SharePoint.SPFieldLookupValue
    $lookupvalue.LookupId = 1
    $lookupvalue2.LookupId = 2
    $lookupvalue3.LookupId = 6
    $itemValues.Add($lookupvalue)
    $itemValues.Add($lookupvalue2)
    $itemValues.Add($lookupvalue3)
    #$itemValues.Add($lookupvalue)
    $CMRSItems["Event Type"] = $itemValues;
    Write-Host "items:" $itemValues
    $CMRSItems.Update()
    # This works when its updating only one value but when it needs to update multivalue it only updates the last one
    #so for example with the lookupvalue above only 6 gets updated below
    $array = @($realval.Split(';'))
    for ($i = 0; $i -lt $array.Count - 1; $i += 2)
    $word = $array[$i].Trim('#')
    $number = $array[$i+1].Trim('#')
    #$number
    "$number $word"
    #send param to GetLoolValues func to return records as SPFieldLookupValue
    $lookupvalue1 = GetLookUpValues -val $number
    #I can view the lookupvalue returned successfully
    #Write-Host $lookupvalue1
    [Microsoft.SharePoint.SPFieldLookupValueCollection] $itemValues = New-Object Microsoft.SharePoint.SPFieldLookupValueCollection
    #This LookupId returns 3 values like on the hardcoded one above like so :1,2,6
    $lookupvalue.LookupId = $number
    $itemValues.Add($lookupvalue)
    $CMRSItems["Event Type"] = $itemValues;
    #I can view the items returned successfully
    Write-Host "items:" $itemValues
    $CMRSItems.Update()

    The problem I can see with your code is that the below line of code, you are instantiating inside the for loop. This should have been outside the for loop as by keeping it inside the loop you are overriding the value.
    [Microsoft.SharePoint.SPFieldLookupValueCollection] $itemValues = New-Object Microsoft.SharePoint.SPFieldLookupValueCollection
    Please have a look at the below solution and modify your code as per your requirement. What I am trying to achieve in the below code is that I have a listA in which one of the field is being used as a multi-lookup in my listB.
    $lookupCollection = $something.split(";")
    $LookupMasterList=$web.Lists["ListA"]
    [Microsoft.SharePoint.SPFieldLookupValueCollection] $lookupValueCollection = New-Object Microsoft.SharePoint.SPFieldLookupValueCollection
    #Get the Lookup Item from Parent List
    foreach($item in $lookupCollection){
    IF([string]::IsNullOrEmpty($item.trim())) {
    continue;
    $LookupItem = $LookupMasterList.Items | Where-Object { $_.Item("FieldInternalName") -eq $item.trim()}
    if($LookupItem -ne $null)
    $myLookup = New-Object Microsoft.Sharepoint.SPFieldLookupValue($LookupItem.ID,$item.trim())
    $lookupValueCollection.Add($myLookup);
    #Set the Lookup field value
    if([string]::IsNullOrEmpty($lookupValueCollection)){
    continue;
    else{
    $newItem["Lookupfieldinternalname"] = $lookupValueCollection
    The above logic has no hard coding and it fetches the lookup information directly from the master list and generates a collection based on that. You can modify the above code as per your requirement.
    Geetanjali Arora | My blogs |

  • Swatches CS3 - Sorting and grouping possible?

    Hello,
    a simple question. Is it possible to sort or group swatches?
    If the answer is yes, how do I do it?
    Thanks,
    Matt

    You can select and drag them up and down the panel.
    k

  • Set top and bottom inset spacing values in Text Frame Options via jsx script

    I am looking for a way to set the top and bottom inset spacing values only to 2 points in Text Frame Options via a .jsx scrpt.
    For years, I have used a script that sets Preferences, such as:
    with(app.storyPreferences){
        opticalMarginAlignment = false;
        opticalMarginSize = 12;                // pts
    I would like to add the code to this same script that would make Top = 0p2 and Bottom 0p2 but leave Left and Right as 0p0.
    Any help would be greatly appreciated.

    Here is the full .jsx file that we now use to set preferences.
    Ideally, this could be modified to include setting any text frame created to have 0p2 inset Top and Bottom, but 0p0 Left and Right:
    //ApplicationTextDefaults
    //An InDesign CS2 JavaScript
    //Sets the application text defaults, which will become the text defaults for all
    //new documents. Existing documents will remain unchanged.
    with(app.textDefaults){
        alignToBaseline = false;        // align to baseline grid
        try {
    //        appliedFont = app.fonts.item("Times New Roman");
            appliedFont = app.fonts.item("Helvetica");
        catch (e) {}
        try {
            fontStyle = "Medium";
        catch (e) {}
        autoleading = 100;
        balanceRaggedLines = false;
        baselineShift = 0;
        capitalization = Capitalization.normal;
        composer = "Adobe Paragraph Composer";
        desiredGlyphScaling = 100;
        desiredLetterSpacing = 0;
        desiredWordSpacing = 100;
        dropCapCharacters = 0;
        if (dropCapCharacters != 0) {
            dropCapLines = 3;
            //Assumes that the application has a default character style named "myDropCap"
            //dropCapStyle = app.characterStyles.item("myDropCap");
        fillColor = app.colors.item("Black");
        fillTint = 100;
        firstLineIndent = "0pt";
    //    firstLineIndent = "14pt";
        gridAlignFirstLineOnly = false;
        horizontalScale = 100;
        hyphenateAfterFirst = 3;
        hyphenateBeforeLast = 4;
        hyphenateCapitalizedWords = false;
        hyphenateLadderLimit = 1;
        hyphenateWordsLongerThan = 5;
        hyphenation = true;
        hyphenationZone = "3p";
        hyphenWeight = 9;
        justification = Justification.leftAlign;
        keepAllLinesTogether = false;
        keepLinesTogether = true;
        keepFirstLines = 2;
        keepLastLines = 2;
        keepWithNext = 0;
        kerningMethod = "Optical";
        kerningValue = 0;
        leading = 6.3;
    //    leading = 14;
        leftIndent = 0;
        ligatures = true;
        maximumGlyphScaling = 100;
        maximumLetterSpacing = 0;
        maximumWordSpacing = 160;
        minimumGlyphScaling = 100;
        minimumLetterSpacing = 0;
        minimumWordSpacing = 80;
        noBreak = false;
        otfContextualAlternate = true;
        otfDiscretionaryLigature = true;
        otfFigureStyle = OTFFigureStyle.proportionalOldstyle;
        otfFraction = true;
        otfHistorical = true;
        otfOrdinal = false;
        otfSlashedZero = true;
        otfSwash = false;
        otfTitling = false;
        overprintFill = false;
        overprintStroke = false;
        pointSize = 6.3;
    //    pointSize = 11;
        position = Position.normal;
        rightIndent = 0;
        ruleAbove = false;
        if(ruleAbove == true){
            ruleAboveColor = app.colors.item("Black");
            ruleAboveGapColor = app.swatches.item("None");
            ruleAboveGapOverprint = false;
            ruleAboveGapTint = 100;
            ruleAboveLeftIndent = 0;
            ruleAboveLineWeight = .25;
            ruleAboveOffset = 14;
            ruleAboveOverprint = false;
            ruleAboveRightIndent = 0;
            ruleAboveTint = 100;
            ruleAboveType = app.strokeStyles.item("Solid");
            ruleAboveWidth = RuleWidth.columnWidth;
        ruleBelow = false;
        if(ruleBelow == true){
            ruleBelowColor = app.colors.item("Black");
            ruleBelowGapColor = app.swatches.item("None");
            ruleBelowGapOverprint = false;
            ruleBelowGapTint = 100;
            ruleBelowLeftIndent = 0;
            ruleBelowLineWeight = .25;
            ruleBelowOffset = 0;
            ruleBelowOverprint = false;
            ruleBelowRightIndent = 0;
            ruleBelowTint = 100;
            ruleBelowType = app.strokeStyles.item("Solid");
            ruleBelowWidth = RuleWidth.columnWidth;
        singleWordJustification = SingleWordJustification.leftAlign;
        skew = 0;
        spaceAfter = 0;
        spaceBefore = 0;
        startParagraph = StartParagraph.anywhere;
        strikeThru = false;
        if(strikeThru == true){
            strikeThroughColor = app.colors.item("Black");
            strikeThroughGapColor = app.swatches.item("None");
            strikeThroughGapOverprint = false;
            strikeThroughGapTint = 100;
            strikeThroughOffset = 3;
            strikeThroughOverprint = false;
            strikeThroughTint = 100;
            strikeThroughType = app.strokeStyles.item("Solid");
            strikeThroughWeight = .25;
        strokeColor = app.swatches.item("None");
        strokeTint = 100;
        strokeWeight = 0;
        tracking = 0;
        underline = false;
        if(underline == true){
            underlineColor = app.colors.item("Black");
            underlineGapColor = app.swatches.item("None");
            underlineGapOverprint = false;
            underlineGapTint = 100;
            underlineOffset = 3;
            underlineOverprint = false;
            underlineTint = 100;
            underlineType = app.strokeStyles.item("Solid");
            underlineWeight = .25
        verticalScale = 100;
    //Units & Increments preference panel
    //Must do this to make sure our units that we set are in points. The vert and horiz
    //units that get set default to the current measurement unit. We set it to points
    //so we can be sure of the value. We'll reset it later to the desired setting.
    with(app.viewPreferences){
        horizontalMeasurementUnits = MeasurementUnits.points;    // Ruler Units, horizontal
        verticalMeasurementUnits = MeasurementUnits.points;        // Ruler Units, vertical
    //General preference panel
    with(app.generalPreferences){
        pageNumbering = PageNumberingOptions.section;    // Page Numbering, View
        toolTips = ToolTipOptions.normal;                    // Tool Tips
    // Not supported in CS4
    //    toolsPalette = ToolsPaletteOptions.doubleColumn;    // Floating Tool Palette
        completeFontDownloadGlyphLimit = 2000;                // Always Subset Fonts...
        try {
            //Wrapped in try/catch in case it is run with CS4 and earlier to avoid the error
            preventSelectingLockedItems = false;                // Needed for CS5+
        catch (e) {}
    //Type preference panel
    with (app.textEditingPreferences){
        tripleClickSelectsLine = true;    // Triple Click to Select a Line
        smartCutAndPaste = true;        // Adjust Spacing Automatically when Cutting and Pasting Words
        dragAndDropTextInLayout = false;    // Enable in Layout View
        allowDragAndDropTextInStory = true;    // Enable in Story Editor
    with(app.textPreferences){
        typographersQuotes = true;            // Use Typographer's Quotes
        useOpticalSize = true;                // Automatically Use Correct Optical Size
        scalingAdjustsText = true;            // Adjust Text Attributes when Scaling
        useParagraphLeading = false;    // Apply Leading to Entire Paragraphs
        linkTextFilesWhenImporting = false;    // Create Links when Placing Text and Spreadsheet Files
    // Missing following (Font Preview Size, Past All Information/Text Only)
    //Advanced Type preference panel
    with(app.textPreferences){
        superscriptSize = 58.3;                // Superscript, size
        superscriptPosition = 33.3;            // Superscript, position
        subscriptSize = 58.3;                // Subscript, size
        subscriptPosition = 33.3;            // Subscript, position
        smallCap = 70;                        // Smallcap
    with(app.imePreferences){
        inlineInput = false;                // Use Inline Input for Non-Latin Text
    //Composition preference panel
    with(app.textPreferences){
        highlightKeeps = false;                    // Keep Violations
        highlightHjViolations = false;            // H&J Violations
        highlightCustomSpacing = false;            // Custom Tracking/Kerning
        highlightSubstitutedFonts = true;    // Substituted Fonts
        highlightSubstitutedGlyphs = false;    // Substituted Glyphs
        justifyTextWraps = false;                // Justify Text Next to an Object
        abutTextToTextWrap = true;                // Skip by Leading
        zOrderTextWrap = false;                    // Text Wrap Only Affects Text Beneath
    //Units & Increments preference panel
    with(app.viewPreferences){
        rulerOrigin = RulerOrigin.spreadOrigin;                    // Ruler Units, origin
    //    These are set at the end of the script after all the changes have been made
    //    horizontalMeasurementUnits = MeasurementUnits.points;    // Ruler Units, horizontal
    //    verticalMeasurementUnits = MeasurementUnits.inches;        // Ruler Units, vertical
        pointsPerInch = 72;                    // Point/Pica Size, Points/Inch
        cursorKeyIncrement = 1;                // Keyboard Increment, Cursor Key
    with(app.textPreferences){
        baselineShiftKeyIncrement = 2;    // Keyboard Increment, Baseline Shift
        leadingKeyIncrement = 2;        // Keyboard Increment, Size/Leading
        kerningKeyIncrement = 20;            // Keyboard Increment, Kerning
    //Grids preference panel
    with(app.gridPreferences){
        baselineColor = UIColors.lightBlue;    // Baseline Grid, Color
        baselineStart = 48;                        // Baseline Grid, Start
        baselineDivision = 6;                    // Baseline Grid, Increment Every
        baselineViewThreshold = 50;                // Baseline Grid, View Threshold
        baselineGridRelativeOption = BaselineGridRelativeOption.topOfPageOfBaselineGridRelativeOption;    // Baseline Grid, Relative To
        gridColor = UIColors.lightGray;            // Document Grid, Color
        horizontalGridlineDivision = 12;    // Document Grid, Horizontal, Gridline Every
        horizontalGridSubdivision = 12;            // Document Grid, Horizontal, Subdivisions
        verticalGridlineDivision = 12;            // Document Gird, Vertical, Gridline Every
        verticalGridSubdivision = 12;            // Document Grid, Vertical, Subdivisions
        gridsInBack = true;                        // Grids in Back
        documentGridSnapto = false;                // snap to grid or not
        documentGridShown = false;                // show document grid
    //Guides & Pasteboard preference panel
    with(app.documentPreferences){
        marginGuideColor = UIColors.violet;                // Color, Margins
        columnGuideColor = UIColors.magenta;            // Color, Columns
    with(app.pasteboardPreferences){
        bleedGuideColor = UIColors.fiesta;                // Color, Bleed
        slugGuideColor = UIColors.gridBlue;                // Color, Slug
        previewBackgroundColor = UIColors.lightGray;    // Color, Preview Background
        minimumSpaceAboveAndBelow = 72;                    // Minimum Vertical Offset
    with(app.viewPreferences){
        guideSnaptoZone = 4;                            // Snap to Zone
    with(app.guidePreferences){
        guidesInBack = false;                            // Guides in Back
    //Dictionary preference panel
    with(app.dictionaryPreferences){
        composition = ComposeUsing.both;    // Hyphenatin Exceptions, Compose Using
        mergeUserDictionary = false;    // Merge User Dictionary into Document
        recomposeWhenChanged = true;    // Recompose All Stories When Modified
    // Missing (Lang, Hyph, Spelling, Double Quotes, Single Quotes)
    //Spelling preference panel
    with(app.spellPreferences){
        checkMisspelledWords = true;                    // Find, Misspelled Words
        checkRepeatedWords = true;                        // Find, Repeated Words
        checkCapitalizedWords = true;                    // Find, Uncapitalized Words
        checkCapitalizedSentences = true;                // Find, Uncapitalized Sentences
        dynamicSpellCheck = true;                        // Enable Dynamic Spelling
        misspelledWordColor = UIColors.red;                // Color, Misspelled Words
        repeatedWordColor = UIColors.green;                // Color, Repeated Words
        uncapitalizedWordColor = UIColors.green;    // Color, Uncapitalized Words
        uncapitalizedSentenceColor = UIColors.green;    // Color, Uncapitalized Sentences
    //Autocorrect preference panel
    with(app.autoCorrectPreferences){
        autoCorrect = true;                            // Enable Autocorrect
        autoCorrectCapitalizationErrors = false;    // Autocorrect Capitalization
    // Missing (Language, Misspelled word pairs)
    //Display Performance preference panel
    with(app.displayPerformancePreferences){
        defaultDisplaySettings = ViewDisplaySettings.typical;    // Preserve Object-Level
        persistLocalSettings = false;
    // Missing (antialiasiing, greek below
    //Story Editor Display preference panel
    with(app.galleyPreferences){
        textColor = InCopyUIColors.black;                // Text Color
        backgroundColor = InCopyUIColors.white;            // Background
        smoothText = true;                                // Enable Anti-Aliasing
        antiAliasType = AntiAliasType.grayAntialiasing;    // Type
        cursorType = CursorTypes.standardCursor;    // Cursor Type
        blinkCursor = true;                                // Blink
    // Missing (Font, Size, Line Spacing & Theme)
    //File Handling preference panel
    with(app.generalPreferences){
        includePreview = true;                        // Always Save Preview Images with Doc
        previewSize = PreviewSizeOptions.medium;    // Preview Size
    with(app.clipboardPreferences){
        preferPDFWhenPasting = false;                // Prefer PDF When Pasting
        copyPDFToClipboard = true;                    // Copy PDF to Clipboard
        preservePdfClipboardAtQuit = false;            // Preserve PDF Data at Quit
    // Missing (Enable Version Cue)
    //    Optical margin (hanging punctuation, outside margins)
    with(app.storyPreferences){
        opticalMarginAlignment = false;
        opticalMarginSize = 12;                // pts
    //Wrap Up (do at end of script)
    //Units & Increments preference panel
    //Must do this to make sure our units that we set are in points. The vert and horiz
    //units that get set default to the current measurement unit. We set it to points
    //so we can be sure of the value. We'll reset it later to the desired setting.
    with(app.viewPreferences){
        horizontalMeasurementUnits = MeasurementUnits.picas;    // Ruler Units, horizontal
        verticalMeasurementUnits = MeasurementUnits.inches;    // Ruler Units, vertical
    //    These two flags are turned off to avoid the error message about
    //    missing image links when InDesign opens an ad. This can especially
    //    be a problem when doing batch processes.
    with(app.linkingPreferences){
        checkLinksAtOpen = false;            // checkbox: true/false
        findMissingLinksAtOpen = false;        // checkbox: true/false

  • Sorting and null for monetary values in a report

    All,
    I think this should be an easy one, and I've just missed something obvious.
    I have a standard report in APEX 3.2.1 that includes a column with a monetary amount in it. I want the column to show the UK Pound sign, be sortable, and show nulls where appropriate.
    The issue I have is I can't find a way to achieve all 3 in a satisfctory way. As I see it the options would be:
    1) In the SQL for the report, concat the pound sign to the column required, e.g. SELECT '£'||amount FROM....
    The issue is that this makes this field a CHAR field, so sorting would not sort in the same way as for a number field.
    2) Use the Number format FML999...etc. in the Column Attribute.
    The problem with this is that this is a multi-country database, and the default monetary unit is set to the US dollar.
    3) Use the HTML expression box in the Column attribute to display £#COL#
    This fulfills the pound sign and retaining the number format, but unfortunately a null value is displayed as a £ sign with no numbers. I can't think how to get it to leave that value in the report as completely blank.
    As I said, I'm sure I've missed soemthing obvious. If anyone can spot how to achieve this it'd be much appreciated.
    Regards,
    Jon.

    >
    2) Use the Number format FML999...etc. in the Column Attribute.
    The problem with this is that this is a multi-country database, and the default monetary unit is set to the US dollar.
    >
    The NLS currency symbol can be modified on the fly if you have some means of identifying user location/preference: {thread:id=990848} (ignore the last post)
    However, it probably doesn't make sense to do that&mdash;£100 &ne; $100 (at least I hope not!)&mdash;unless there's some kind of conversion occurring in the report? Is there a currency stored along with the amount?
    >
    3) Use the HTML expression box in the Column attribute to display £#COL#
    This fulfills the pound sign and retaining the number format, but unfortunately a null value is displayed as a £ sign with no numbers. I can't think how to get it to leave that value in the report as completely blank.
    >
    Use 2 columns, one for the amount, and one for the currency, with a switch to include or exclude the latter as necessary:
    select
              ename
            , comm amount
            , nvl2(comm, '£', null) currency
    from
              emp
    where
              job in ('SALESMAN', 'MANAGER')
    ENAME      AMOUNT                 CURRENCY                        
    ALLEN      300                    £                               
    WARD       500                    £                               
    JONES                                                             
    MARTIN     1400                   £                               
    BLAKE                                                             
    CLARK                                                             
    TURNER     0                      £                                Then use both columns in the Amount HTML Expression:
    #CURRENCY##AMOUNT#

  • Sorting and grouping issue in WDP-ALV table

       lr_field->if_salv_wd_sort~create_sort_rule(
              EXPORTING
                sort_order        = if_salv_wd_c_sort=>sort_order_ascending
                group_aggregation = abap_true ).
    And while binding data, I'm sorting the internal table having data as below
    SORT wd_assist->gt_details_table(itab) BY bproc bsubproc function field ASCENDING.And output is as follows
    In the above snapshot, The sorting is getting disturbed on colunm: Function......
    But required output should be as below
    Pls help me how to achieve this?
    Thanks
    Katrice

    Hi Sandesh,
    When we use the SALV_WD_TABLE component to display ALV, by default, all columns are arranged in the same order as the attributes in the context node of your
    application.
    You need to add the following code in the wddomodifyview( ) method of your View.
    METHOD wddomodifyview
    data:lt_columns type salv_wd_t_column_ref,
            ls_column  type salv_wd_s_column_ref,
            lo_column  type ref to cl_salv_wd_column ,
            lo_ref_cmp_usage  type ref to if_wd_component_usage,
           lo_ref_interfacecontroller type ref to iwci_salv_wd_table ,
           lo_value type ref to cl_salv_wd_config_table.
    * Get  reference to the Component usage of the ALV.
    lo_ref_cmp_usage = wd_this->wd_cpuse_alv( ).
    IF lo_ref_cmp_usage->has_active_component( ) IS INITIAL.
    lo_ref_cmp_usage->create_component( ).
    ENDIF.
    * Get reference to the Interface controller of the ALV.
    lo_ref_interfacecontroller= wd_this->wd_cpifc_alv( ).
    lo_value = lo_ref_interfacecontroller->get_model( ).
    * Get the Columns of the ALV
    CALL METHOD lo_value->if_salv_wd_column_settings~get_columns
      RECEIVING
    value = lt_columns.
    * Get reference to each column and set the column position
    LOOP AT lt_columns INTO ls_column.
    lo_column = ls_column-r_column.
    CASE ls_column-id.
    WHEN 'VBELN'.
    lo_column->set_position('1').
    WHEN 'MATKL'.
    lo_column->set_position('2').
    WHEN 'POSNR'.
    lo_column->set_position('3').
    WHEN 'MATNR'.
    lo_column->set_position('4').
    ENDCASE.
    ENDLOOP.
    ENDMETHOD.
    Hope this helps you to resolve your issue.
    Thanks
    KH

  • XSL - Sort and Group?

    Hello,
    Anyone know if there is a way to do something like this?
    Original XML:
    <item>
    <word>word1</word><num>10</num><num2>9</num2>
    </item>
    <item>
    <word>word2</word><num>5</num><num2>3</num2>
    </item>
    <item>
    <word>word1</word><num>7</num><num2>6</num2>
    </item>
    I want to do something like group on <word> and sort accending on sum(<num>), min(<num2>) and end up with this:
    <item>
    <word>word1</word><num>17</num><num2>6</num2>
    </item>
    <item>
    <word>word2</word><num>5</num><num2>3</num2>
    </item>
    Is this possible?
    thanks,
    chad.

    Here's a start. See Chapter 9 of my book for a complete explanation of how to exploit XSLT keys like database functional indexes to make grouping operations like this be fast in XSLT. It takes a bit to wrap your mind around why and how it works and the book has figures that help illustrate this.
    <!-- chad.xml -->
    <list>
    <item>
    <word>word1</word><num>10</num><num2>9</num2>
    </item>
    <item>
    <word>word2</word><num>5</num><num2>3</num2>
    </item>
    <item>
    <word>word1</word><num>7</num><num2>6</num2>
    </item>
    </list>
    <!-- chad.xsl -->
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
    <xsl:key name="g" match="item" use="word"/>
    <xsl:output indent="yes"/>
    <xsl:template match="/">
    <list>
    <xsl:for-each select="list/item[generate-id(.)=generate-id(key('g',word)[1])]">
    <xsl:sort data-type="number" select="sum(key('g',word)/num)"/>
    <xsl:variable name="items-with-same-word" select="key('g',word)"/>
    <item>
    <word><xsl:value-of select="word"/></word>
    <num><xsl:value-of select="sum($items-with-same-word/num)"/></num>
    <num2><xsl:value-of select="sum($items-with-same-word/num2)"/></num2>
    </item>
    </xsl:for-each>
    </list>
    </xsl:template>
    </xsl:stylesheet>This produces the output:
    <list>
    <item>
    <word>word2</word>
    <num>5</num>
    <num2>3</num2>
    </item>
    <item>
    <word>word1</word>
    <num>17</num>
    <num2>15</num2>
    </item>
    </list>

Maybe you are looking for