Skip to main content
Known Participant
Aug 10, 2023 10:14 AM UTC
Question

Same Sort Field value for more than one column

Hi Everyone 

I have a grid field in which 3 columns are populated by the same DB column and I also want to set same sort Field value for them.

Is there any way to set so because when I try it throws an error that Sort Field value must be unique. 

5 replies

konduruc733182
Inspiring
Aug 10, 2023 10:54 AM UTC

Hello harshw0876,

Can you please show us the expression or screenshots of your error.

mathieud0001
Genius
Aug 10, 2023 12:48 PM UTC

You can't use the same field twice in a grid to sort. I think possibly the only way you could do this is to create 2 additional custom record fields.

mikes0011
Brainy
Aug 10, 2023 2:22 PM UTC

Generally the best approach here is to just define the sort field for only the first column in such a collection, and leave the other columns alone.  Out of curiosity, why do you have 3 columns for the same underlying field?  Have you considered consolidating these into one column (or at least, fewer than 3)?

The Expression Guru
Known Participant
Aug 11, 2023 8:30 AM UTC

Actually I have a migration project in which as you said they consolidated 3 columns in one but now I separated those columns and want same sort field to be there

mikes0011
Brainy
Aug 11, 2023 1:18 PM UTC

If they're the same column in the DB / CDT, then they're the same column.  What is "separated" about them, if they aren't represented by separate elements within the CDT?

The Expression Guru