What are the mandatory and optional address fields in geocode? - geocode

What are the mandatory and optional address fields in geocode?
As the address format is different for different countries throughout the world, what is the format that needs to be used in geocode .Is there a specific format for it, like mandatory fields and optional fields in address.
Please let me know.Thanks

No specific format. Just give it some data and it will try its best to discern it. I have an app that the user inputs zip/postal code and it will retreive all the relevant info (city, state/province, country).

Related

How to get country code from country name

I want to get the country code by passing in the country name.
For example I have the country Canada, I want to get the country code CA.
I need this conversion because I want to use a country flag flutter package that gets the flag based on the passed in country code.
I know I can hard code a map that will do this conversion for me but I am looking for something simpler
If you are allowed to, maybe you can parse the json from a metadata tool, like DataHub? CSV.

ABAP Domain and Data Types Understanding

so my company wants me to learn ABAP for SAP and I have started on the road to learn this. My background is mainly VB.net and sqlserver with T-SQL but also have experience in c#.
With ABAP though I am needing some clarification or confirmation on the understanding of Data Types and Domain. If anyone can help.
My understanding currently is we have a table, in the table we have fields and the fields have data types and lengths if needed. Example: We have a table Customer, I could have a customerNumber field with the data type of char(10). To me this mean in the table customer we have a field called CustomerNumber that will have 10 characters.
However with ABAP we have Domains, Data elements then the field, does this mean we have a field named whatever we want. As the field could mean anything we assign a data element which has the descriptions of the sort of data stored within the field. However to store the format and data type we need to assign the Domain to the Data element.
For example I call a field ZCUSNO, currently this means nothing however if I assign the ZCTNMR (with description of customer number) Data element this tells us that the field ZCUSNO is ZCTNMR so ZCUSNO is a customer number field.
Now within the data elements we would have a domain and for our example ZCTNMR data element (the customer number) we could assign ZCTDOM as the domain which would be what I recognise as the data types so Char 20, Char 100 or integer field etc.
Is my understanding correct on this? and could someone give me a clear indication of what the difference between a Domain > Data Element is against what I would know as data types in sqlserver.
Thanks
I don't know if it's 100% correct, but that's is the way I use, like you say.
You can reuse the Domain, If you don't plan to reuse you can use direct the Data Element and refer this to a built-in-type.
Data Element is to define semantic of the field, like label, translation, etc
Domain is to define techinical info of the field, like Type, conversions, predefined Values,e tc
E.G.
Domain:
DOM_VALUE you define it's 10 position and 2 Decimals
Data Element:
UNIT_VAL you refer it to DOM_VALUE and define label as "Unit Value"
TOTAL_VAL you refer it to DOM_VALUE and define label as "Total Value"
Your understanding is pretty correct and not much can be added here.
You should clearly get the main thing.
Domains store technical data (decimal points, length, type, predefined values and so on)
Data elements store semantic data (labels, texts, search help binding, etc.)
Not every table field has data element (they can possess builtin type) but every field has type (either primitive or wrapped in data element).
If you wanna use your field in screens (Dynpros), ALV grids or other reports, then create data elements that will bear business meaning of your field.
If you use this field just for calculations or other utility internal tasks, then don't bother yourself.
As usual table date field (type of variable) uses data element which uses domain.
When you create fields in table and use predefined types instead of data elements you will have some problems in future, when you'll need to see the data on alv_grid.
Actually, you will see that you have some problems even before this (when you will try to make a maintenance view the header will have something like "+" symbol).
And of course we usually try to create 1 domain for 2 and more Data Elements.
In domain you talk about main logic.
In Data Element I always talk about Field label settings (how it'll show in future and some other things)
Final: Actually, the good practice, as I think to create a domain for data element, it may help you in future.
I hope that it helps you. Good luck!

Facebook API - Custom Audience from contact data

does any one has experience with using Custom Audience API in order to create audience for contact data of people outside of U.S.?
Part of the API which i refer to is: https://developers.facebook.com/docs/marketing-api/reference/custom-audience/users/
As you can see, documentation lacks of explanation in what format should be data for COUNTRY field provided. Also I don't know how to format data for ST field if the country is outside of US. Should I use some region name or just leave it blank?
I uploaded 1000 users and nobody has been recognized so I suppose that I just did not format data properly.
Sample request: payload={"schema":["FN","LN","CT","ST","COUNTRY"],"is_raw":true,"data":[["adam","nowak","wroclaw","","poland"]]}&access_token=____&format=json
As you can see I left state field blank, and provided country in English translation and lower caps. It is possible that valid value is e.g. PL a not "poland". Also any information about what should be filled in state field would help me a lot.
Thanks in advance.

orbeon autocomplete get selected item

I'm using the fr:autocomplete control for autocompletion of street names. The control itemset is filled by the returned address objects (streetname+number+zip+city) from an http service. I read in the documentation that you can bind only with a single-node value. So only the streetname can be bind to the street node.
The problem is i need to bind over values of the selected address with other nodes, such as number, zip and city, at the same time.
Can you show me please how to achieve that?
This is a high level idea.
You can have a temporary node and have the binding to autocomplete control.
You can write xforms:action on event DOMActivate and have setvalue commands all your address fields.
When user selects an address detail, Assuming address detail is space seperated (Eg: StreetXYZ 123 556277 Tokyo), this value is assigned to temporary node.
In the setvalue commands you can use xpath functions substring-before() and substring-after() to fetch each component.
I will try to give an example later. All the best!

Primary / Default ABMultiValue property?

I need a user to enter their name, phone number, and email address. To help them out, if they enter any one of the three, I want to look up that value in their Address book and populate the remaining fields. For example, if they enter their name, I'll look them up, and populate the email and phone number fields.
Email and phone numbers are ABMultivalue properties, however, and most people have more than one email and phone. Does the iPhone address book have the concept of a primary or default value for those properties that are ABMultiValue?
Thanks!
There is no primary/default value. I would simply assume that the first value is the primary/default value. It's true for most of my contacts. Otherwise if there are multiple values you could let the user choose the one they want, but you need to make a good UI to support it, so the first alternative is much simpler.