Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
What I'm trying to create for my report is a listbox containing fields of a table.
My goal is for the user to be able to sort the table based on the selection they have made in the list box.
For example:
Listbox:
Name
Inception Date
Cover No
Premium
Cover Status
Table:
Name | Inception Date | Cover No | Premium | Cover Status |
---|---|---|---|---|
Tony | 11/06/2013 | A0001 | $200 | Bound |
Matt | 11/05/2013 | A0002 | $50 | WIP |
If the user chooses Name - the chart sorts by "Name" and alphabetical order.
If user chooses Premium - the chart sorts by "Premium" and lowest to highest amount.
What I've done so far is load this into the script (Fields from my actual data):
LOAD * INLINE [
_Sort, _Result
Conservation Ref, conservationid
Trading Name, tradingname
ABN, abn
Inception Date, inceptiondate
Conversation Status,conver_state
];
I created a variable and called it "vSort" which = "_Result".
Then In my table I sorted by expression and input "=($(vSort))".
I then created a listbox using "_Sort".
The problem I am having is that When I click a field which only contains numerical data, it will sort by it, however, when trying to sort by a field which contains text, it won't sort at all.
I'm kind of at a loss at the moment, so any help would be greatly appreciated.
Tony
Hi.
You have to create a corresponding numeric field for each text field with sort weight value.
Thanks whiteline.
It was indeed the right path to take.
I found the answer to my problem through this thread: