I'm just learning music theory and I already understand the scales formulas (minor, major, harmonic, melodic, pentatonic, modes, etc.) and chords formulas (min, maj, 7th, dim,etc) but what I can't understand yet is, if, for example, I'm working with D Major scale and I want to make the progression D-F#-B (I-III-VI) how do I know what types of chords those three notes (D-F#-B) can/should be?
For example, can do I know if i can those three notes on a 7th chord, or a diminished chord, or a suspended chord, and still be on the same scale? Or maybe one of those notes can be a 7th chord but the other two can't and why?
So basically my confusion is if there are specific formulas as well for the types of chords for every note on every scale (say that, in X scale the third note should always be 7th chord) or I'm just mixing everything?