Closed VictKat closed 7 months ago
Hi @VictKat .
Is it possible to send us a screenshot of the FAQs actually being randomly ordered? Also, if possible, I would like a screenshot of the columns, sort and group by settings in the view so that I can see if I can reproduce it.
Hi, I have noticed the sorting is actually alphabetical by the question column instead of random, no matter if I select the ID column or number column added to try and force a specific order
Thanks for the screenshot!
Yes, when grouping, the order of GROUP BY is applied first. So, if you want to sort the questions in order, you must set a number or alphabet at the beginning of the column values to be grouped. (e.g. 01.Whart is XXX
, 02.How is YYY
, 03.What is ZZZ
)
Also, if you set the characters for sorting at the beginning and do not want them to appear, you can use a combination of the substring
and indexOf
operators to remove them.
Example: to remove the first 3 characters of a grouped column value, change @group.fieldData.displayValue
to =substring(@group.fieldData.displayValue,3,indexOf(@group.fieldData.displayValue+'^','^'))
.
using the accordion code quite frequently and in the past with filtering into sections to reduce FAQ lists, in this instance I have been trying to sort the view based on additional columns, tested number and text columns for sorting. Once code is applied, a sorted view changes order completely. Any suggestions what could cause this? Even after re-entering values in order so they are already sorted by ID will still shuffle the questions to random order.