Magento2 city dropdown in address field - checkout

How can I convert the city input field to drop-down and make dependent it on region?
City will be depend on the selected region. So when user select region, dependent city will be populated in city dropdown.

Related

Problem with jquery autocomplete multiple feild

basically I want there to be 2 input options. if you select the country in the first input option , the name of some City in that country will appear in the 2nd input option.

Create entry in Access form based on entry chosen from combox box (without including the entry from the combo box)

I use Access to maintain a list (with details) of cases I work on (I am a legal professional). I want Access to add an unique case identifier to every case. I use a form to enter the data in the database.
I wrote this very simple code to add the Case ID nr:
Private Sub Command81_Click()
If Not IsNull(Me.Case_ID) Then
DoCmd.CancelEvent
Else
Command81.Enabled = True
Me.Case_ID = Me.Combo321 + Format(Me.[Date Original Event], "yymmdd") + Format(Time, "hhmmss")
End If
End Sub
The idea is I fill the different fields in the form and then click a button to add the case ID (listed in the textbox (in the form) and field (in the database) called 'Case_ID').
When I click the button it should check whether there is already a case ID. If there is it will not create a new one. If there is none a new case ID will be created based on the country where the case happened (Combo321) + the date when the original event happened + time I created the case ID.
The country where the case happened is choosen from a dropdown menu (Combo321). The options in the dropdown menu come from a table with a list of countries:
The Netherlands, United Kingdom, Germany, etc.
If possible I want to keep the list of (full) country names in the dropdown menu, but in the case ID use a 2 or 3 character abbreviation. So if I choose from the dropdown menu that the case happened in The Netherlands I would like the case nr to start with NL, if the case happened in the United Kingdom I would like the case Nr to start with UK, etc.
Is it possible in the table with the country names to make a second column with the abbreviations and then in the code somehow to have the case ID start with the entry in that 2nd column that 'belongs' to the relevant entry in the first column (the full country name) that I picked from the dropdown menu?
Or maybe there is another way of doing this?
Yes, create field in table. Then have that field in combobox RowSource (multi-column combobox). Combobox properties:
RowSource: SELECT CountryCode, Country FROM Countries;
ColumnCount: 2
ColumnWidths: 0";1.0"
BoundColumn: 1
ControlSource: field to save selected combobox value
Two-letter CountryCode will be saved into record if combobox is bound to field. It will also be used by your code.
Saving data dependent on other data is usually not necessary and often a bad idea. This identifier can be constructed by expression when needed for display.
Also, advise to develop habit of using nn for minutes instead of mm. It actually doesn't seem to make a difference in Format() function but I have seen usage where it does, although can't recall exact circumstances.

Highlighting Via Parameter In Tableau

I have created a parameter using Tableau 10.2 on one of my data field name as
"Region". This is a string and i have selected a list option.
To call this i have created 2 calculated fields:
[Group Highlight] this is one calc field which has name of my parameter.
The other calculated field is
CASE [Group Highlight]
WHEN [Assigned Group] THEN [Group Highlight ] ELSE "Others" END
What i am trying to do when a user selects a specific group that region/group should appear in separate color when i will place this field on color by option. However i only get Others.

Highlight AND Filter Polygon

I have a dashboard where district level data of a country is displayed. I have religion break up on another bar-plot. I have been able to create a dropdown, so that the bar-plot is updated based on selected district.
I also know how to create a dropdown which would highlight the selected district on the map.
How can I create a dropdown which does both - highlights the polygon AND updates the bar-plot?

How can I calculate a distinct count of a dimension in Tableau?

I have Googled this and searched the Tableau forums but I'm coming up empty. How can I calculate a distinct count of City Names using Tableau?
Is it not:
Create Calculated Field Analysis->Create Calulatated Field
Name it and enter the below formula
COUNTD([City Name])
Then pull that into your measures?
This should give you your total count. Or am I missing something in your question?
Another easy way to tackle this problem:
"we need two information as city name and city name (Count Distinct)"
1.To get city name Select [city name] and drag it to row shelf.
2.Again Drag city name into row shelf and Right click on city name in row shelf and Go into measures and select Count Distinct.
Describe in the below link about how to do count Distinct of city name
https://i.stack.imgur.com/gpnrj.png