The code shown doesn't work
Hi,
The if statement that checks "Not started" fails. It seems to fail because of the space between Not and started. If I have: if (orientationStageValue == "Not started") { return "<span style='color:red'>" + orientationStageValue + "</span>" } Those with a status of "Not Started" are not shown in Red. If I change the code to have no space in "Not Started" so it becomes "NotStarted" I can check using: if (orientationStageValue == "Notstarted") { return "<span style='color:red'>" + orientationStageValue + "</span>" } and this works. I tried checking using ASCII encode space (Not%20Started) but that didn't work. Is there a string compare function we should use here?
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
- ID: 483f6043-0f8e-17cf-5905-5e6a9b619044
- Version Independent ID: 47268bda-6881-8848-1874-2e621c8c157b
- Content: Add custom client-side rendering to a SharePoint-hosted SharePoint Add-in
- Content Source: docs/sp-add-ins/add-custom-client-side-rendering-to-a-sharepoint-hosted-sharepoint-add-in.md
- Product: sharepoint
- GitHub Login: @spdevdocs
- Microsoft Alias: spdevdocs
Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.
This is an easy thing to test... can you just write the contents of the orientationStageValue? That will tell you what the value is that is returned and if the doc is incorrect.
Might want to go back and check your work though, because the previous step in this tutorial shows the value is actually Not Started: https://docs.microsoft.com/en-us/sharepoint/dev/sp-add-ins/add-custom-columns-to-a-sharepoint-hosted-sharepoint-add-in
This issue has been automatically marked as stale because it has marked as requiring author feedback but has not had any activity for 7 days. It will be closed if no further activity occurs within next 7 days of this comment. Thank you for your contributions to SharePoint Developer activities.
Closing issue due no response from original author. If this issue is still occurring, please open a new issue with additional details. Notice that if you have included another related issue as additional comment on this, please open that also as separate issue, so that we can track it independently.
Issues that have been closed & had no follow-up activity for at least 7 days are automatically locked. Please refer to our wiki for more details, including how to remediate this action if you feel this was done prematurely or in error: Issue List: Our approach to locked issues