• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Randomizing off of percentages

New Here ,
Sep 19, 2006 Sep 19, 2006

Copy link to clipboard

Copied

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,
TOPICS
Advanced techniques

Views

186

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Sep 19, 2006 Sep 19, 2006

Copy link to clipboard

Copied

LATEST
<cfif RandRange(0, 100) LT 90>
<!--- 90% value --->
<cfelse>
<!--- 10% value --->
</cfif>

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation