Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I may be missing something but I cannot see how to order a straight table chart , say by PartNo, in the order those PartNos were selected. I am using a brilliant macro written by some unknown person to allow pasting of a list of PartNos into an input box for selection and would like to output in the list order.
TIA,
Jane
I have a solution, but it isn't simple or very pretty. I think it should work for your situation.
I created a macro that would take the Part No entry (which I'm assuming is set to a variable) and parses through that entered list to create a sort expression, which is stored as a different variable. The sort expression on the chart is then set to the sorting variable using a dollar sign expansion.
I have posted a sample which using simplified data. I didn't bother with any selection, because you said you had that working. I believe you should be able to set this macro to be triggered for the OnSelection event of your Part No field, which should be triggered by your other macro making the selection on that field. Once this macro runs, your chart will be automatically sorted.
I have a solution, but it isn't simple or very pretty. I think it should work for your situation.
I created a macro that would take the Part No entry (which I'm assuming is set to a variable) and parses through that entered list to create a sort expression, which is stored as a different variable. The sort expression on the chart is then set to the sorting variable using a dollar sign expansion.
I have posted a sample which using simplified data. I didn't bother with any selection, because you said you had that working. I believe you should be able to set this macro to be triggered for the OnSelection event of your Part No field, which should be triggered by your other macro making the selection on that field. Once this macro runs, your chart will be automatically sorted.
Thanks I will give this a whirl.
Thanks for the solution worked. I had to add some filters to get rid of single quotes thoug. Is there a prize for the longest expression in QlikView BTW?