Sorting numberic data in a spry table

First Problem:
I am having trouble getting an secondary sort to work in a
spry table. As long as I do a single sort every thing works just
fine, but as soon as I try to do a secondary sort.... nothing
works.
Second Problem:
The data I am using ranges from 0 to 10. When I sort "1" and
"10" end up being right next one each other, but the 10 should be
on top. So the sort ends up as 9,8,7,6,5,4,3,2,10,1. when it should
be 10,9,8,7,6,5,4,3,2,1.
I'm sure it is something simple that I have not figured
out.... has anyone else run into this and solved it?
thanks,

there is an issue with this, regardless if you do ds1.setColumnType("Q407Q207A", "number"); the Damn thing does not sort negative numbers. Is there a way to fix this, You know what amazes me is that people would not take this into consideration, yeah lets release a framework with half the basic functionality. Sorry don't mean to complaint but I've been trying to find a fix for this for over a month and nothing not on the Live Docs nor out there on the WEB.

Similar Messages

  • Sort the Data Selection in TVARV Table

    hello...i wanted to run a SAP Standard Program and it is have a variant selection for me to select the variable from TVARV table. When this program run, I would like to have a selection of choosing the latest date to run the program based on the variant I save. I created a variables in the TVARV table but I cannot see any selection which can sort the selection based on the latest date. I can only choose to be EQ and etc. Is there any selection that I can make so that the program always choose to be run based on the latest date? thanksss alot!!!

    Look at table VARID.
    Rob

  • SPRY - sorting UK dates

    I have created a SPRY sortable table in Dreamweaver CS4.  Two  columns are formatted as UK dates dd/mm/yyyy. They are identified as  dates in the SPRY table.
    When sorting these date columns SPRY is  reading them as US date format which means the sorting is, while not  quite random, pretty meaningless.  I have checked this by reformatting  and displaying the date as US date format mm/dd/yyyy and then SPRY sorts  them as expected. 
    Would appreciate some help with how I retain  the UK date appearance and achieve a sort on that basis.  Is there a  localisation file somewhere in the SPRY framework that allows date  formats to be identified?
    If not, can anyone advise how to resolve this?
    Thanks in advance for any help.

    The root of the issue is that using JavaScript to a string into a date easily lead to inconsistent, unexpected results.
    The way I solved this in the past is to have two columns inside my Spry datasets. One stores the date in yyyy-mm-dd format (ISO 8901, the format typically used by databases), another one stores a nicely formatted date (whatever format the language dictated).
    Then I always display the nicely formatted column, but I sort it only the yyyy-mm-dd one.
    As a bonus, yyyy-mm-dd sorts okay just as a string, so I have no need to assign a different datatype to it.

  • Spry tables: Sort by date

    I need a spry table to sort by title and date columns; the
    title works fine by selecting the 'sortable column' option when
    making the table - this didn't work for the date column, but I
    think this was because the excel/xml data used had the date info in
    a text format. Once I'd formatted the date column cells in excel
    doc as 'date' in (e.g.) Jan-07 format, the xml conversion changed
    the data to what i think is the standard date format (e.g.
    2007-07-01 00:00:00). Making this column sortable resulted in rows
    being rearranged in the spry table, but not in any logical order.
    please help!
    many thanks,
    S
    (apologies if that was long-winded, wasn't sure whether you
    needed any context)

    You cannot sort a formatted date by default using the Spry.  How is the data stored, in XML or HTML?  And is the date stored as a formatted date or a timestamp?  What is typically suggested is that you store the dates in two formats.  First is a timestamp format or a formatted date as yyyy-mm-dd.  You use that column to sort and then you have a date formatted however you want in a second column and that gets displayed to the user.
    You can see more about this in the following thread: http://forums.adobe.com/thread/85718
    The problem with the dd/mm/yy format is that Spry (and many other solutions) read the information as plain text.  So here's a quick example of oldest to newest
    30122011 - Dec 30, 2011
    31012011 - Jan 31, 2011 - January would come after Dec
    01302011 - Jan 31, 2011
    01312010 - Jan 30, 2010 - 2011 would be before 2010
    20100131 - Jan 31, 2010
    20110131 - Jan 31, 2011
    20111230 - Dec 30, 2011 - In this format all numbers show up in numerical order.

  • Sorting by date in table?

    I am new to using Spry Data Tables and I am having some problems. I need to sort a table by a few different feilds. All of them are working except for the date column. It will sort if I change the type to "script" but it does not sort in the right order. I can not get it to sort by the type "date". Any ideas?
    Also, I am having problems with the original table and the spry table. The original table is in the same html document as my spry table. i followed a tutorial to try to set up my own document and everything looks just like the tutorial but only with my information. It says that once you view the page in the browser the origianl table will not be displayed but I am still getting two tables showing in my browser, the spry sortable table and the original table (non sortable) underneath. How do I get it to only display the sortable table but still pull information from the original?
    Thanks.

    To sort selected rows make the selection then open the "Sort & Filter" tool (top-right corner):
    Then add a column using the "Add a Column..." button.  Now select the column and the sort direction

  • Date Format for Spry data set sort

    Hi
    Just feeling my way through the use of Spry Datasets for the
    first time and have a couple of issues hopefully someone with more
    knowledge of it than me know the answer to.
    I had an issue with my Spry Dataset initially that it would
    not work in ie7 but was OK in FF3.
    After some mucking round I realised the error I was getting -
    albeit obscure in IE was telling me it was a date format issue in
    my data set.
    The db data I am playing with here is fairly simple: I have a
    couple of text fields, an integer field that contains the
    unixtimestamp of the entry (its a simple diary application) and a
    formal date field that holds the same date in mysql's date format.
    When I display the date in the dataset I do so in the format
    "23rd May 2009" (as an example)- I code this using phps date
    function in my xml query.
    I had set this field to date format in the Spry dataset
    conditions but IE seems to barf on this- I can change it to
    textstring but then my sort is done on Alpha/Numeric sort of the
    first character in the date field which is rubbish.
    I only display the date in this format and one of the other
    text fields in my dataset- the unixdate is for programmatic
    purposes not general display so I cannot sort on this field if its
    invisible. How can I acheive a date based sort with this set up- or
    what date formats does Spry code prefer for date sorts? (My client
    wants the date to show as I have explained). Many thanks. I have a
    second query which I will post separately!
    Kenny

    "Tanushiheadbash" <[email protected]> wrote
    in message
    news:gqa70o$iat$[email protected]..
    > I think I follow what you are saying and in fact I think
    its what I
    > already
    > have. I have set the sort order to use the unixtime when
    the page
    > initially
    > loads and thats OK.
    I am sorry, but you aren't following my explanation. English
    isn't my mother
    tongue, and I am not able to explain it any better.
    > However what I need to be able to do is to have the
    AJAX/Javascript sort
    > (done in this case with Spry- ) to sort on the date when
    the column header
    > is
    > clicked. The problem I have is the date format in this
    visible column is
    > in
    > DDth Month YYYY format and Spry does not recocnise this
    as a date format-
    > it
    > wants it as a string ( or ie gives an error). Maybe its
    not possible what
    > I am
    > trying to do- just thought there might be a clever way
    to implement this.
    You can take a look at this page:
    http://visual.unipv.it/tmt_calendar/admin/reports/events.cfm
    Even if all the dates here are incidentally using the
    yyyy-mm-dd format, the
    dataset display the date from the "start_date_formatted"
    field:
    <td><a href="javascript:"
    onclick="showUpdate('{event_id}')">{start_date_formatted}</a></td>
    But uses another field to sort the table:
    <th scope="col" spry:sort="start_date">Start
    date</th>
    You can have the same date, using two different formats,
    inside two,
    separated dataset fields. One is used for display, the other
    one is used for
    sort.
    You may try to read again my previous explanations, look at
    the code in the
    page above and see if you get the idea.
    Massimo Foti, web-programmer for hire
    Tools for ColdFusion, JavaScript and Dreamweaver:
    http://www.massimocorner.com

  • Sort a Table with data extracted form Another table

    I have a MAster Table that consist of many columns of data. I have extracted data (rows) from the table to another table for a list. I used vlookup to get the extracted data. In my new table everything is list ed out perfectly. I want to sort the table using one of the columns. I tried the reorganize button and just sorting on that one column and it won't sort. I know I'm doing something wrong whether the way I am extracting the data,or something else. Do I use lookup and large or small function to list and sort it from the main table? I stumped. Anybody have sugestions?

    Hi tj,
    "The Master file is the second image. I have extracted the data for the second table(second image). "
    Hmmm...
    Both tables are the second image. Good trick!
    Good thing you included the description.
    The (modified) Master table is Table 1 on Sheet 15. From this, you are extracting the participants for "R & B Winter Sk8 Jam. You want the extracted rows to be displayed on the Contestant Sheet table sorted by Division.
    I see two possible lines of attack here:
    The simplest might be to presort the Master table on Division, then within that sort, on last name, then on first name. With the Master table in that order, extracting the data using the index you are currently using should pull the rows in the desired order.
    Construct an index of numerical values constructed from the sum of:
    -- a very large number corresponding to the event, pulled from a Lookup table.
    -- a large numbers corresponding to the division, pulled from a second Lookup table.
    -- a small number corresponding to he count (from the top of the main tale to the current row) of Sk8ers entered in each event. (This, I think, would be the same as the count in your Index column.)
    Retrieval would be done using RANK to determine the smallest and largest index values to retrieve, and SMALL to collect data from the rows with index values within that range.
    No. 2 is at the concept stage, and is open to anyone wanting to give it a go.
    Regards,
    Barry

  • Sorting a Spry Table

    For a table listing events and fed by an xml file I need to sort the date and time columns. First priority is date, second is time. This is possible in a regular html table, but not an option in spry tables, at least not in CS 3 which I am using.
    It probably needs some change in the JavaScript to do that. Any help with that is greatly appreciated. Thanks.

    Click the column headers here http://labs.adobe.com/technologies/spry/samples/data_region/DataReferences.html and here http://labs.adobe.com/technologies/spry/samples/data_region/SortSample.html
    For a table listing events and fed by an xml file I need to sort the date and time columns. First priority is date, second is time. This is possible in a regular html table, but not an option in spry tables, at least not in CS 3 which I am using.
    Sorting is a built-in Spry function.
    It probably needs some change in the JavaScript to do that.
    Under normal circumstances, it is advisable not to touch the Spry JS files.

  • Report: sorting of data and temporary table sorting

    We have a report that runs a procedure, which inserts data into a temporary table using the supplied parameters. The report then selects data from this table.
    Previously the report has always displayed data in the same order in which it was inserted into the table, even though no sorting is specified by the report itself. I realize that the report itself ought to specify the sorting in order to guarantee it, but this has worked in the past.
    As part of an application/Oracle upgrade the report has been recompiled. Data is now displayed in a different order as before. However, each time we run it now, it IS the same (new) sorting. So it's still consistent, but consistent in a different way than before.
    Is there some way to go back to the old sorting (display in same order as inserted into table) - without having to re-code this (and all the other) reports in order to specify the sorting? We think that data is still inserted into the temporary table in the same order as before. We are using the same version of Crystal Reports.
    Edited by: user489847 on May 31, 2010 4:01 AM

    Crystal Reports.This is the Oracle Reports forum.
    Anyway, I have seen this in one of our applications too. Suddenly the ordering was different, because there was no explicit order by. There is never a guarantee of the ordering if you do not specify it.
    You should ask this in the database forum too, since this is not really Reports related.

  • I have downloaded and installed the latest version of numbers on my mac. Everytime I save and then try to reopen that document, I receive a message telling me that I need a new version of numbers. Also, when I try to sort the date column, it sorts out of

    I have downloaded and installed the latest version of numbers on my mac. Everytime I save and then try to reopen that document, I receive a message telling me that I need a new version of numbers. Also, when I try to sort the date column, it sorts out of order. The last version sorted fine.

    Welcome to Apple Support Communities
    When you install the new iWork version, the old iWork version is kept, so it looks like you are opening your old version.
    To fix this, open a Finder window, choose Applications in the sidebar and drag the new Numbers version to the Dock, so you can access to it quickly. Open all documents from this version. I don't recommend you to delete the old Numbers version in case you need it.
    Respecting to the second question, you will get better answers in the Numbers for OS X forum

  • Spry Tables and Xml Data Sets viewed in IE7

    Has anyone ever run into a problem with Spry Tables and Xml
    Data Sets viewed in IE7? Work fine in IE6 and Firefox, but get the
    error "exception caught while loading feed.xml: [object Error]" in
    IE 7. Any ideas?
    Attached is the xml I'm using.
    Thanks

    I came looking for the answer to this question. I could not
    find an answer. Eventually I found it the answer that worked for
    me, a graphic designer with not much experience in xml.
    The following url provided an errata file in PDF format:
    www.peachpit.com/dwcs3cib
    which includes the following addendum to the incomplete
    instructions in the book i was using to learn about spry:
    "If Internet Explorer 7 is your primary browser, you'll nee
    to take some extra steps to view spry dynamic content locally.
    First, your site must be within the local server webroot; be sure
    your Lessons folder is stored within the Inetpub>wwwroot folder.
    Next, double-click the site name in the files panel to open the
    Site Definition dialogue. Click the Testing Server category; from
    the Access List choose Local/Network. Click Okay to close the Site
    Definition dialogue. Now, when you preview your page with Internet
    Explorer, your local Web server (localhost) serves the page as
    designed."
    Horray for me! Now i can move on from here and actually get
    some work done!

  • Downloaded new numbers app.  Now no table headings.  Solution?  Also in table headings/title want to add current date as did in old numbers.  How do I do it?  Thanks

    Down loaded new numbers app.  Now no table headings.  Solution?  Also. How do I include current date as part of new table heading, I had this included in old numbers spreadsheet title?

    Hi,
    Do you mean no table name?
    Or table header row?
    You can get the current date in a table heading with NOW, which in the formula editor now looks like this:
    Which you can format this way:
    SG

  • How to open a new page from a Spry Table click, with element info?

    Hello, Spry experts!
    This is probably simple, but I've searched for hours and can't find what I need. I'm using Dreamweaver CS4 and Spry 1.6.1 to create a simple Spry Table from an XML data set using PHP as my back end.  I've used Dreamweaver's Insert->Spry->Spry Data Set to create everything, and the table is working fine.  Colors, clicks, sorts, etc., are all working correctly as expected.
    What I want is to be able to add a behavior such that when a table row is clicked, I can open a new page.  Moreover, I want to pass a parameter from the table to the new page, like http://www.mydomain.com/newpage.php?aid=12345 or whatever.
    So, for example, my table has two columns, "a_id" and "a_name", and my repeat region looks like this:
    <div spry:region="xml_assignments">
    <table width="500">
    <tr>
    <th spry:sort="a_id" class="spry_header">ID</th>
    <th spry:sort="a_name" class="spry_header">Assignment</th>
    </tr>
    <tr spry:repeat="xml_assignments" spry:setrow="xml_assignments" spry:odd="spry_odd" spry:even="spry_even" spry:hover="spry_hover" spry:select="spry_select">
    <td>{a_id}</td>
    <td>{a_name}</td>
    </tr>
    </table>
    </div>
    What I want is to be able to open an entirely new URL, passing the value of the {a_id} in the selected row as a parameter to the new URL, as in something like:  http://www.mydomain.com/newpage.php?aid={a_id}
    So my questions are: 
    1. How best to apply the action to the table?  Add an onclick to the tr tag?  Something else?
    2. How to extract the {a_id} value from the current row and pass it as a parameter to the action?
    Or maybe just take another approach entirely?
    I know that I can make the actual text in the table cells hyperlinks, and use them to link to the new page, which is fine.  The desire here is just to make it so that the user can click "anywhere" on the table row (as they can currently do with the spry:select behavior) and have the link kick off, whether they actually click on the linked text or somewhere in the row where there is no text.
    I'm sure this is obvious and simple, but I'm new to this level of Spry detail, and my brain is fried from hunting.  Any guidance will be gratefully appreciated!
    Glen Barney

    I found the answer myself, after posting this, of course!
    I changed:
    <tr spry:repeat="xml_assignments" spry:setrow="xml_assignments" spry:odd="spry_odd" spry:even="spry_even" spry:hover="spry_hover" spry:select="spry_select">
    to
    <tr spry:repeat="xml_assignments" spry:setrow="xml_assignments" spry:odd="spry_odd" spry:even="spry_even" spry:hover="spry_hover" spry:select="spry_select" onclick="window.location.href='./newpage.php?aid={a_id}';">
    Basically just added the onclick parameter...
    And it all just worked!

  • How to update Spry-table and present the updated table in a div element?

    Hello!
    I am using a very interesting AJAX-framework called Spry when designing a web page. Here the web page is: Link.
    I need some help.
    Every time a new project or shift is added, the changes are written to an xml-file. When the page is reloaded, Spry reads data from xml-files.
    This is caused by this code:
    dsProjects = new Spry.Data.XMLDataSet("timetable/projects.xml", "projects/project");
    dsShifts = new Spry.Data.XMLDataSet("timetable/{dsProjects::url}", "project/shift"); //look inside projects.xml and //extrac xml-file. url
    dsName = new Spry.Data.XMLDataSet("timetable/{dsProjects::url}", "project");
    I call this function that I have written: loadProjectsIntoDivElement ().
    This function does the following: [See attached code.]
    It iterates through the Spry-datastructure and puts the data in a table inside of the div-element called 'projectsList'.
    Now, when I add a new project, I want it to be inserted into the Spry-datastructure and then cause the new data to be written into the div element called 'Specials_DIV'.
    I have found out how to update a Spry-datastructure (e.g. dsProjects above), but I don't know how to update the table containing the data without refreshing the page. This should be done using Spry.
    Some code:
    1:
    2:
    3:
    function loadProjectsIntoDivElement () {
    $('#projectsList').html('');
    $('#projectsList').append('<table id="Specials_Table"><tr><th spry:sort="id">ID</th><th spry:sort="NAME">Name </th><th spry:sort="hoursestimated">Nr. of hours estimated</th><th spry:sort="hoursworked">Nr. of hours worked</th><th spry:sort="costperhour">Cost per hour.</th></tr>{function::init_hours}<tr spry:repeat="dsProjects" onclick="chooseProject({ds_RowID})"><td>{id}</td><td>{NAME}</td><td>{hoursestimated}</td><td>{hoursworked}</td><td>{costperhour}</td></tr></table><br/>{function::get_hours}<br/>');
    I have tried to accomplish this in various ways but I don't succeed.
    I want to do it without refreshing the page.
    Update: I found some code here that I will try: Link
    Thanks in advance!
    Anders Branderud
    My blog

    Hello!
    Thanks!
    I don't succeed with the implementation in any browser.
    I have found a way to it, but I would like a way that updates the data quicker and without reloading all of the page. After all, I am only adding one row on the end of the data structure, so there should be no need to read in all data again.
    Now I do it like this:
    When a project is added, do this:
    1. Store a new row in the project file through a php script.
    2. When the post-call to the php-file returns, do refresh of the whole page.
    Then the newest version of the xml file will be read in.
    However, I don't want to read the data from a xml file each time that a new project is created.
    I know how to add the new data to a Spry-datastructure [in my code 'dsProjects'], but I don't know how to display the updated data without reloading the whole page.
    I have tried some various ways to do it, but haven't succeded.
    Thanks!
    Anders Branderud

  • Using javascript to dynamically generate the html for a  Spry table

    I have some javascript which generates html code for a Spry
    table which displays the content of a Spry data set. The problem is
    that after I generate the html, Spry never fills in the values for
    the table.
    Here's what I'm doing:
    Using a data set observer, check for onPostLoad and generate
    the html code
    Using innerHTML, stuff the code into the appropriate
    <div>
    Use regionName.updateContent() to update the region I just
    created with the html code I generated
    Interestingly, if I take the generated source for my page and
    remove the data set observer, the Spry table displays correctly
    with all the expected values. This suggests to me that my generated
    html code is correct, but that there is some sort of timing issue
    (i.e. Spry doesn't know about the new code I generated).
    Any suggestions?

    jalperin wrote:
    > Here's what I'm doing:
    >
    Using a data set observer, check for
    onPostLoad and generate the html
    > code
    >
    Using innerHTML, stuff the code into
    the appropriate <div>
    >
    Use regionName.updateContent() to
    update the region I just created
    > with the html code I generated
    >
    > Interestingly, if I take the generated source for my
    page and remove the data
    > set observer, the Spry table displays correctly with all
    the expected values.
    > This suggests to me that my generated html code is
    correct, but that there is
    > some sort of timing issue (i.e. Spry doesn't know about
    the new code I
    > generated).
    >
    > Any suggestions?
    I'd guess that it is a timing issue as well. I haven't looked
    much at the dataset capability in Spry, but it may be that the
    dataset "finds" all of the regions and code that it applies to
    before the onPostLoad event is triggered. If that is the case, then
    your generated code doesn't exist yet,and so the dataset thinks
    that there is nothing for it to apply to.
    Will the HTML that you generate change based upon the dataset
    that is actually returned? I guess I'm looking for the reason why
    the HTML is being generated when it could be in the page itself and
    avoid this issue completely.
    Danilo Celic
    |
    http://blog.extensioneering.com/
    | WebAssist Extensioneer
    | Adobe Community Expert

Maybe you are looking for

  • How to find a BADI to change the default value of a Web Dynpro Screen?

    Hello Experts!! My requirement is as follows- The SAP cProjects Distribution Functions screens default the Calculation Base to “Per Day”(This is represented via the initially-selected value in a listbox). The requirement is to make it deafult to the

  • Any suggestions for my code.

    Hi, I wrote this little piece of code to reduce some of the work I need to do when doing database access. I intend to use if with mySQL and mostly web based applications. It'll probably use it quite a bit, and since it's my first try at writing somet

  • How to move one text item to other in form conditionaly

    I am working in form 9i Please some one can help me when I am trying to move my one form field to other conditionally what will be my triger I was using when vilidate item the error comes ora-40105 regard s k swain

  • How can I make new iCal events default to 1 hour long?

    Please help me love my iCal again.  How can I set it up so that the default for a new event is an hour long instead of EIGHT?!?  Why on earth does iCal think a new event should be eight hours long?  It's especially annoying at night.  Add a new event

  • UCS C series maximum hard drive size

    Looking for info on the maximum hard drive size support on teh UCS C series.  I have a C200M2 that I added a 4TB drive, I have updated the server to the latest firmware and BIOS however the server shows the drive size is 2TB.