Sorting a Table View by Dynamic Choice
I have two tables - Projects and Tasks. The Tasks table contains a field named Project which is a Dynamic Choice field and the choices are populated based on the Projects table. This works fine and I understand how to sort those choices in the combo box control by using (select Projects) order by ProjectName. That works fine and that's not my issue. My issue is as follows...
I have various table views that I use to review my tasks and I'd like to be able to sort those tasks by the ProjectName they are associated with, however when attempting to sort by this field alphabetically in a table view, it always sorts by the record ID number of the Project rather than the text it contains. The Dynamic value set on this field is ProjectName. I've also tried using text(ProjectName) to fetch the field contents but the results do not change. Just out of curiosity I tried using ProjectName + " " + ID and sure enough, it shows that the results are always sorted by the record ID from the Project table.
Does anyone have ideas on how to sort a table view by the text contents of a Dynamic Choice field?
Thanks
4 replies
-
I have so many questions that it might be easier to see what is going on if you posted a sample DB.
-
said:
I'm currently working from the cloud version so I'm not sure if I can export a sample DB from hereIf you have the starter version then you are correct there is no way to download a copy of your DB. I don't know why but you can't. If you are on MacOS you can download the app and then you can download a copy of your DB.
You are correct that dynamic choice fields are always referenced by their record Id. That is because they are dynamic so Ninox always needs to root the selection on something that it can refer to.
One way around is to create a new formula field that has:
text(Project)
Then you can show this field in the table view and then you can sort properly.
Content aside
- 8 mths agoLast active
- 4Replies
- 118Views
-
3
Following