Forum Discussion
Json Tool - Looking for a miracle!
Tanya Denton What is it you're looking to know?
- Tanya DentonApr 02, 2019Iron Contributor
timparsons Hi, I suppose I am looking for a tool that will show me how JSON is structured in a really
easy way. For example, I have formatted this column using the out the box tool.
Gone to advanced and copied the JSON out as per the below. Now I want to expand on it i.e. only format if the Action Status = Open and also expand on the date calculations. Actually just pasting it into this message and copying it back out has made it a little easier to understand, however, I would not know how to add in an extra condition. This is why I have said I am looking for a miracle :-)
{
"elmType": "div",
"style": {
"padding": "0 4px"
},
"attributes": {
"class": {
"operator": ":",
"operands": [
{
"operator": "==",
"operands": [
"@currentField",
""
]
},
"",
{
"operator": ":",
"operands": [
{
"operator": "<",
"operands": [
{
"operator": "Date()",
"operands": [
{
"operator": "toDateString()",
"operands": [
"@currentField"
]
}
]
},
{
"operator": "Date()",
"operands": [
{
"operator": "toDateString()",
"operands": [
"@now"
]
}
]
}
]
},
"sp-css-backgroundColor-blockingBackground50",
{
"operator": ":",
"operands": [
{
"operator": "==",
"operands": [
{
"operator": "Date()",
"operands": [
{
"operator": "toDateString()",
"operands": [
"@currentField"
]
}
]
},
{
"operator": "Date()",
"operands": [
{
"operator": "toDateString()",
"operands": [
"@now"
]
}
]
}
]
},
"sp-css-backgroundColor-errorBackground50",
{
"operator": ":",
"operands": [
{
"operator": ">",
"operands": [
{
"operator": "Date()",
"operands": [
{
"operator": "toDateString()",
"operands": [
"@currentField"
]
}
]
},
{
"operator": "Date()",
"operands": [
{
"operator": "toDateString()",
"operands": [
"@now"
]
}
]
}
]
},
"sp-css-backgroundColor-successBackground50",
""
]
}
]
}
]
}
]
}
},
"txtContent": "@currentField"
}- timparsonsApr 02, 2019Brass ContributorHave a read of this page and then watch her video, she's good at explaining it. https://wonderlaura.com/2018/07/18/button-in-sharepoint-list-to-trigger-microsoft-flow/. Her youtube channel is very good.
Let me know if it doesn't help and I'll try and find more info for you.- Tanya DentonApr 02, 2019Iron Contributor
timparsons many thanks Tim I will have an evening of watching and learning :-)