I'm looking forward api for sorting value.

Resolved

Hello! I have question!
 
I want to sort value by code not click on pivot table.
I know the way to sort value by clicking on pivot table.
when I clicked value header column as right button of mouse, context menu(sort column desc, sort column asc) comes up.
I thought that sorting value as code function is exist because sorting value as clicking function is exist.
 
Do you have any API, please let me know the api 🙂
 
Regards,
Jiwon.
 

4 answers

Public
Tanya Gryshko Flexmonster July 24, 2018

Hello, Jiwon,
Thanks for posting to our Support Forum!
To sort value by code please use sortValues API call. 
More API calls are available in our documentation
Please let me know if you have other questions.
Regards,
Tanya

Public
jiwon July 25, 2018

Hello. Tanya.
 
I forgot detailed. I want to sort total value on right end side as code.
Is it possible by using ‘sortValues’?
I tried it before, but I failed.
 
I’ll appreciate it if you give me some samples.
 
Regards,
Jiwon.
 

Public
Tanya Gryshko Flexmonster July 25, 2018

Hello, Jiwon,
Thank you for a quick update!
Yes, sorting the total value is possible via sortValues. For example, Total Sum of Revenue column from our demo can be sorted this way:

flexmonster.sortValues(
"columns",
"asc",
[],
"Revenue"
);

Please note, tuple parameter is used to identify the column or row. In a case when we want to apply sorting to the total value, we specify tuple as [].
Does it help?
Regards,
Tanya

Public
jiwon July 27, 2018

Hello Tanya.
Your answer was so clarifying.
Thanks!

Please login or Register to Submit Answer