In the Google Contacts UI the phone numbers has country codes represented by flags.
GAS ContactsApp's contact.getPhoneNumber() method does not include the selected country code.
How to extract the selected country or get the phone number in international format?
Related
I'm created a map in Google Data Studio using zip codes to fill certain area's within the map. However, only 3 zip codes are filled and the other's are not. I tried importing the zip codes as a CSV and Google Sheets and I'm getting the same results.
I made sure the column is being seen as zip codes. I'm not sure what the problem could be.
Data Set (Google Sheets):
zipcode-1
06510
06511
06512
06513
06515
06519
06514
Google Data Studio report
0) Summary
Issue: The geo type, zip code, may exist in multiple countries
Suggestion: Create a calculated field which adds a country value
1) Issue
The problem occurs as Google Data Studio would need to "guess" what the country is. This is because a zip code, while unique to a specific country may not be unique when considering all countries in the world (this also applies to other geo types such as city).
2) Suggestion
Explicitly stating the country would ensure that that values are specific.
This can be achieved using the format:
Geo Field, Country
The values would look like:
06510, United States
A CONCAT of the Zip Code field (titled zipcode-1) with a , followed by the Country (United States) would display the Geo values as expected:
2.1) Calculated Field
CONCAT(zipcode-1, ", ", "United States")
NOTE: In this specific case, the country has to be manually stated within "" as there is no country field, however, if there is a Country field, use: CONCAT(Geo Field, ", ", Country)
2.2) Type
Geo > Postal Code
The output will look like:
zipcode-1
Geo
06510
06510, United States
06511
06511, United States
06512
06512, United States
06513
06513, United States
06515
06515, United States
06519
06519, United States
06514
06514, United States
Publicly editable Google Data Studio report (embedded Google Sheets data source) and a GIF to elaborate:
if I look up this address:
Maanweg 174, 2500 BD The Hague, Nederlands
google maps finds it perfectly. if I look it up this way:
Maanweg 174, The Hague, Nederlands 2500 BD
It does not, because the postal code is out of place.
Now my question: I have 4 fields: Address, City/Region, Country and Postal Code. if the user starts to type the address, a lookup on google maps comes up with a list of addresses the user can pick from. I break the user selection appart and fill-in my 4 fields.
However... if the user changes some part of the address, I need to reconstitute it into a string to feed it to google... but I don't know the proper order. in the Netherlands, the postal code goes after the address. in the US it goes at the end, right before the country.
how can I find out what the proper order is?
There is no unique format, you should use the format as it will be used in the particular country (see: https://developers.google.com/maps/faq#geocoder_queryformat )
According to http://www.bitboost.com/ref/international-address-formats/netherlands/ the order of the first example is correct(for the Netherlands).
For example, when prompted:
http://maps.google.com/maps/api/geocode/json?latlng=47.2333330,39.7000000&sensor=false
I get 'sublocality', but one. How do I get a full list of areas (sublocality) of any city its name?
We are creating customers on SAP CRM and replicate these customers to SAP ECC.
User needs to filter postal codes by the district code they choose while creating customer.
This functionality has provided by SAP ECC.
But in CRM we couldnt find any relation between postal codes and district codes.
How can we filter postal codes by district codes in SAP CRM?
Take a look at get_v_postl_cod1 method of ZL_ICCMP_BP_BUPAADDRSTD_CN00 class, this is the getter method for post codes in account overview.
Inside you'll find something like this:
country_id = get_s_struct( attribute_path = 'STRUCT.COUNTRY'
component = 'COUNTRY'
iterator = iterator ).
...
...
...
SELECT * FROM adrpstcode INTO TABLE lt_adrpost_code
WHERE country = country_id.
You can fetch region value in the same way as country value and modify select query to include your region data.
These tables should provide with all required data: ADRPSTCODE, ADRCITY, ADRCITYT, ADRPCDCITY, ADRPOBOX, ADRCITYPRT, ADRSTREET, ADRSTREETT, and ADRSTRPCD.
I'm trying to write an HTML form for entering your address, but I'm a bit stuck. At the moment it's for UK only, but starting to get global sales. There is a dropdown for county and a dropdown for country...but other countries don't neccessarily have a county
What fields should be on an address form which needs to be valid globally?
Billing address
City
State or Province
Zip or Postal code
Country
I suggest looking at http://www.addressdoctor.com/en/countries_data/addressformats.asp and examining the default format for the main countries you work in. I worked in the direct-mail industry for several years - standardization can sometimes be difficult.