Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I am having trouble getting a sort order correct to a clients needs.
I have the following sort orders in the script.
LOAD * INLINE[
Bill_Class_Model,Sort_Order1
U,1
A,2
M,3
];
LOAD * INLINE[
Account_Det_ID_Model,Sort_Order2
DU,1
CU,2
CM,3
DM,4
];
What they want is if Bill_Class_Model = M then Sort_Order2 needs to be sorted in descending order otherwise sort in ascending order.
Can anyone help please?
I try to put an expression like this in the tab order:
= If (Bill_Class_Model = 'M', (-1) * Sort_Order2, Sort_Order2)
Check ascending order.
A greeting.
Hi Daniel,
That didn't work. The field i am sorting is all in ascending order
I am struggling with this problem..
I don't know if it makesd a difference but i am trying to sort the data in a pivot table
I am attaching a document with an example.
I hope that helps you serve, if I understand you.
If you select the value of M, see you descending order.
A greeting.
Hi again,
I have attached your sample, I have added the field Bill_Class_Model to the pivot table, as you can see it all shows ascending order.
It worked if the Bill_Class_Field was not part of the pivot table, but as you can see it doesn't wotk with that field added in..
It works if i select Bill_Class_Model U, i want it to work without any selections though.
This is how i want it to look:
Bill_Class_Model Account_Det_ ID_Model
U DU
CU
CM
DM
A DU
CU
CM
DM
M DM
CM
CU
DU
Hi
Use dual values, with the sort order the numeric value. You can then sort the values using numeric sorting. Modify your loads as follows:
LOAD Dual(Bill_Class_Model, Sort_Order1) As Bill_Class_Model //, SortOrder1 // remove comment if you still need SortOrder1/2
[
Bill_Class_Model, Sort_Order1
....
]
Make sure you change the sort to numeric.
Hope that helps
Jonathan
Hi Jonathan, sorry, what do i need to change my scipt to please?
Replace the first LOAD* INLINE with
LOAD Dual(Bill_Class_Model, Sort_Order1) As Bill_Class_Model
Replace the second LOAD * INLINE with
LOAD Dual(Account_Det_ID_Model, Sort_Order2) As Account_Det_ID_Model
Hi Jonathan,
I have replaced what you have said but i am getting syntax errors. Have i done something wrong?