Jump to content

Sorting by colour (color)


This topic is 6276 days old. Please don't post here. Open a new topic instead.

Recommended Posts

I have a layout which is designed to show a list of records. All have different or the same due dates. I need to group some records that are simular so I highlight this by giving them the same colour(color). Obviously when I have sorted by date order these colour could be all over the place.

Is it possible to then sort these records then by date but secondly by the colour?

I know I could have a seperate field and give the same numbers and sort by that but as a visual aid... the colours work much better.

Or, I could use a seperate field where I group with numbers from 1 to 10 as part of a value list but would it be possible to give each number a different colour??? Depending on which one is returned.

Link to comment
Share on other sites

You should create a number field "sortOrder" that contains an index number corresponding to the colour: 1 = red, 2 = yellow, 3 = green and so on, in the order you want them sorted.

Then define a repeating global container field "globalColours" to contain graphics of each colour (4 pixels square will do, as you can "stretch" the graphic to full field size later). The first repetition should contain red, the second yellow, and so on.

Then your "colour" field should be a calculation field defined as:

getrepetition(globalColours;sortOrder)

with "container" result. Display this field on your layout as the background to each record.

Sort by date then sortOrder (or, preferably, make a script do the sorting for you!) and the records will be in date order then colour order.

Let us know how you get on and if you need any more help.

James

Link to comment
Share on other sites

This topic is 6276 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.