5
votes
Accepted
Updating SPFX breaks gulp
In 1.6.0 projects the config/tslint.json file was removed and a new one is created at the root of the solution.
Delete E:\DevEnv\WebParts\react-full-iframe\config\tslint.json. You should also add the ...
5
votes
Accepted
Rest API Post Request Returns '403 Forbidden'
You can directly use the FormDigestValue in the RequestDigest header in Modern pages.
The __REQUESTDIGEST is a hidden HTML element which is not present in modern pages. So, it had tripped up your ...
5
votes
Accepted
REST API How to retrieve the ID of a newly created file
This will return the ID:
/siteURL/_api/web/lists/getbytitle('Documents')/Items?$filter=FileLeafRef eq 'AdventureWorksBikesWithDetails.xlsx'&$select=Id
This will return:
{
"d": {
"...
4
votes
REST calls to different items of single lib return responses with different structures
It seems that you are not sending the same Accept header in all GET requests.
You can set Accept header to:
application/json (your second response)
application/json;odata=nometadata
application/json;...
4
votes
When I open my list on sharepoint, it always opens in quick edit mode. How can I fix this?
It seems that your default view is created using datasheet mode, try to create a view using standard template and then set it as default view.
It will no longer open in quick edit mode.
4
votes
Accepted
Get other field value in JSON column formatting
I've also come across this issue, and although I don't claim any particular expertise, it appears that you need to have the referenced field available to the selected view.
Paul CJ
4
votes
JSON control if @currentfield is empty
You can achieve this using a style tag with a conditional, see below:
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/column-formatting.schema.json",
"elmType": "a",
"txtContent": ...
4
votes
Accepted
Using JSON Formatting Inside Web Parts
Give this a try:
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/column-formatting.schema.json",
"elmType": "div",
"attributes": {
"class": "=if([$Days_x0020_In_x0020_progress]...
4
votes
Accepted
How to utilize if/else condition for JSON column formatting in SharePoint?
You can do it similar to that in Excel :)
You can checkout the below sample to get an idea:
"background-color": "= if([$OtherColumn] == 'Red', 'red',
if([$OtherColumn] == 'Green', 'green',
if([$...
4
votes
Accepted
How to display Persona Card on hover in list using Sharepoint Online view formatting?
Use the defaultHoverField property in JSON as described here:
Use column formatting to customize SharePoint
3
votes
Accepted
JSON conditional format column based on choice from another column
If the source column allows multiple value selections, SharePoint stores those selections as an array of values inside the field. Therefore, matching on a single string value will never succeed ...
3
votes
Accepted
How to increase font size of displayname titles when it comes to JSON formating?
Unfortunately, there are no formatting options available for the form body. The only options are the sections, their names, and the fields for each as you've already got.
2
votes
How to GetListItems as JSON using Powershell with SharePoint Online?
Not PowerShell, a manual way, easier for a one of..
Open a ListView page, displaying all the Items and Fields you need
Open F12 Dev tools
execute JSON.stringify( ctx.ListData ); in the console
...
2
votes
Accepted
Displaying an image from a SharePoint list using Javascript building strings
ID's should be unique,, use class if you want to use the same properties on multiple elements.
In HTML Change <div id="deviceimage"> to <div class="deviceimage">
In JS Change ...
2
votes
Accepted
Swapping an object into an image using Javascript onload
For this, you can make following change in your code.
HTML
Add a container for your image holder, e.g. <div id='imageContainer'></div>, where you want to display the image.
JS
After ...
2
votes
Accepted
How to GetListItems as JSON using Powershell with SharePoint Online?
Your approach is totally ok.
You should change a couple of things to make it work:
For each list item create an object that has all the properties that need to be in json file, put it in the list ...
2
votes
Accepted
Submitting input from HTML Form to a SharePoint list without using Infopath
Found the answer on this page. Thanks for your input.
It appears that the error occurs because the form digest has been expired on the page.
so i used these functions
var webUrl = "https://weburl"
...
2
votes
How to convert CAML query results to JSON with JSOM without looping
Umh, afaik that's not possible. I don't know your reasons for why you can't use REST, but you could try looking into the onExecutingWebRequest etc on the SP.ClientContext object and abort the initial ...
2
votes
Get other field value in JSON column formatting SharePoint Online
Microsoft block the execution of custom markup in calculated fields in SharePoint Online from June 13, 2017 onwards.
You can use the JSON to format the “CAI Vendors” column. Enter the following JSON ...
2
votes
How to get ErrorCode value using jQuery from bellow SPServices xml response
If you want to iterate through the results looking for any errors, then use something like this:
var xml = $($.parseXML( yourXMLstring ));
var errors = xml.find("ErrorCode");
for (var i=0; i<...
2
votes
Accepted
How to style custom formatted column to inherit height of row
It is because it inherits the min-height from its parent element and the content “IDC/GR” is smaller than the minimum height, so the minimum height is applied.
If the content is larger than the ...
2
votes
Accepted
SharePoint Online Version Column Formatting via JSON
We can use the JSON formatting below to achieve it.
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/column-formatting.schema.json",
"elmType": "div",
"style": {
"background-...
2
votes
Accepted
Column Formatting Option not available
You cannot use column formatting using JSON in SharePoint 2013.
Column formatting using JSON is available for SharePoint Online, SharePoint Server 2019, and SharePoint Online Small Business only.
...
2
votes
Accepted
Get certain field from returned JSON object
Please Try using below:
ctx.CurrentItem.Entliehenan[0].title;
There is similar thread on MSDN forum: How to get people picker value using JS Link feature.
Also there is a nice article on Handling ...
2
votes
Accepted
How can JSON column formatting be used to highlight duplicate entries in a column a list?
No.
In column formatting, you cannot access/use the column values from another list item/row.
You can only access the column values from the same list item/row like [$AnotherColumnFromSameRow].
Where ...
2
votes
Accepted
SharePoint JSON tileProps breaks formatting
This view formatting only works in the Tiles view.
The format expects the Title field
The format expects a text column with an internal name of Feedback
The format expects a person column with an ...
2
votes
Accepted
JSON List View Formatting using "Include File". Possible?
There is no such a built-in functionality to reference a JSON file in list view formatting feature. You may consider using following workaround.
Set-PnPView Could apply the json format into the view. ...
2
votes
Accepted
REST API in 'Send a HTTP Request' returning an error
Use $expand to specify the fields where you want to get sub properties. $select is used to indicate which sub properties. It can be pretty confusing.
So your $select needs to specify the sub ...
2
votes
Accepted
Date format in JSON view formatting
Simplest solution is to use toLocaleDateString like this:
{
"rowFormatter": {
"elmType": "span",
"txtContent": "=toLocaleDateString([$Date])"...
2
votes
Accepted
list formatting in SharePoint not working
I rechecked the sample form the link you posted on my tenant and seems to be working fine 🤔
One thing I noticed real quick from your attached screen is that after you applied the view formater you ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
json × 345sharepoint-online × 158
json-formatting × 69
rest × 57
list × 45
javascript × 38
jquery × 26
column-formatting × 26
sharepoint-enterprise × 19
ajax × 19
formatting × 18
column × 17
power-automate × 15
2013 × 14
modern-experience × 14
sharepoint-rest-api × 12
2010 × 10
sharepoint-server × 9
workflow × 9
development × 9
flow × 9
web-services × 8
view-formatting × 8
conditional × 7
sharepoint-addin × 6