Skip to main content
May 17, 2006
Answered

Complex values and CFIF

  • May 17, 2006
  • 2 replies
  • 442 views
We have a system whereby delegates can elect to attend a number of workshops. The system uses a Cart system, storing the selected workshops in a 2d array until the delegate has finished selecting, at which point the array content is written to a table.

We want to be able to error check if a delegate selects a workshop twice.

The code attached seemed to make sense, until we tried it and found that CF didn't like us using the session.aCart[1] variable as since v2 you can't seemingly use a complex value in this way.

Does anyone have a workaround on this, or any other suggestions on how to catch a duplicate entry?

Kind regards
    This topic has been closed for replies.
    Correct answer mattapple
    Not sure if this is the only problem but....
    Compare my version and your version of the following section of code.

    2 replies

    Inspiring
    May 17, 2006
    There might be an easier way altogether. Instead of populating an array, populate a query. Once the delegate submits his choices, do a Query of Queries where the first two words are select distinct. Then loop through the resulting query to insert your records.
    mattappleCorrect answer
    Participating Frequently
    May 17, 2006
    Not sure if this is the only problem but....
    Compare my version and your version of the following section of code.
    May 17, 2006
    MATTAPPLE ----- many thanks ... God! how humiliating :-(