Need a special offer?Find out if your project fits.
+

Limit row/column selection to 1 field

Answered
Patrick Berens asked on March 23, 2021

Hi ya,
We are trying to launch a dashboard feature using Flexmonster's API Source. However, we would like to limit it, at least initially, to only support pivot tables with one row and/or one column field. We don't want to support something like this:
 
Rows: field_1, field_2
Columns: field_3, field_4
Values: price
 
We'd prefer to only allow the following, at most:
Rows: field_1
Columns: field_3
Values: price
 
Is that possible in Flexmonster's configuration?
 
If not, would it be possible to return some kind of error message to Flexmonster so it is displayed if a request is passed up with more than one Rows/Columns?
 
Thanks,
Patrick

3 answers

Public
Illia Yatsyshyn Illia Yatsyshyn Flexmonster March 23, 2021

Hello, Patrick,
 
Thank you for contacting us.
 
Flexmonster does not allow limiting the number of fields in rows/columns by default.
 
However, we have prepared several workarounds that may be helpful in your case.
The first one implies developing a custom Field List. This would allow accurate control over the configured slice before applying it to the component. We have prepared the JSFiddle to demonstrate this approach: https://jsfiddle.net/flexmonster/ehu47fjm/. Try selecting more than one field to columns/rows in order to face the restriction. Please note that this example is developed only for the demonstration and may need to be customized/complemented in order to fit your needs.
 
Another approach is to scan the report for any changes in order to spot the unwanted situation. Next, you can either notify the user or automatically remove the desired number of columns/rows from the report.
Please see the JSFiddle demonstrating this approach: https://jsfiddle.net/flexmonster/zdf9vwm6/. Try selecting more than one field to columns/rows in order to face the restriction. Flexmonster will display the alert and truncate extra fields automatically.
 
Please let us know if this helps.
We are looking forward to hearing from you.
 
Best regards,
Illia

Public
Illia Yatsyshyn Illia Yatsyshyn Flexmonster March 31, 2021

Hello, Patrick,
 
We are reaching out to ask if the provided solution works well for your case.
 
Our team is looking forward to hearing from you.
 
Regards,
Illia

Public
Illia Yatsyshyn Illia Yatsyshyn Flexmonster April 7, 2021

Hello, Denis,
 
We are wondering if our suggestion was helpful for you.
 
Feel free to contact us in case additional questions on this point arise.
 
Best regards,
Illia

Please login or Register to Submit Answer