Skip to main content
July 31, 2008
Question

Novice need helps with variable defaults

  • July 31, 2008
  • 4 replies
  • 544 views
I currently use this code as a default.. <CFPARAM NAME="URL.TR_ID" DEFAULT="369"> I would like to alternate defaults numbers on a daily bases... can anyone provide me advise on how to go about it..

Regards
Ben
    This topic has been closed for replies.

    4 replies

    July 31, 2008
    <cfset optionsList = '344,356,359,411,369,376,396'>
    <cfparam name='URL.TR_ID' default="#listGetAt(optionsList,dayOfWeek(now()))#">
    July 31, 2008
    thanks eightcharacters,,, it worked...
    Inspiring
    July 31, 2008
    You have a list of 7 items. There are 7 days in a week.

    Can you think of any way that cold fusion's DayofWeek() function might be useful?
    Inspiring
    July 31, 2008
    <cfset myvar = some cf math or other magic to get the number here>
    <cfparam name="url.tr_id" default="#myvar#">

    or just
    <cfparam name="url.tr_id" default="#some cf math or other magic to get
    the number here#">

    Azadi Saryev
    Sabai-dee.com
    http://www.sabai-dee.com/
    July 31, 2008
    I tried a var tag using java but it didn't work... it would work below <html><head> tags but not above it
    July 31, 2008
    alternate between what?
    July 31, 2008
    I would like to use 344,356,359,411,369,376,396