-
Notifications
You must be signed in to change notification settings - Fork 820
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Due Date Row Formatting JSON Code #119
Comments
Hi @AHJackson87, happy to help. :) One quick question...are you applying this to a "DueDate" field, which is an actual date field? If so, I noticed you are doing a comparison for your '@currentField', which would be a date, to a number, not a date. If my assumption is right, that your looking to apply this to an actual date field, would this definition work for you? :)
This puts the icon before the date, you might want it after the date based on your post. Let me know if that's the case and I can try to create one for you that does that. :) |
Thanks, Have tried the the code you suggested to with no luck. Is it possible to highlight the whole row rather than just adding an icon in that column? |
Thanks for the quick reply @AHJackson87.. :) When you say no luck, is it the color formatting or the icon not working? Or possibly nothing appears to have changed. To help ensure we are using it the same way, here is how I see it in my list: This is being used as a column formatting definition in the "DueDate" column. Were you applying it the same way? :) To help answer your second question, you can apply a color to the row, but that is applied using the View Formatting strategy. There is a great demo of that available here: |
Closing due to lack of activity. Feel free to reopen as needed, thanks! |
Hi,
Where am i going wrong, new to JSON Coding
Im trying to achieve the following:
{
"$schema": "http://columnformatting.sharepointpnp.com/columnFormattingSchema.json",
"debugMode": true,
"elmType": "div",
"attributes": {
"class": {
"operator": "?",
"operands": [
{
"operator": "<=",
"operands": [
"@currentField",
70
]
},
"sp-field-severity--warning",
""
]
}
},
"children": [
{
"elmType": "span",
"style": {
"display": "inline-block",
"padding": "0 4px"
},
"attributes": {
"iconName": {
"operator": "?",
"operands": [
{
"operator": "<=",
"operands": [
"@currentField",
70
]
},
"Error",
""
]
}
}
},
{
"elmType": "span",
"txtContent": "@currentField"
}
]
}
The text was updated successfully, but these errors were encountered: