Alpha Software Mobile Development Tools:   Alpha Anywhere    |   Alpha TransForm subscribe to our YouTube Channel  Follow Us on LinkedIn  Follow Us on Twitter  Follow Us on Facebook

Announcement

Collapse

The Alpha Software Forum Participation Guidelines

The Alpha Software Forum is a free forum created for Alpha Software Developer Community to ask for help, exchange ideas, and share solutions. Alpha Software strives to create an environment where all members of the community can feel safe to participate. In order to ensure the Alpha Software Forum is a place where all feel welcome, forum participants are expected to behave as follows:
  • Be professional in your conduct
  • Be kind to others
  • Be constructive when giving feedback
  • Be open to new ideas and suggestions
  • Stay on topic


Be sure all comments and threads you post are respectful. Posts that contain any of the following content will be considered a violation of your agreement as a member of the Alpha Software Forum Community and will be moderated:
  • Spam.
  • Vulgar language.
  • Quotes from private conversations without permission, including pricing and other sales related discussions.
  • Personal attacks, insults, or subtle put-downs.
  • Harassment, bullying, threatening, mocking, shaming, or deriding anyone.
  • Sexist, racist, homophobic, transphobic, ableist, or otherwise discriminatory jokes and language.
  • Sexually explicit or violent material, links, or language.
  • Pirated, hacked, or copyright-infringing material.
  • Encouraging of others to engage in the above behaviors.


If a thread or post is found to contain any of the content outlined above, a moderator may choose to take one of the following actions:
  • Remove the Post or Thread - the content is removed from the forum.
  • Place the User in Moderation - all posts and new threads must be approved by a moderator before they are posted.
  • Temporarily Ban the User - user is banned from forum for a period of time.
  • Permanently Ban the User - user is permanently banned from the forum.


Moderators may also rename posts and threads if they are too generic or do not property reflect the content.

Moderators may move threads if they have been posted in the incorrect forum.

Threads/Posts questioning specific moderator decisions or actions (such as "why was a user banned?") are not allowed and will be removed.

The owners of Alpha Software Corporation (Forum Owner) reserve the right to remove, edit, move, or close any thread for any reason; or ban any forum member without notice, reason, or explanation.

Community members are encouraged to click the "Report Post" icon in the lower left of a given post if they feel the post is in violation of the rules. This will alert the Moderators to take a look.

Alpha Software Corporation may amend the guidelines from time to time and may also vary the procedures it sets out where appropriate in a particular case. Your agreement to comply with the guidelines will be deemed agreement to any changes to it.



Bonus TIPS for Successful Posting

Try a Search First
It is highly recommended that a Search be done on your topic before posting, as many questions have been answered in prior posts. As with any search engine, the shorter the search term, the more "hits" will be returned, but the more specific the search term is, the greater the relevance of those "hits". Searching for "table" might well return every message on the board while "tablesum" would greatly restrict the number of messages returned.

When you do post
First, make sure you are posting your question in the correct forum. For example, if you post an issue regarding Desktop applications on the Mobile & Browser Applications board , not only will your question not be seen by the appropriate audience, it may also be removed or relocated.

The more detail you provide about your problem or question, the more likely someone is to understand your request and be able to help. A sample database with a minimum of records (and its support files, zipped together) will make it much easier to diagnose issues with your application. Screen shots of error messages are especially helpful.

When explaining how to reproduce your problem, please be as detailed as possible. Describe every step, click-by-click and keypress-by-keypress. Otherwise when others try to duplicate your problem, they may do something slightly different and end up with different results.

A note about attachments
You may only attach one file to each message. Attachment file size is limited to 2MB. If you need to include several files, you may do so by zipping them into a single archive.

If you forgot to attach your files to your post, please do NOT create a new thread. Instead, reply to your original message and attach the file there.

When attaching screen shots, it is best to attach an image file (.BMP, .JPG, .GIF, .PNG, etc.) or a zip file of several images, as opposed to a Word document containing the screen shots. Because Word documents are prone to viruses, many message board users will not open your Word file, therefore limiting their ability to help you.

Similarly, if you are uploading a zipped archive, you should simply create a .ZIP file and not a self-extracting .EXE as many users will not run your EXE file.
See more
See less

Client Side Group Break Sort

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Client Side Group Break Sort

    I need to do a custom sort on a client side group break.

    My desired order is:

    AA
    A
    B
    C

    But I cant seem to get the AA to appear before the A. If I do server side sorting I can use a numeric sort and the data dictionary to get me what I want....but I would rather use client side.....any ideas?

    Thanks

    #2
    Re: Client Side Group Break Sort

    Is AA the only two character value to be sorted or will you encounter

    AA
    A
    BB
    B

    etc?

    If only the one you could sort (or break) on

    case(value = "AA","1",.t.,value)
    There can be only one.

    Comment


      #3
      Re: Client Side Group Break Sort

      Hey Stan

      Thanks for the suggestion but the sort definition for the group breaks requires a CLF list and throws up an error if I try to add the suggestion you made.

      AA would be the only two character value to be sorted

      Comment


        #4
        Re: Client Side Group Break Sort

        Figured it out

        FieldValue|Character|Asc|1

        That works.....thanks for the suggestion Stan... I appreciate your effort!

        Comment


          #5
          Re: Client Side Group Break Sort

          Sorting the list by School name in the SQL and using the FieldValue|Character|Asc|1 group sort gave me what I needed
          Attached Files
          Last edited by gregincolumbus; 03-08-2017, 04:45 PM.

          Comment


            #6
            Re: Client Side Group Break Sort

            On second thought....this is still not working using the sort method above. Anyone have a suggestion?

            Comment


              #7
              Re: Client Side Group Break Sort

              i do not know the names of the fields you are using or the backend ( i know it is sql)
              but try this and see if it works, it is native syntax in mySql:
              Code:
              SELECT id, letter, school, name 
              FROM greg   
              ORDER BY CASE (letter)
              WHEN 'aa' THEN 1
              WHEN 'a' THEN 2
              WHEN 'b' THEN 3
              WHEN 'c' THEN 4 ''comment this can go on before the end.
              END, school
              fyi: i am on version 11, so this is read only grid similar to list.
              this is not grouped yet, just to give you an idea.
              here is the grid
              https://www.screencast.com/t/ptDwzr0BSFzm

              edit: my apologies, you want client side custom sort not in the sql select statement.
              can you use this with group break on the letter and see if it works?

              edit2: i just checked, adding group on the letter breaks the grid back to aa being after a.
              Last edited by GGandhi; 03-08-2017, 07:38 PM.
              thanks for reading

              gandhi

              version 11 3381 - 4096
              mysql backend
              http://www.alphawebprogramming.blogspot.com
              [email protected]
              Skype:[email protected]
              1 914 924 5171

              Comment


                #8
                Re: Client Side Group Break Sort

                Hi Gandhi,
                Thanks for the suggestion. I already have a numeric field in the sql table and could sort by that. The issue is that I want the text field in the group sort break header.....not the numeric.

                If I do a server side group break, I can use the data dictionary approach 1=AA, 2=A, etc so that the value in the server side header is what I want......but I am trying to get it to work on the client side....so that I can give the user the ability to sort on demand and change the breaks using action scripting.

                So for example, click one button to do a strict alpha list by school with group breaks by the first letter of the school name.....or click another button and do the AA, AA, B group breaks which then has the alphabetical school sort under those breaks

                I am wondering if the answer is using the $u.s.tran Function in the HTML Expression for the header? So if I use my numeric value as my group break field.....I would need to use that function to substitute values? 1=AA, 2 = A, 3 = B, etc? I have never used that function....but it sounds like it might be the answer? Anyone?

                Comment


                  #9
                  Re: Client Side Group Break Sort

                  OK....finally figured it out. In the screenshot below.....

                  final.PNG

                  Sort Definition: ClassSort is the numeric, School is the school name
                  Group Break Expression: data.Classification is the AA, A, B, etc

                  What is interesting is that Classification is not in the sort definition for the group level.....but it is allowing me to use it and it shows up as desired in the group header......so unless somebody sees an issue with this approach.....I am good to go

                  Thanks again Stan and Gandhi for your help.

                  Comment

                  Working...
                  X