A dishwasher that fails to fill with water is a problem, whether it completely fails or it simply doesn't fill to the required level. There are three main components that relate to water flow in the appliance — the inlet valve, float assembly, and door switch. Problems with any of these components are typically at the root of why your dishwasher is staying dry. Fortunately, all three components are repairable.
Water Inlet Valve
The most common cause for a failure to fill with water is the inlet valve. If the valve has broken, replacement is needed. More likely, though, it is clogged. The valve is covered with a screen designed to keep dishwasher debris from backflowing into the inlet hose. If this screen gets clogged, either from food debris in the dishwasher or hard water mineralization buildup, the water flow will slow to a trickle or stop completely. In the case of hard water scale, the buildup may even be in the inlet hose causing a blockage.
The fix is simple: clean or replace the filter screen. Hard water scale can be removed with a descaling solution or even by soaking the filter in vinegar for several hours. If the hose itself is clogged, you may need to replace it.
Inside the dishwasher is a float assembly. The purpose of the float is to signal when the water level has reached the necessary level for the inlet valve to close and the next part of the wash cycle to continue. If the float breaks or gets stuck in the wrong position, water flow may be cut off prematurely. You can check the float to see if it is stuck and needs to be freed. Otherwise, a float replacement is in order.
Another issue is with the float switch. This is the actual switch that the float triggers once the water level reaches the determined level. The switch does have a finite lifetime so it will eventually wear out. When this happens, the dishwasher will either stop filling completely or it will overfill, depending on the position the switch was in at the time of failure. Replacing the switch solves the problem.
The door switch is what tells the dishwasher that the door is open and it can't yet operate. Some switches activate automatically when you shut the door, while others are on a lever that you must manually engage.
If the contacts in the switch fail, then the dishwasher won't register that the door is latched, so it will not fill. Sometimes the contacts can be repaired, while in other cases you must replace the door switch.
Contact a plumbing contractor if you are having issues with your dishwasher.