If I just try to do the ArrayDeleteAt(Session.UserCart, 3) within an
ArrayLength of 4 I get the following message:
The element at Position 1, of Dimension 2, of an array object used as part
of an _expression_, cannot be found.
Before I tried to delete one of the items from the cart, I had the
following in the Array:
Element 1 has the Array Header Info which has 7 child elements in it which
are ProductID, ProductName, ProductOptionID, ProductOptionName,
ProductQuantity, ProductOptionPrice, ProductPrice
Element2 has 1, USA Flag Shirt, 0, 0, 1, 0, 0.01
Element3 has 2, 8" Round Wall Clock, 1, w/ Chapter Patch, 2, 0, 19.95
Element4 has 3, 10" Round Wall Clock, 0, 0, 3, 0, 16.95
And when I delete Element 3 which was placed in the Cart by accident, the
cfdump shows that element4 has moved up to element3 and then shows element4
as being empty which produces the above error message.
At 09:20 AM 10/11/2004, you wrote:
>I think you're trying to make it too hard. CF automatically "closes up"
>arrays if you delete. So, all you need to do is
><cfset temp arraydeleteat(myarray, 4)>
>
>----- Original Message -----
>From: "Graham Pearson" >
> > I have been trying to learn array's and have a problem that I am unable to
> > solve.
> >
> > I have a 2 Dimension Array that has for this example a length of 5. I am
> > needing to delete POS 3 of the array and then restructure the array with
> > the new length of 4. Any Direction on this issue as I am at a loss.
> >
>
>----------
>[<http://www.houseoffusion.com/lists.cfm/link=t:4>Todays Threads]
>[<http://www.houseoffusion.com/lists.cfm/link=i:4:181164>This Message]
>[<http://www.houseoffusion.com/lists.cfm/link=s:4>Subscription]
>[<http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=6232.5677.4>Fast
>Unsubscribe] [<http://www.houseoffusion.com/signin/>User Settings]
>[<https://www.paypal.com/cgi-bin/webscr?amount=&item_name=House+of+Fusion&business=donations%40houseoffusion.com&undefined_quantity=&cmd=_xclick>Donations
>and Support]
>
>----------
><http://www.houseoffusion.com/banners/view.cfm?bannerid=34>
>[]
>
----------
[]
[Todays Threads]
[This Message]
[Subscription]
[Fast Unsubscribe]
[User Settings]
[Donations and Support]
- Array question Robert Orlini
- Re: Array question Bryan F. Hogan
- RE: Array question Robert Orlini
- Re: Array question Bryan F. Hogan
- Array question Ken Dunnington
- RE: Array question Pascal Peters
- Re: Array question Kimberly Dennis
- RE: Array question Pascal Peters
- Array Question Graham Pearson
- Re: Array Question Deanna Schneider
- RE: Array Question Graham Pearson
- RE: Array Question Dave Watts