Skip to main content
Participant
September 19, 2006
Question

Randomizing off of percentages

  • September 19, 2006
  • 1 reply
  • 224 views
I have 2 values to be passed in the http post for a parameter. As per the requirement i need to randomize between two values such that Value A gets passed 90% of the time and Value B gets passed 10%. How can i achieve this.

Thanks,
This topic has been closed for replies.

1 reply

Participating Frequently
September 19, 2006
<cfif RandRange(0, 100) LT 90>
<!--- 90% value --->
<cfelse>
<!--- 10% value --->
</cfif>