Kindly assist with setting maximum value for WPdatatable calculation column. Is it possible to do this ? for example, if column C multiples column A and column B, can I set the limit/ max of the value for column C to 100 ? i.e. if users entered 5 in column A and 30 in column B, I would like the calculation column C to give error since the product of A and B is greater than 100.
Good day,
Kindly assist with setting maximum value for WPdatatable calculation column. Is it possible to do this ? for example, if column C multiples column A and column B, can I set the limit/ max of the value for column C to 100 ? i.e. if users entered 5 in column A and 30 in column B, I would like the calculation column C to give error since the product of A and B is greater than 100.
Regards
Hi, Thabang.
It is not possible to add a "has to be less than 100" as part of a Formula Column,
because in the Formulas of our Plugin, you can only use Basic math operations.
I just made a Test, for example, if i try something like this :
Then the Formula will 'sanitize' the "less than" symbol, since it is not a basic math operation.
But there is a workaround to achieve this in a table.
For example, you can add a Conditional Rule to this Formula Column,
something like : if the value in any cell gets higher than 100, then transform the content of the cell to ( any text you like) :
"Error. This value must not be higher than 100".
Here is an example screenshot how i made this Rule on my Formula Column :
You can see more about our Conditional Formatting, and all the available options you can use there.
https://wpdatatables.com/documentation/table-features/conditional-formatting/
Let me know if that helps.
Kind Regards,
Miloš Jovanović
[email protected]
Rate my support
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables