User Profile
jdiorio
Copper Contributor
Joined 7 years ago
User Widgets
Recent Discussions
Currency Field - Formatting with JSON
Hi everyone. I am formatting a SharePoint On-Line list with JSON and have a column that is set-up in SharePoint as a 'Currency' column. In standard list view without any JSON applied it shows in proper $XX,XXXX.XX format. I'd like to get it shown the same way after I've applied JSON to the list, but can't seem to get it quite right. The closest I can get is to manually ad a '$' into the "txtContent" span, but it doesn't then show any of the comma delimiters or anything. I've attached what I've done so far and what it results in. Is there a better way for me to cost this into the JSON?7.3KViews0likes1CommentJSON - Formatting a Person/Group Column
Hi everyone, and thanks in advance for any help you may be able to provide! I'm formatting a SharePoint On-Line List view with JSON. I am trying to pull into the JSON formatting a Column titled 'SALES (LEAD CONTACT)'. Looking at the URL, the natural name for this column is 'Sales_x0020__x0028_Lead_x0020_Co'. Below is an unformatted view with the column pulling in correction. However when I try to bring in that column in my JSON formatted List view, it doesn't pull in this Sales Contact information but instead just shows 'Object', per below:  Code shown below. It's hard to see my highlighting, but the applicable part is at the bottom:  One point that may be important: The data in this SharePoint On-Line List that I'm formatting is being placed their via a Power Automate Flow. However, as can be seen in the first screenshot, it's definitely there. Any ideas what may be going on?2.6KViews0likes0CommentsRe: JSON to Format a SharePoint List
Hi RobElliott ! Along with misspelling Customer, I also had completely screwed up the syntax of the rest of that line. My original code left off the last parens after block on line 84 and I believe a single quote, along with misspelling CUSTOMER. Thanks for pointing me in the right direction.....works great now!!5.1KViews0likes0CommentsRe: JSON to Format a SharePoint List
Also, following up on my above post that has the corrected Column Name but that still shows a blank List, the code below is my last version that does still work, just in case that help (??): { "$schema": "https://developer.microsoft.com/json-schemas/sp/view-formatting.schema.json", "hideSelection": true, "hideColumnHeader": true, "rowFormatter": { "elmType": "div", "_comment_": "MAIN DIV", "attributes": { "class":"ms-bgColor-neutralTertiaryAlt" }, "style": { "display":"flex", "flex-wrap":"wrap", "align-items":"stretch", "flex-direction":"row", "padding":"20px", "margin-bottom":"16px", "max-width":"930px", "border-radius":"8px" }, "children": [ { "elmType": "div", "_comment_": "FO, Machine and Customer", "style": { "flex-grow": "1", "display": "flex", "flex-direction": "column", "flex-wrap": "nowrap", "align-items": "left", "max-width": "360px", "min-width": "205px" }, "children": [ { "elmType": "div", "_COMMENT_":"FO AND MACHINE", "style":{ "display":"block", "font-size":"15px", "font-weight":"normal" }, "children": [ { "elmType": "span", "txtContent": "=[$Title]", "style": { "display": "=if([$Title] == '', 'none', 'block')" }, "attributes": { "class": "ms-fontSize-l ms-fontWeight-semibold ms-fontColor-neutralPrimary" } }, { "elmType": "span", "txtContent": "[$MACHINE]", "style": { "display": "=if([$MACHINE] == '', 'none', 'block')" } }, { "elmType": "span", "txtContent": "='CUSTOMER' + [$CUSTOMER]", "style": { "display": "=if([$CUSTOMER] == '', 'none', 'block')", "padding-top": "20px" } } ] } ] }, { "elmType": "div", "_comment_": "DIV TWO", "style": { "flex-grow":"1", "display":"flex", "flex-direction":"column", "flex-wrap":"nowrap", "align-items":"stretch", "max-width":"260px" } }, { "elmType": "div", "_comment_": "DIV THREE", "style":{ "flex-grow": "1", "display": "flex", "flex-direction": "column", "align-items": "left", "max-width": "310px", "min-width": "155px" }, "children": [ { "elmType": "div", "_COMMENT_":"Sales Approver", "style":{ "display":"block", "font-size":"15px", "font-weight":"normal" }, "children": [ { "elmType": "span", "txtContent":"[$Sales_x0020_Approver]", "style":{ "padding-right":"5px" } }, { "elmType": "span", "txtContent":"[$Sales_x0020_Approval_x0020_Comme]", "style":{ "padding-right":"5px" } } ] }, { "elmType": "div", "_COMMENT_":"Finance Approver", "style":{ "display":"block", "font-size":"15px", "font-weight":"normal" }, "children": [ { "elmType": "span", "txtContent":"[$Finance_x0020_Approver]", "style":{ "padding-right":"5px" } }, { "elmType": "span", "txtContent":"[$Finance_x0020_Workflow_x0020_Com]", "style":{ "padding-right":"5px" } } ] } ] } ] } }5.2KViews0likes2CommentsRe: JSON to Format a SharePoint List
Hi RobElliott ! Well, the 'good' news was that I did indeed have a Column reference misspelled. I corrected, and was really hoping that would correct, but even after that correction, when I paste the JSON into the List formatting I'm still getting presented with a blank List. This problem only started after I created the DIV on Line 72 titled "_COMMENT_":"CUSTOMER INFO". It happened that the misspelled column reference was in this section on Line 84, but again, even after that correction I'm still getting the blank list. Before I messed around in that area however by trying to break out the 'FO, Machine and Customer' DIV from the 'CUSTOMER INFO' DIV, everything seemed to be working correctly and pulling in the appropriate SharePoint information 😞 Pasted below is the code with the Column reference correctly spelled. I went through and verified that the other column references are correctly referencing SharePoint Column names. { "$schema": "https://developer.microsoft.com/json-schemas/sp/view-formatting.schema.json", "hideSelection": true, "hideColumnHeader": true, "rowFormatter": { "elmType": "div", "_comment_": "MAIN DIV", "attributes": { "class":"ms-bgColor-neutralTertiaryAlt" }, "style": { "display":"flex", "flex-wrap":"wrap", "align-items":"stretch", "flex-direction":"row", "padding":"20px", "margin-bottom":"16px", "max-width":"930px", "border-radius":"8px" }, "children": [ { "elmType": "div", "_comment_": "FO, Machine and Customer", "style": { "flex-grow": "1", "display": "flex", "flex-direction": "column", "flex-wrap": "nowrap", "align-items": "left", "max-width": "360px", "min-width": "205px" }, "children": [ { "elmType": "div", "_COMMENT_":"FO AND MACHINE", "style":{ "display":"block", "font-size":"15px", "font-weight":"normal" }, "children": [ { "elmType": "span", "txtContent": "=[$Title]", "style": { "display": "=if([$Title] == '', 'none', 'block')" }, "attributes": { "class": "ms-fontSize-l ms-fontWeight-semibold ms-fontColor-neutralPrimary" } }, { "elmType": "span", "txtContent": "[$MACHINE]", "style": { "display": "=if([$MACHINE] == '', 'none', 'block')" } }, { "elmType": "span", "txtContent": "='CUSTOMER' + [$CUSTOMER]", "style": { "display": "=if([$CUSTOMER] == '', 'none', 'block')", "padding-top": "20px" } } ] }, { "elmType": "div", "_COMMENT_":"CUSTOMER INFO", "style":{ "display":"block", "font-size":"15px", "font-weight":"normal" }, "children": [ { "elmType": "span", "txtContent":"=[$CUSTOMER]", "style":{ "display":"=if([$CUSTOMER]=='','none','block", "padding-top":"20px" } } ] } ] }, { "elmType": "div", "_comment_": "DIV TWO", "style": { "flex-grow":"1", "display":"flex", "flex-direction":"column", "flex-wrap":"nowrap", "align-items":"stretch", "max-width":"260px" } }, { "elmType": "div", "_comment_": "DIV THREE", "style":{ "flex-grow": "1", "display": "flex", "flex-direction": "column", "align-items": "left", "max-width": "310px", "min-width": "155px" }, "children": [ { "elmType": "div", "_COMMENT_":"Sales Approver", "style":{ "display":"block", "font-size":"15px", "font-weight":"normal" }, "children": [ { "elmType": "span", "txtContent":"[$Sales_x0020_Approver]", "style":{ "padding-right":"5px" } }, { "elmType": "span", "txtContent":"[$Sales_x0020_Approval_x0020_Comme]", "style":{ "padding-right":"5px" } } ] }, { "elmType": "div", "_COMMENT_":"Finance Approver", "style":{ "display":"block", "font-size":"15px", "font-weight":"normal" }, "children": [ { "elmType": "span", "txtContent":"[$Finance_x0020_Approver]", "style":{ "padding-right":"5px" } }, { "elmType": "span", "txtContent":"[$Finance_x0020_Workflow_x0020_Com]", "style":{ "padding-right":"5px" } } ] } ] } ] } }5.2KViews0likes3CommentsJSON to Format a SharePoint List
Hi everyone, and thanks in advance for any help you may have. It is very much appreciated! I am VERY much a novice to using JSON for formatting, and am not a coder by trade. That being said, I've been using JSON to format a SharePoint On-Line list that I have. Up until my current version, things had been progressing towards what I wanted. This included having multiple DIVs underneath a DIV towards the end of my code. However when I tried to do the same thing at the beginning, the List now completely blanks out. I'm pretty sure it's a stupid rookie mistake somewhere towards the beginning of the code, but I've been wholly unsuccessful in tracking it down. Does anything pop out at anyone here on what may be causing the issue? { "$schema": "https://developer.microsoft.com/json-schemas/sp/view-formatting.schema.json", "hideSelection": true, "hideColumnHeader": true, "rowFormatter": { "elmType": "div", "_comment_": "MAIN DIV", "attributes": { "class":"ms-bgColor-neutralTertiaryAlt" }, "style": { "display":"flex", "flex-wrap":"wrap", "align-items":"stretch", "flex-direction":"row", "padding":"20px", "margin-bottom":"16px", "max-width":"930px", "border-radius":"8px" }, "children": [ { "elmType": "div", "_comment_": "FO, Machine and Customer", "style": { "flex-grow": "1", "display": "flex", "flex-direction": "column", "flex-wrap": "nowrap", "align-items": "left", "max-width": "360px", "min-width": "205px" }, "children": [ { "elmType": "div", "_COMMENT_":"FO AND MACHINE", "style":{ "display":"block", "font-size":"15px", "font-weight":"normal" }, "children": [ { "elmType": "span", "txtContent": "=[$Title]", "style": { "display": "=if([$Title] == '', 'none', 'block')" }, "attributes": { "class": "ms-fontSize-l ms-fontWeight-semibold ms-fontColor-neutralPrimary" } }, { "elmType": "span", "txtContent": "[$MACHINE]", "style": { "display": "=if([$MACHINE] == '', 'none', 'block')" } }, { "elmType": "span", "txtContent": "='CUSTOMER' + [$CUSTOMER]", "style": { "display": "=if([$CUSTOMER] == '', 'none', 'block')", "padding-top": "20px" } } ] }, { "elmType": "div", "_COMMENT_":"CUSTOMER INFO", "style":{ "display":"block", "font-size":"15px", "font-weight":"normal" }, "children": [ { "elmType": "span", "txtContent":"=[$CUSTOMER]", "style":{ "display":"=if([$CUSOMTER]=='','none','block", "padding-top":"20px" } } ] } ] }, { "elmType": "div", "_comment_": "DIV TWO", "style": { "flex-grow":"1", "display":"flex", "flex-direction":"column", "flex-wrap":"nowrap", "align-items":"stretch", "max-width":"260px" } }, { "elmType": "div", "_comment_": "DIV THREE", "style":{ "flex-grow": "1", "display": "flex", "flex-direction": "column", "align-items": "left", "max-width": "310px", "min-width": "155px" }, "children": [ { "elmType": "div", "_COMMENT_":"Sales Approver", "style":{ "display":"block", "font-size":"15px", "font-weight":"normal" }, "children": [ { "elmType": "span", "txtContent":"[$Sales_x0020_Approver]", "style":{ "padding-right":"5px" } }, { "elmType": "span", "txtContent":"[$Sales_x0020_Approval_x0020_Comme]", "style":{ "padding-right":"5px" } } ] }, { "elmType": "div", "_COMMENT_":"Finance Approver", "style":{ "display":"block", "font-size":"15px", "font-weight":"normal" }, "children": [ { "elmType": "span", "txtContent":"[$Finance_x0020_Approver]", "style":{ "padding-right":"5px" } }, { "elmType": "span", "txtContent":"[$Finance_x0020_Workflow_x0020_Com]", "style":{ "padding-right":"5px" } } ] } ] } ] } }Solved5.3KViews0likes6CommentsRe: Approval Flow - Approval Status - why can't this be updated?
Hi there Tanya Denton...can you provide in some detail how you got this to work? I've been pulling my hair out trying to get the Approval Status flag to change depending on the response sent out from the Flow approval e-mail, and I can't seem to get it to work. I am using the 'Set content approval status' that Michal Golan mentioned, but it doesn't seem to work. What am I doing wrong?!?! :)
Groups
Recent Blog Articles
No content to show