We have a column that has 00.xx and 0.x numbers in it. The default sorting seems to place the 00.x in random spots. We would need anything with 00.x to be above 0.x.
The related URL will show an example in the "Maturity" column. Attached is an image as well.
Unfortunately, what you're looking for to achieve cannot be successfully done.
That column cannot be created as a float column, which has correct numerical sorting, but you created it as a string-type column. String type columns have alphabetical sorting, and they cannot follow the same rules numerical columns follow (integers and floats).
What would you recommend me do to achieve what I would want? Would turning all of the data from the excel sheet to a sql query be effective for what I want?
The format of the floats cannot be adjusted to display values like that. What you can try, though, would be to save the data as Floats, which would then use the correct sorting.
If you do that, you would need to create conditional formatting rules for all your entries, so they are replaced by strings. Your front-end users would see the strings, like 00.xx and 0.x, while actual data will be floats.
This was close to getting a solution for this. I changed all of the values in the Excel doc to floats, then applied conditional formatting for each entry. This was very close, but there were two issues that I was not able to resolve.
One condition will overwrite the other in this specific case: Original Values: .0008 & .008; Conditional Formatting: if(x=.0008){show 00.8}, if(x=.008){show 0.8}. The first condition will format the values correctly, but the second one will overwrite the first condition.
The second issue is with the slider that filters the table shown on the page. The slider values would need to show what the conditional formatting would be showing, not the value stored in the Excel doc.
Unfortunately, that's something we cannot influence. Basically, float columns can only have one length, so if you set it to have 4 decimal places, 0.008 should come out as 0.0080. I'm not sure why you're not seeing it like that.
Conditional formatting rules can overwrite each other if one has higher priority, and that's not something I can help you with unfortunately. As for the slider - it is always going to show the actual values, not the masked ones.
We have a column that has 00.xx and 0.x numbers in it. The default sorting seems to place the 00.x in random spots. We would need anything with 00.x to be above 0.x.
The related URL will show an example in the "Maturity" column. Attached is an image as well.
This table is displayed from an Excel document.
Hello Austin
Thank you for your purchase.
Unfortunately, what you're looking for to achieve cannot be successfully done.
That column cannot be created as a float column, which has correct numerical sorting, but you created it as a string-type column. String type columns have alphabetical sorting, and they cannot follow the same rules numerical columns follow (integers and floats).
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
Hey Aleksander,
What would you recommend me do to achieve what I would want? Would turning all of the data from the excel sheet to a sql query be effective for what I want?
Thanks for the response earlier.
Hello again Austin
Unfortunately, it wouldn't help.
The format of the floats cannot be adjusted to display values like that. What you can try, though, would be to save the data as Floats, which would then use the correct sorting.
If you do that, you would need to create conditional formatting rules for all your entries, so they are replaced by strings. Your front-end users would see the strings, like 00.xx and 0.x, while actual data will be floats.
That's the only way you can achieve this.
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
Hello Aleksandar,
This was close to getting a solution for this. I changed all of the values in the Excel doc to floats, then applied conditional formatting for each entry. This was very close, but there were two issues that I was not able to resolve.
One condition will overwrite the other in this specific case: Original Values: .0008 & .008; Conditional Formatting: if(x=.0008){show 00.8}, if(x=.008){show 0.8}. The first condition will format the values correctly, but the second one will overwrite the first condition.
The second issue is with the slider that filters the table shown on the page. The slider values would need to show what the conditional formatting would be showing, not the value stored in the Excel doc.
Hi again Austin
Unfortunately, that's something we cannot influence. Basically, float columns can only have one length, so if you set it to have 4 decimal places, 0.008 should come out as 0.0080. I'm not sure why you're not seeing it like that.
Conditional formatting rules can overwrite each other if one has higher priority, and that's not something I can help you with unfortunately. As for the slider - it is always going to show the actual values, not the masked ones.
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