json
105 TopicsHow to convert JSON data into Excel table in Power Query
I would like to import the JSON file into Excel, I am using Power Query as I'm not versed in VBA. I would like the output to look like this: The issue I'm having is figuring out how to to transform the data based on my data I have. Below is sample data: { "items": [ { "tableName": "tableA", "count": 1729, "columnNames": [ "id", "createdTime", "updatedTime", "name", "category", "id2", "subject", "text" ], "rows": [ [ "1234567", "2019-02-02T14:54:02Z", "2019-02-02T20:57:32Z", "John Smith", "123", "1234", "Product A - need assistance ", "text field" ], [ "2345678", "2019-02-03T14:54:02Z", "2019-02-03T20:57:32Z", "John Smith", "123", "1234", "Product B help", "Text field" ], etc } The first step was converting the json file to a table, afterwards, I expanded 'value' cell to new rows and did so another time, to get thisimage: From there I further expanded and to get all the values. I tried removing duplicates and transpose but those options are leading to the tabular data I am looking for. How do I go about solving this issue? Thanks for your time.35KViews0likes3CommentsJSON Column width
Hello SharePoint Forum, Hoping you can help with a question Regarding JSON formatting. I’ve got a list with two columns: a single field and a multi-text line that I’m hoping to better format. The issue: In my list (and consequently my page), for new users that haven’t visited the site, the column width isn’t automatically moving it over as far as it could (like by a lot…) I’ve played around with the JSON and have tried width, but it doesn’t seem to actually move the width over. I have to physically drag it over, and then it seems to work – but I don’t want to make each user do that. Anybody been successful doing getting the width of the column to be larger? I’m not a coder, so less is more for a solution. Thanks,24KViews0likes7CommentsUsing JSON to format a SharePoint List
Hello, I know a tiny bit more than nothing about JSON and had someone give me some code to format my list view so it looks less like a spreadsheet and more like a message board. I'm being asked to get rid of the Left/Right scroll bar at the bottom and make the text dynamically wrapped instead. Here is what users are seeing: The department head says having the text cut off on the right side is inconvenient for how this list is being used. They want the column width to not exceed the page width (within reason) and for the row height to increase as needed. I've been using online and print resources to find a solution, but I'm in over my head. Here is the code I was given: { "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json", "elmType": "div", "style": { "box-sizing": "border-box", "padding": "0 2px" }, "attributes": { "class": "" }, "children": [ { "elmType": "span", "style": { "line-height": "16px", "height": "14px" }, "attributes": { "iconName": "", "class": "" } }, { "elmType": "span", "style": { "overflow": "hidden", "text-overflow": "ellipsis", "padding": "0 3px" }, "txtContent": "[$Note]", "attributes": { "class": "sp-field-fontSizeLarge" } } ] } Can anyone tell me what I need to change, add or delete? Or can anyone point me toward a resource I can use to figure this on my own? Your assistance is much appreciated, thank you.Solved23KViews0likes2CommentsHow to create a tile view on modern SharePoint list: how do I adapt JSON code found
Goal: to create cards based on a list that when clicked go to a desired page. I have found the following instructions: Navigate to your list On the right side of the command bar click on All Items and then Format this View Format view: Select Gallery Click Advance mode. Paste in JSON code and click Save I found the JSON code below that provided the desired functionality: converting the entire tile/card from a list into a clickable link. However, some of the columns are not being displayed. Title displays; Cover (an image), Notes, and Link don't display. - Cover = hyperlink or picture - Notes = multiple lines of text - Link = hyperlink or picture - Title = single line of text In full disclosure, I don't know JavaScript or JSON, however I can follow clear instructions well. Your help is greatly appreciated. { "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/tile-formatting.schema.json", "height": 337, "width": 254, "hideSelection": false, "fillHorizontally": true, "formatter": { "elmType": "div", "attributes": { "class": "sp-card-container" }, "children": [ { "elmType": "a", "attributes": { "class": "sp-card-defaultClickButton", "role": "presentation", "href": "[$Link]" }, "customRowAction": { "action": "defaultClick" } }, { "elmType": "div", "attributes": { "class": "ms-bgColor-white sp-css-borderColor-neutralLight sp-card-borderHighlight sp-card-subContainer" }, "children": [ { "elmType": "div", "attributes": { "class": "sp-card-previewColumnContainer" }, "children": [ { "elmType": "div", "attributes": { "class": "sp-card-imageContainer" }, "children": [ { "elmType": "div", "attributes": { "class": "ms-bgColor-neutralLight sp-card-imagePreviewBackground" }, "children": [ { "elmType": "img", "style": { "display": "=if([$Cover] == '', 'none', '')" }, "attributes": { "src": "=[$Cover.serverUrl] + [$Cover.serverRelativeUrl]", "title": "[$Cover.fileName]", "class": "sp-card-imagePreview" } }, { "elmType": "svg", "style": { "display": "=if([$Cover] == '', '', 'none')" }, "attributes": { "preserveAspectRatio": "none", "viewBox": "0 0 210 105", "class": "sp-card-defaultImage ms-bgColor-themeLighter" }, "children": [ { "elmType": "path", "attributes": { "id": "sp-card-defaultImage-path1", "d": "M0 25.7896L126.5 53.8817L96 105H0V25.7896Z" } }, { "elmType": "path", "attributes": { "id": "sp-card-defaultImage-path2", "d": "M96 105L158.7 0H204C207.314 0 210 2.68629 210 6V105H96Z" } } ] }, { "elmType": "svg", "style": { "display": "=if([$Cover] == '', '', 'none')" }, "attributes": { "class": "sp-card-defaultImageOverlay", "viewBox": "0 0 40 40" }, "children": [ { "elmType": "path", "attributes": { "id": "sp-card-defaultImageOverlay-path1", "d": "M 4 4 H 37 V 37 H 4 L 4 4" } }, { "elmType": "path", "attributes": { "id": "sp-card-defaultImageOverlay-path2", "d": "M24.17 21.151L21.66 24.741L17.54 19.191C17.3322 18.914 17.0062 18.751 16.66 18.751C16.3137 18.751 15.9877 18.914 15.78 19.191L9.20997 28.051C8.97126 28.3786 8.93818 28.813 9.12453 29.173C9.31088 29.533 9.68465 29.7567 10.09 29.751H29.91C30.3085 29.7562 30.6769 29.5396 30.866 29.1887C31.0551 28.8378 31.0335 28.411 30.81 28.081L26 21.151C25.7991 20.8407 25.4546 20.6533 25.085 20.6533C24.7153 20.6533 24.3709 20.8407 24.17 21.151Z" } }, { "elmType": "path", "attributes": { "id": "sp-card-defaultImageOverlay-path3", "d": "M28 15.751C29.3807 15.751 30.5 14.6317 30.5 13.251C30.5 11.8703 29.3807 10.751 28 10.751C26.6193 10.751 25.5 11.8703 25.5 13.251C25.5 14.6317 26.6193 15.751 28 15.751Z" } }, { "elmType": "path", "attributes": { "id": "sp-card-defaultImageOverlay-path4", "d": "M4.5 37.251H35.5C36.3284 37.251 37 36.5794 37 35.751V4.75098C37 3.92255 36.3284 3.25098 35.5 3.25098H4.5C3.67157 3.25098 3 3.92255 3 4.75098V35.751C3 36.5794 3.67157 37.251 4.5 37.251ZM4 4.75098C4 4.47483 4.22386 4.25098 4.5 4.25098H35.5C35.7761 4.25098 36 4.47483 36 4.75098V35.751C36 36.0271 35.7761 36.251 35.5 36.251H4.5C4.22386 36.251 4 36.0271 4 35.751V4.75098Z" } } ] } ] } ] } ] }, { "elmType": "div", "attributes": { "class": "sp-card-displayColumnContainer" }, "children": [ { "elmType": "p", "attributes": { "title": "[$Title]", "class": "ms-fontColor-neutralPrimary sp-card-content sp-card-highlightedContent" }, "txtContent": "=if ([$Title] == '', '–', [$Title])" } ] }, { "elmType": "div", "attributes": { "class": "sp-card-displayColumnContainer" }, "children": [ { "elmType": "div", "attributes": { "class": "sp-card-content sp-card-formatterRef" }, "children": [ { "columnFormatterReference": "[$Topic_x0020_Group]" } ] } ] } ] } ] } }19KViews0likes2CommentsFlow and using JSON to post in MS Teams?
I am new to JSON and do not understand how to use it fully. So far i have only added a bit of text with JSON posting from Flow to Microsoft Teams. But all i get to work is {"text":"some random text"} As soon as i try to add another textblock or anything else that i google. Flow wont accept it. Is there limits to what i can use from flow? Using the app builder in Microsoft Teams. I can generate this code. But this wont work atall when i try to use it in Flow { "attachments": [ { "contentType": "application/vnd.microsoft.card.hero", "content": { "title": "some title", "subtitle": "some subtitle", "text": "some random text", "images": [], "buttons": [] } } ] }SharePoint List - Custom JSON Column Formatting - Office UI Fabric Icon for Any Selected Value?
Hi all - first post of hopefully not too many! I manage a number of SharePoint lists and am familar with using basic JSON formatting to display custom colours and icons from the Office UI Fabric. If I have a choice field, I know how to show a given icon from the Office UI Fabric, but is there a way to show the same icon regardless of the value displayed in the field? For example, if you had a choice field called 'Location' and you had 100 locations to choose from, you might want the 'POI' or 'MapPin' icon to display regardless of which option is chosen? To write the JSON for each and every option just seems so long! Hope somebody can help! Many thanks in advance18KViews0likes1CommentJSON Formatting Referencing Calculated Date Column on SharePoint List
I'm hoping someone can help me so I'm not banging my head on the wall trying to find what I think should be a very simple answer. Basic scenario: I want to color the text in a choice column based on the date shown in a calculated date column. This works perfectly fine when referencing a date column, but not when referencing a calculated date column. It seems the issue is JSON doesn't read the column as a date value and searching extensively on how to have it read it as a date value I can't find anything. Here is an example of the JSON code: { "$schema": "http://columnformatting.sharepointpnp.com/columnFormattingSchema.json", "elmType": "div", "txtContent": "@currentField", "style": { "color": { "operator": "?", "operands": [ { "operator": "<=", "operands": [ "[$CalculatedDateColumn]", "@now" ] }, "#a80000", "" ] } } } It works if the italicized is a date column and I'm guessing there's a way to have JSON treat it as a date column, right?Solved16KViews0likes2CommentsJSON column formatting extract first and last name from @me
Can we extract other information from me? For example, rather than getting the email address, I'd like to only display the First and/or Last names. I tried @me.givenname and others but didn't work. "elmType": "button", "customRowAction": { "action": "setValue", "actionInput": { "Status": "=if([$Counter] == 1, 'Approved by ' + @me, [$Status])",13KViews0likes5Comments