Can’t remember what the syntax is when using Field Calculator with SQL to populate a string field. I’m just trying to populate a field with the word “Yes” but enclosing that word within single or double quotes throws an error.
I remember the solution was simple when I last did this a couple of years ago, just not simple enough for me to recall.
Solved! Go to Solution.
You don't need to select the field, that's only if you want to reference the current field or other fields in your code block.
from your screenshot it looks like you have directional single quotes (unsure if this is just the case of the ipad post-formatting them). I recon it doesn't understand this unicode character. Try to find the straight single quote on your keypad 'Yes' or:
This article seems to have the fix How to Type Straight Quotes on iPad (osxdaily.com)
Should be as you described. You sure your field type is Text/String? 'Yes' single quotes should be doing the trick.
I thought so, but getting an error. Maybe because I’m trying to do this from home on an iPad. I’ll try again tomorrow from a real computer.
It might simply be that I need to select the field from the left column, and not all the fields are showing on my iPad without an ability to scroll down.
You don't need to select the field, that's only if you want to reference the current field or other fields in your code block.
from your screenshot it looks like you have directional single quotes (unsure if this is just the case of the ipad post-formatting them). I recon it doesn't understand this unicode character. Try to find the straight single quote on your keypad 'Yes' or:
This article seems to have the fix How to Type Straight Quotes on iPad (osxdaily.com)
Yup, that was the problem. Thanks David.