Comments (10)
Turn debugMode off to suppress this error:
"debugMode": false
from list-formatting.
Thanks. This works!
from list-formatting.
I'm having the same type of issue, but with a lookup field and a person field - when the fields are blank, the records aren't returned in the (formatted) view at all. I noticed the error when I had a simple text element:
{
"elmType": "span",
"txtContent": "[$TeamCategoryLookup.lookupValue]"
}
I've tried all kinds of options - including turning debug mode off and using a lot of conditional statements to set it to a blank value if it's empty. Unfortunately nothing I've tried works, including the following:
"txtContent": "= if(ToString([$TeamCategoryLookup.lookupValue])=='', '',[$TeamCategoryLookup.lookupValue])"
"txtContent": "= if(ToString([$TeamCategoryLookup])=='', '',[$TeamCategoryLookup.lookupValue])"
"txtContent": "= if(isEmpty([$TeamCategoryLookup.lookupValue]), '',[$TeamCategoryLookup.lookupValue])"
"txtContent": "= if(isEmpty([$TeamCategoryLookup]), '',[$TeamCategoryLookup.lookupValue])"
"txtContent": "= if(isNull([$TeamCategoryLookup.lookupValue]), '',[$TeamCategoryLookup.lookupValue])"
"txtContent": "= if(isNull([$TeamCategoryLookup]), '',[$TeamCategoryLookup.lookupValue])"
"txtContent": "= if(isBlank([$TeamCategoryLookup.lookupValue]), '',[$TeamCategoryLookup.lookupValue])"
"txtContent": "= if(isBlank([$TeamCategoryLookup]), '',[$TeamCategoryLookup.lookupValue])"
"txtContent": "= if(isBlank(ToString([$TeamCategoryLookup.lookupValue])), '',[$TeamCategoryLookup.lookupValue])"
"txtContent": "= if(isBlank(ToString([$TeamCategoryLookup])), '',[$TeamCategoryLookup.lookupValue])"
Any ideas? (as a side note, should I be using the operator style instead of ifs?)
from list-formatting.
Quick question for you @ErikSavetheCrew, is your lookup field pointing a person field? Wanted to confirm before I did some testing for ya. :)
from list-formatting.
@PopWarner It's not, it's just pointing at some text values in another list. I mentioned the people field because I think I'm having the same issue with a people field (it's hard to say for certain, but it might make sense because they're both objects).
I've attached the full code if it's helpful (the problem fields are [$T1Assignee] and [$TeamCategoryLookup]). It's a little buggy pulling records in general right now (it won't show certain records until filters are selected on the list, and some things don't appear at all), but after reviewing what's in the records, I think it's this object issue that's at the root of it.
Appreciate any ideas you come up with!
from list-formatting.
@ErikSavetheCrew Great...Thank you. I'll try to take a look in my tenant and see what I see as well. :)
from list-formatting.
@ErikSavetheCrew, quick question, when you say "when the fields are blank", do you mean the lookup field in the lookup list is blank or do you mean the list that your applying the ViewFormatting to has a list item, where you have not selected anything from the lookup field?
I'm trying to mimic the scenario, wanted to make sure I'm testing exactly as you are.. :)
from list-formatting.
from list-formatting.
@ErikSavetheCrew Thanks!!!
So I started with a VERY simple couple of list items and lists. I've attached my LF JSON.
In the picture, it seemed to work for me. The first list item is one where I provided a title AND selected from the lookup. The second is where I provided a title, but NOT a lookup choice. They both seem to show up for me using the attached JSON.
Curious if the attached JSON works for you? My thought is if so, perhaps something else is going on with the larger JSON you attached earlier. I'm happy to keep helping troubleshoot, but figured I'd check with ya and see if this works first? :)
from list-formatting.
Thanks @PopWarner. I'll create another list in a bit to test it out there. To your point about the larger JSON file, this is actually part of a bigger problem, which I was going to post elsewhere (and still can if it makes sense, it's a long, stupid story):
I created a heavily-modified card view based on these tiles as a starting point. The view it's applied to shows every entry in a certain list, and when viewing without any formatting all 277 rows load appropriately (in batches of 50 as specified in the view).
The issue is, when loading the view with formatting on, all the cards will flash on the screen briefly, but then the majority will disappear (except for 3, which I'll called "Green"). I attached a .gif that shows what I mean. Depending on what filters are applied to the view, different amounts of cards will load, so it's not an item limit, and I've had the behavior appear in both Firefox and Chrome. The odd thing about it is that certain cards won't show up initially, but if I open up the sidebar and filter (or use the view filters), more cards will show up after filtering (I'll call those "Yellow").
So I combed through the records to see if it's a particular field that's causing the odd behavior, which is how I ended up here. I realized that records without a value in one of these two fields ([$T1Assignee] and ([$TeamCategoryLookup]) never showed up, no matter how many filters I applied (I'll call these "orange"). Looking even further (and this is kind of hard to word, my apologies), when the view is filtered so that none of these "orange" problematic records are in the subset, every (green and yellow) record loads correctly. So it seems like not only do these problematic records not display, but they keep other (yellow) records from displaying as well.
It's also possible it's something else entirely! Today I've been combing through some more, and when I removed both fields it got glitchy for a second, and then showed the original 3 "green" ones plus some random "orange" ones, and the same behavior while filtering. I about lost my lid. Not sure where I'm going wrong.
from list-formatting.
Related Issues (20)
- Project Gantt Chart - Tasks wider than the screen HOT 2
- FAQ Accordion overwrites sorting/ random order HOT 3
- Project Gantt Chart - Groups and Conditional Formatting HOT 2
- Many Design Bugs after Update in SharePoint HOT 3
- Is my Discussion Board displaying right? HOT 4
- Disable Click Action - Still Opens Item HOT 2
- Bug in "multi-person-reaction" HOT 10
- I have a question about FAQ Accordion HOT 1
- Document Library Approval Status HOT 1
- I have a question about the Discussion Board sample. HOT 3
- date-page-a-day-calendar displays day before in central time zone HOT 2
- Cannot embed video from SharePoint HOT 1
- Displaying a new column which is a hyperlink in list formatting HOT 12
- document-library-thumbnails not all documents are previewing HOT 8
- Unable to update column containing deleted user with setValue HOT 1
- Sample - yesno-icon-color not working as intended HOT 4
- I have a question about honeycomb-link when used with an embedded webpart HOT 2
- I have a question about formatting a column that contains a JSON string HOT 2
- I have a question about JSON code in lists HOT 2
- Generic Gantt chart - Date field cannot be edited HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from list-formatting.