When conditional formatting in a string cell, if i were to set the cell content to a number dependent on the contents of the cell, is it possible to then sum this column as it is now entirely populated with integers. An example is if the order is for Apples, I have conditionally formatted this cell to display the number '1' instead. However when I then try to sum this column it returns 0 as it was not an integer column to begin with. Is there any way to get around this? Ideally I'd like to add another column whereby I could conditionally format across columns however I don't believe this feature exists.
Unfortunately what you're looking for to achieve is not possible.
What comes to mind is to add another integer column which will have the default editing value "1". Then, you would be able to include SUM for that Order column (and you can even hide the Item column).
For example, the original table is:
Then, you'd add "%VAR1%" as a predefined filtering value for the Item column:
When displaying the table on front-end, you would use shortcode like [wpdatatable id=7 var1='Apple']:
So, you would be able to change the placeholder through the shortcode, and have the Order column display total orders for that filtered column.
Hi,
When conditional formatting in a string cell, if i were to set the cell content to a number dependent on the contents of the cell, is it possible to then sum this column as it is now entirely populated with integers. An example is if the order is for Apples, I have conditionally formatted this cell to display the number '1' instead. However when I then try to sum this column it returns 0 as it was not an integer column to begin with. Is there any way to get around this? Ideally I'd like to add another column whereby I could conditionally format across columns however I don't believe this feature exists.
Please let me know.
Many thanks,
Zak
Hello Zak
Unfortunately what you're looking for to achieve is not possible.
What comes to mind is to add another integer column which will have the default editing value "1". Then, you would be able to include SUM for that Order column (and you can even hide the Item column).
For example, the original table is:
Then, you'd add "%VAR1%" as a predefined filtering value for the Item column:
When displaying the table on front-end, you would use shortcode like [wpdatatable id=7 var1='Apple']:
So, you would be able to change the placeholder through the shortcode, and have the Order column display total orders for that filtered column.
Kind Regards,
Aleksandar Vuković
[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