sp-dev-docs icon indicating copy to clipboard operation
sp-dev-docs copied to clipboard

The code shown doesn't work

Open duncanspeidel opened this issue 7 years ago • 5 comments

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.

duncanspeidel avatar Sep 20 '19 20:09 duncanspeidel

Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.

msft-github-bot avatar Sep 20 '19 20:09 msft-github-bot

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

andrewconnell avatar Sep 22 '19 11:09 andrewconnell

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.

msft-github-bot avatar Sep 29 '19 12:09 msft-github-bot

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.

msft-github-bot avatar Oct 06 '19 14:10 msft-github-bot

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

msft-github-bot avatar Jan 23 '20 12:01 msft-github-bot