# Flash Remoting & ColdFusion Structures

**URL:** <https://forum.kirupa.com/t/flash-remoting-coldfusion-structures/202769>\
**Category:** flash\
**Created:** [October 4, 2006, 6:03pm UTC](https://forum.kirupa.com/t/flash-remoting-coldfusion-structures/202769 "2006-10-04T18:03:06Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![tfoston](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/tfoston/32/2516_2.png) [@tfoston](https://forum.kirupa.com/u/tfoston)\
**Post date:** [October 4, 2006, 6:03pm UTC](https://forum.kirupa.com/t/flash-remoting-coldfusion-structures/202769/1 "2006-10-04T18:03:06Z")

</div>

I’ building a CF structure using the flash.params[] array as the keys. The problem is all the structe keys are named “Flash” as if i’m passing it a string. I’ve used the ## around it. I’ve tried array and object notation and noting is working. below is the code

\<cfset num\_items = ArrayLen(Flash.Params[1])\>  
\<cfset session.grand\_total = 0.00\>  
\<cfset mystruct = StructNew()\>

```
  &lt;!---The array (value) of each key is [1]=Name,[2]=Price,[3]=Quantity ---&gt;
                
                
  &lt;!--- I want to get the info from the db and add it to my structure ---&gt;
  
                    &lt;cfloop from="1" to=#num_items# index="counter"&gt;
  &lt;!--- First lets see if the key is already in the structure ---&gt;
                               &lt;cfif StructKeyExists(mystruct,Flash.Params[1][counter]) EQ TRUE&gt;
  &lt;!---If it does exist, just increase its quantity in the array---&gt;
                                   &lt;cfset mystruct.Flash.Params[1][counter][3] = #mystruct.Flash.Params[1][counter][3]# + 1&gt;  
                               
                               &lt;cfelse&gt;
  &lt;!---If it doesnt, then 1)query the inventory id, save its info to an array and save the array and a value to the structre---&gt;
                                    &lt;cfquery name="get_item_info" datasource="flipflop"&gt;
                                    SELECT * FROM Tiles WHERE id = '#Flash.Params[1][counter]#'
                                    &lt;/cfquery&gt;
  &lt;!--- Now that I have the info based on the product number, I need to make an array to place the info into ---&gt;
                                   &lt;cfset myarray = ArrayNew(1)&gt;
                                   &lt;cfset myarray[1] = #get_item_info.name#&gt;
                                   &lt;cfset myarray[2] = #get_item_info.price#&gt;
                                   &lt;cfset myarray[3] = 1&gt;
  &lt;!---Now I need to make an insertion into the structure ---&gt;

                             &lt;cfset mystruct.Flash.Params[1][counter] = myarray&gt;      
                             
  &lt;!---The item has now been added to the structure ---&gt;
                               &lt;/cfif&gt;
                    &lt;/cfloop&gt;
```
