How to set Default and Possible values for Country/Region
Summary: If you want to make some attributes to have a default value on a form or limit the number of possible values that can be selected on a form, you can do that by configuring Attribute Policies.
This article will help you set up an Attribute Policy that sets default and possible values for the Country/Region attributes in the New User/Clone User/Enable Mailbox actions.
Applies to: Cayosoft Administrator 5.X or later.
Set default value and limit possible values for Country/Region attribute in Web Portal
The Country/Region field in the Web Portal by default has a drop-down view with a possible values list, but if you want to limit this list to only several values, you can do this by Attribute Policy.
In this example, we will set the default value to the United States country and leave only the United States and Australia in Possible values.
Follow the steps below to configure it:
In the Cayosoft Administrator Console, navigate to Configuration > Web Portal > Attribute Policies.
Click Add Attribute Policy in the upper right corner.
Enter a name for the new policy, for example, Default Country Policy, and then expand the Policy Details.
Click Add Scope at the bottom right of the Policy Scope section.
In the Specify Policy Scope dialog, select the Active Directory in the first column titled Admin Units.
Select AD Users in the second column titled Web Queries.
NOTE: You can select additional web queries if needed like AD User Templates, AD Users (Inactive), or AD Users (Locked out).
Select New User, Clone User and Enable Mailbox in the third column titled Web Actions.
Click OK.
Click the newly created scope to select it.
In the Attribute policy settings section, select the Country/region attribute.
Click Edit Policy.
Click Default Value then enter US_840 in the field next to the checkbox.
Click the Possible Values checkbox then enter the following values in the field:
US_840~United States
AU_36~Australia
NOTE: See all possible country codes at the end of the article.
Select checkbox Is Required if you do not want to allow the field to be cleared on the form.
Click OK.
Click Save Changes.
NOTE: The policy will become active in the web UI the next time the page is refreshed or when the user signs on again.
Possible country codes for Country/Region field
| Country name | Country code |
|---|---|
| Afghanistan | AF_4 |
| Åland Islands | AX_248 |
| Albania | AL_8 |
| Algeria | DZ_12 |
| American Samoa | AS_16 |
| Andorra | AD_20 |
| Angola | AO_24 |
| Anguilla | AI_660 |
| Antarctica | AQ_10 |
| Antigua and Barbuda | AG_28 |
| Argentina | AR_32 |
| Armenia | AM_51 |
| Aruba | AW_533 |
| Australia | AU_36 |
| Austria | AT_40 |
| Azerbaijan | AZ_31 |
| Bahamas | BS_44 |
| Bahrain | BH_48 |
| Bangladesh | BD_50 |
| Barbados | BB_52 |
| Belarus | BY_112 |
| Belgium | BE_56 |
| Belize | BZ_84 |
| Benin | BJ_204 |
| Bermuda | BM_60 |
| Bhutan | BT_64 |
| Bolivia, Plurinational State of | BO_68 |
| Bonaire, Sint Eustatius and Saba | BQ_535 |
| Bosnia and Herzegovina | BA_70 |
| Botswana | BW_72 |
| Bouvet Island | BV_74 |
| Brazil | BR_76 |
| British Indian Ocean Territory | IO_86 |
| Brunei Darussalam | BN_96 |
| Bulgaria | BG_100 |
| Burkina Faso | BF_854 |
| Burundi | BI_108 |
| Cambodia | KH_116 |
| Cameroon | CM_120 |
| Canada | CA_124 |
| Cape Verde | CV_132 |
| Cayman Islands | KY_136 |
| Central African Republic | CF_140 |
| Chad | TD_148 |
| Chile | CL_152 |
| China | CN_156 |
| Christmas Island | CX_162 |
| Cocos (Keeling) Islands | CC_166 |
| Colombia | CO_170 |
| Comoros | KM_174 |
| Congo | CG_178 |
| Congo, the Democratic Republic of the | CD_180 |
| Cook Islands | CK_184 |
| Costa Rica | CR_188 |
| Côte d'Ivoire | CI_384 |
| Croatia | HR_191 |
| Cuba | CU_192 |
| Curaçao | CW_531 |
| Cyprus | CY_196 |
| Czech Republic | CZ_203 |
| Denmark | DK_208 |
| Djibouti | DJ_262 |
| Dominica | DM_212 |
| Dominican Republic | DO_214 |
| Ecuador | EC_218 |
| Egypt | EG_818 |
| El Salvador | SV_222 |
| Equatorial Guinea | GQ_226 |
| Eritrea | ER_232 |
| Estonia | EE_233 |
| Ethiopia | ET_231 |
| Falkland Islands (Malvinas) | FK_238 |
| Faroe Islands | FO_234 |
| Fiji | FJ_242 |
| Finland | FI_246 |
| France | FR_250 |
| French Guiana | GF_254 |
| French Polynesia | PF_258 |
| French Southern Territories | TF_260 |
| Gabon | GA_266 |
| Gambia | GM_270 |
| Georgia | GE_268 |
| Germany | DE_276 |
| Ghana | GH_288 |
| Gibraltar | GI_292 |
| Greece | GR_300 |
| Greenland | GL_304 |
| Grenada | GD_308 |
| Guadeloupe | GP_312 |
| Guam | GU_316 |
| Guatemala | GT_320 |
| Guernsey | GG_831 |
| Guinea | GN_324 |
| Guinea-Bissau | GW_624 |
| Guyana | GY_328 |
| Haiti | HT_332 |
| Heard Island and McDonald Islands | HM_334 |
| Holy See (Vatican City State) | VA_336 |
| Honduras | HN_340 |
| Hong Kong | HK_344 |
| Hungary | HU_348 |
| Iceland | IS_352 |
| India | IN_356 |
| Indonesia | ID_360 |
| Iran, Islamic Republic of | IR_364 |
| Iraq | IQ_368 |
| Ireland | IE_372 |
| Isle of Man | IM_833 |
| Israel | IL_376 |
| Italy | IT_380 |
| Jamaica | JM_388 |
| Japan | JP_392 |
| Jersey | JE_832 |
| Jordan | JO_400 |
| Kazakhstan | KZ_398 |
| Kenya | KE_404 |
| Kiribati | KI_296 |
| Korea, Democratic People's Republic of | KP_408 |
| Korea, Republic of | KR_410 |
| Kuwait | KW_414 |
| Kyrgyzstan | KG_417 |
| Lao People's Democratic Republic | LA_418 |
| Latvia | LV_428 |
| Lebanon | LB_422 |
| Lesotho | LS_426 |
| Liberia | LR_430 |
| Libya | LY_434 |
| Liechtenstein | LI_438 |
| Lithuania | LT_440 |
| Luxembourg | LU_442 |
| Macao | MO_446 |
| Macedonia, the former Yugoslav Republic of | MK_807 |
| Madagascar | MG_450 |
| Malawi | MW_454 |
| Malaysia | MY_458 |
| Maldives | MV_462 |
| Mali | ML_466 |
| Malta | MT_470 |
| Marshall Islands | MH_584 |
| Martinique | MQ_474 |
| Mauritania | MR_478 |
| Mauritius | MU_480 |
| Mayotte | YT_175 |
| Mexico | MX_484 |
| Micronesia, Federated States of | FM_583 |
| Moldova, Republic of | MD_498 |
| Monaco | MC_492 |
| Mongolia | MN_496 |
| Montenegro | ME_499 |
| Montserrat | MS_500 |
| Morocco | MA_504 |
| Mozambique | MZ_508 |
| Myanmar | MM_104 |
| Namibia | NA_516 |
| Nauru | NR_520 |
| Nepal | NP_524 |
| Netherlands | NL_528 |
| New Caledonia | NC_540 |
| New Zealand | NZ_554 |
| Nicaragua | NI_558 |
| Niger | NE_562 |
| Nigeria | NG_566 |
| Niue | NU_570 |
| Norfolk Island | NF_574 |
| Northern Mariana Islands | MP_580 |
| Norway | NO_578 |
| Oman | OM_512 |
| Pakistan | PK_586 |
| Palau | PW_585 |
| Palestine, State of | PS_275 |
| Panama | PA_591 |
| Papua New Guinea | PG_598 |
| Paraguay | PY_600 |
| Peru | PE_604 |
| Philippines | PH_608 |
| Pitcairn | PN_612 |
| Poland | PL_616 |
| Portugal | PT_620 |
| Puerto Rico | PR_630 |
| Qatar | QA_634 |
| Réunion | RE_638 |
| Romania | RO_642 |
| Russian Federation | RU_643 |
| Rwanda | RW_646 |
| Saint Barthélemy | BL_652 |
| Saint Helena, Ascension and Tristan da Cunha | SH_654 |
| Saint Kitts and Nevis | KN_659 |
| Saint Lucia | LC_662 |
| Saint Martin (French part) | MF_663 |
| Saint Pierre and Miquelon | PM_666 |
| Saint Vincent and the Grenadines | VC_670 |
| Samoa | WS_882 |
| San Marino | SM_674 |
| Sao Tome and Principe | ST_678 |
| Saudi Arabia | SA_682 |
| Senegal | SN_686 |
| Serbia | RS_688 |
| Seychelles | SC_690 |
| Sierra Leone | SL_694 |
| Singapore | SG_702 |
| Sint Maarten (Dutch part) | SX_534 |
| Slovakia | SK_703 |
| Slovenia | SI_705 |
| Solomon Islands | SB_90 |
| Somalia | SO_706 |
| South Africa | ZA_710 |
| South Georgia and the South Sandwich Islands | GS_239 |
| South Sudan | SS_728 |
| Spain | ES_724 |
| Sri Lanka | LK_144 |
| Sudan | SD_729 |
| Suriname | SR_740 |
| Svalbard and Jan Mayen | SJ_744 |
| Swaziland | SZ_748 |
| Sweden | SE_752 |
| Switzerland | CH_756 |
| Syrian Arab Republic | SY_760 |
| Taiwan, Province of China | TW_158 |
| Tajikistan | TJ_762 |
| Tanzania, United Republic of | TZ_834 |
| Thailand | TH_764 |
| Timor-Leste | TL_626 |
| Togo | TG_768 |
| Tokelau | TK_772 |
| Tonga | TO_776 |
| Trinidad and Tobago | TT_780 |
| Tunisia | TN_788 |
| Turkey | TR_792 |
| Turkmenistan | TM_795 |
| Turks and Caicos Islands | TC_796 |
| Tuvalu | TV_798 |
| Uganda | UG_800 |
| Ukraine | UA_804 |
| United Arab Emirates | AE_784 |
| United Kingdom | GB_826 |
| United States | US_840 |
| United States Minor Outlying Islands | UM_581 |
| Uruguay | UY_858 |
| Uzbekistan | UZ_860 |
| Vanuatu | VU_548 |
| Venezuela, Bolivarian Republic of | VE_862 |
| Viet Nam | VN_704 |
| Virgin Islands, British | VG_92 |
| Virgin Islands, U.S. | VI_850 |
| Wallis and Futuna | WF_876 |
| Western Sahara | EH_732 |
| Yemen | YE_887 |
| Zambia | ZM_894 |
| Zimbabwe | ZW_716 |
Comments
0 comments
Please sign in to leave a comment.