[allowsmilie] => 1 [showsignature] => 0 [ipaddress] => [iconid] => 0 [visible] => 1 [attach] => 0 [infraction] => 0 [reportthreadid] => 0 [isusenetpost] => 1 [msgid] => [ref] => [htmlstate] => on_nl2br [postusername] => mate [ip] => webforumsuser@m [isdeleted] => 0 [usergroupid] => [membergroupids] => [displaygroupid] => [password] => [passworddate] => [email] => [styleid] => [parentemail] => [homepage] => [icq] => [aim] => [yahoo] => [msn] => [skype] => [showvbcode] => [showbirthday] => [usertitle] => [customtitle] => [joindate] => [daysprune] => [lastvisit] => [lastactivity] => [lastpost] => [lastpostid] => [posts] => [reputation] => [reputationlevelid] => [timezoneoffset] => [pmpopup] => [avatarid] => [avatarrevision] => [profilepicrevision] => [sigpicrevision] => [options] => [akvbghsfs_optionsfield] => [birthday] => [birthday_search] => [maxposts] => [startofweek] => [referrerid] => [languageid] => [emailstamp] => [threadedmode] => [autosubscribe] => [pmtotal] => [pmunread] => [salt] => [ipoints] => [infractions] => [warnings] => [infractiongroupids] => [infractiongroupid] => [adminoptions] => [profilevisits] => [friendcount] => [friendreqcount] => [vmunreadcount] => [vmmoderatedcount] => [socgroupinvitecount] => [socgroupreqcount] => [pcunreadcount] => [pcmoderatedcount] => [gmmoderatedcount] => [assetposthash] => [fbuserid] => [fbjoindate] => [fbname] => [logintype] => [fbaccesstoken] => [newrepcount] => [vbseo_likes_in] => [vbseo_likes_out] => [vbseo_likes_unread] => [temp] => [field1] => [field2] => [field3] => [field4] => [field5] => [subfolders] => [pmfolders] => [buddylist] => [ignorelist] => [signature] => [searchprefs] => [rank] => [icontitle] => [iconpath] => [avatarpath] => [hascustomavatar] => 0 [avatardateline] => [avwidth] => [avheight] => [edit_userid] => [edit_username] => [edit_dateline] => [edit_reason] => [hashistory] => [pagetext_html] => [hasimages] => [signatureparsed] => [sighasimages] => [sigpic] => [sigpicdateline] => [sigpicwidth] => [sigpicheight] => [postcount] => 1 [islastshown] => [isfirstshown] => 1 [attachments] => [allattachments] => ) --> "This message is usually caused by a problem in theexpressions structure." - Coldfusion - Advanced Techniques

"This message is usually caused by a problem in theexpressions structure." - Coldfusion - Advanced Techniques

I have a custom tag that I use for generating dynamic <select /> elements. It takes an options attribute which can be a few different data types, including a query. There is also an optionText attribute, which is used for form the text between <option></option> tags within the <select />. Initially, I only allowed a reference to a column in the query, and it would use that value for each row. I've come across a situation where I'd like to be able to supply multiple column names and do the appropriate substitutions. I've hit a wall with the code saying ...

  1. #1

    Default "This message is usually caused by a problem in theexpressions structure."

    I have a custom tag that I use for generating dynamic <select /> elements. It
    takes an options attribute which can be a few different data types, including a
    query.

    There is also an optionText attribute, which is used for form the text between
    <option></option> tags within the <select />. Initially, I only allowed a
    reference to a column in the query, and it would use that value for each row.
    I've come across a situation where I'd like to be able to supply multiple
    column names and do the appropriate substitutions.

    I've hit a wall with the code saying there's a problem with the following
    expression:

    <CFset ot = replace(ot, varName, evaluate('attributes.options' & varName))>

    Not an undefined variable, not an obvious syntax error... so I'm relatively
    stumped. I don't see anything surrounding that might throw it off either, but
    I've attached the surrounding relevant code anyway.

    <!--- // QUERY // --->
    <CFelseif isQuery(attributes.options)>
    <CFset ot = attributes.optionText>
    <CFset startPos = 1>
    <CFloop condition="startPos lt len(ot)">
    <CFset match = reFindNoCase('[a-z]+[a-z0-9_]*', ot, startPos, true)>
    <CFif match.len[1]>
    <CFset varName = mid(ot, match.pos[1]-1, match.len[1])>
    <CFset ot = replace(ot, varName, evaluate('attributes.options' &
    varName))>
    <CFset startPos = match.pos[1] + match.len[1]>
    </CFif>
    </CFloop>
    <CFset attributes.optionText = ot>
    <CFloop query="attributes.options">
    <CFset optVal = evaluate('attributes.options.' & attributes.optionValue)>
    <option value="#optVal#"<CFif isSelected(optVal)>#markSelected#</CFif>>
    #attributes.optionText#
    </option>
    </CFloop>

    mate Guest

  2. #2

    Default Re: "This message is usually caused by a problem in theexpressions structure."

    I suspect your Evaluate function in the Replace is at fault. Try the code below (untested).


    <CFSET foo = "attributes.options" & varName>
    <CFset ot = replace(ot, varName, evaluate(foo))>
    jdeline Guest

  3. #3

    Default Re: "This message is usually caused by a problem in theexpressions structure."

    Hmm, what you suggested is not functionally different at all, just a different
    way of saying the same thing. As expected, it produces the same results. It
    seems no matter of rearrangement helps. It doesn't like my use of evaluate()...
    grr...

    mate Guest

Similar Threads

  1. Replies: 3
    Last Post: July 8th, 07:44 AM
  2. "Can't Print the illustration" error caused by too many custom colors
    By Elaine_A_Wilson@adobeforums.com in forum Adobe Illustrator Macintosh
    Replies: 15
    Last Post: April 19th, 08:23 PM
  3. "get snapshot for locks" memory structure
    By Philip Nelson in forum IBM DB2
    Replies: 0
    Last Post: July 23rd, 04:51 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •