Jump to content
  • 0

Column Sorting Challenge



So I have a basic 3 field table with one of the fields being Day of Week.   The Day of Week field is a static populated drop down with "Sunday, Monday, Tuesday".... etc,    My users can create multiple entries within this table using the same Day of Week.   I'm trying to figure out how I can forcibly sort the Day Of Week column to always display the Days of Week in sequence; Sunday, Monday, Tuesday etc.  But I need each instance of the DOW, to be sequential.  Example being the following 5 rows...

Sunday     'tttt'

Monday    'xxxx;

Monday   'yyyy'

Tuesday   'uuuu'

Wednesday  'rrrr'


When my use enters a new row with DOW of Sunday,  I need that new row to be listed directly below the existing Sunday row and not alphabetized which would place it right before Tuesday.

Any ideas?  I hope this made sense.


Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

Hello @HeyItsDoug,

To sort the field by the correct sequence of the day, I suggest that you have a calculated field in the form to convert the Day of the Week to an integer. 

CASE WHEN [@field:DOW] = 'Sunday' Then 1
WHEN [@field:DOW] = 'Monday' Then 2
WHEN [@field:DOW] = 'Tuesday' Then 3
WHEN [@field:DOW] = 'Wednesday' Then 4
WHEN [@field:DOW] = 'Thursday' Then 5
WHEN [@field:DOW] = 'Friday' Then 6
WHEN [@field:DOW] = 'Saturday' Then 7 


Then, hide this calculated using custom CSS. Insert Header/Footer and paste this code: You may refer to this forum post 


#target table:nth-of-type(1) td:nth-of-type(3)  {display: none;}
#target table:nth-of-type(1) th:nth-of-type(3)  {display: none;}

<div id="target">

Lastly, on the Results Page Options, sort the report by this Calculated field.


Hoping that this will be your expected result:



Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...