When to use dem, den, einem, or einen in dative.
Which word determines which artikel I use in dative?
Here is an example sentence.
Mila Prokopic arbeitet gern mit den netten Kolleginnen im Restaurant.
If the article in the nominative is "die/der/das" (i.e. definite) then you would have "dem/der/den" depending on gender and plural form.
If the article in the nominative is "ein/eine" (i.e. indefinite) then you would have "einer/einem," again depending on gender. (Einen is accusative, by the way).
http://german.speak7.com/german_cases.htm has more info and some examples you might find helpful. The above is my understanding but I'm still learning.
In the example sentence you provided, the "den ... Kolleginnen" is the dative form of "die Kolleginnen" (plural in the nominative, so "die" becomes "den" in the dative). The "netten" part is just an adjective to say that the colleagues are nice.
In dative, for definite articles
Masculine: dem, neuter: dem, feminine: der, plural: den.
Moreover, in dative plural, the noun gets an extra -n ending, if it has't got it already. The dative plural of "das Kind" is "den Kindern"
For indefinite articles, Masculine: einem, neuter: einem, feminine: einer. Note that the endings are the same. In plural, you cannot use any form of "ein".