Setting a rule using x++

Dear All,

Greetings,

I want to set a rule, that if the number of vendors in a purchase order is less than 3 vendors the system should show a text box to fill a reason why its less than 3,

how can I set the rule using x++ ??

An order will be for one vendor, what you mean and what you are looking for? Please elaborate.