Despite the COVID-19 outbreak, our team continues operating at full speed. We are always here to support and answer all your questions.

Feel free to reach out by filling this quick form.

Fill the form
Get Free Trial

How to sort and conditional format in a flatview table

Bortolotti asked on November 29, 2016

I want to sort and put a conditional format in my flatview table, when the user open the report page.
The examples that I saw in this support doesn´t work for me. I don´t have biggest skill to do this.

My source code:
var Labels = {CONNECT: “Conectar”};
dataSourceType: “ocsv”,
filename: “http://localhost/to/pages/ajaxCarregaDados.php”,
flatView: true,
showTotals: false,
showGrandTotals: false,
configuratorActive: false,
conditions: [{
   measure: “[Measures].[Probabilidade]”,
   formula: ‘if(#value > 1, “trueStyle”)’,
   trueStyle: {backgroundColor: red}
rows: [{uniqueName: “Nome”}],
columns: [{uniqueName: “[Measures]”}],
measures: [
{uniqueName: “Probabilidade”, sortName: “desc”},
{uniqueName: “%”, type: “string”},
{uniqueName: “Idade”, type: “number”},
{uniqueName: “Km”, type: “number”},
{uniqueName: “Treinamento”, type: “number”},
{uniqueName: “Data information”, type: “number”}
licenseKey: “XXX”
false, // toolbar
Please, I need some help quickly.

2 answers

Roman Petrusha Flexmonster December 1, 2016

Hi Bortolotti,
Here is a working sample for you
Does it help?

Bortolotti December 1, 2016

Almost there… The sort needs to be done in the “price” column and the “price” values are decimal or in my case, is a percentual number.
I will try your example and I will give you my feedback.
Thanks for now.

Please login or Register to Submit Answer