Is there a way to access the short name for a Stat...
# suitescript
b
Is there a way to access the short name for a State? (NY vs New York) I have a custom field of List/Record type that references the standard State list. Using the query module I can get back the id or the full name by specifying the fieldContext type. I'm hoping to not have to stick a lookup in my script to go from full name to short name.
t
is your list/record has the short name? if yes, you can try source & filtering of the field
s
the
id
for a state is the abbreviated name - actually I mixed this up - tis the countries that use their ISO abbreviation as the id. States tie to countries using that abbreviation but they have their own internal id. Anyway, the static NFT list is super easy to use if you find it adequate for your needs.
you can do a search to pull all states
b
@Shawn Talbert Just saw your correction on the id which matches what I was seeing. I should have checked the search option but missed that because I was looking at Analytics datasets (where it doesn't seem to be exposed). I'll try the search route or SuiteQL like the NFT page suggests. Thanks for the reference.
s
The SuiteQL query to pull the list is VERY fast. We only use the static list in
geography
module when performance is really important