For my usage I use:
Code:
public NetworkTable table = NetworkTable.getTable("locationOfItem");
actualVariable = table.getNumberArray("arrayItem", defaultValue);
SmartDashboard.putNumber("displayName", actualVariable[0]);
This uses arrays, but you could use it with just numbers by using different getNumber with table.