Assembly 'if' equation help

Hi

How can I use a 'if' equations in a assembly to add more parts if distance is over 1000mm.

Iv added a screen shot.

When the bottom rail adjusts I would like the upright rails to be equally spaced and if the distance between the upright rails is over 1000mm I would like it to add another rail in.

How can I do this.

Thank you Jack

SolidworksAssemblies