View Full Version : Dynamic Array with previous info in recordset
Hello,
I wanted to know if you create a dynamic array if your field b and c could still show information from a previous record set.
Let me explain. I have an update page. I want to go in and edit some things but not change anything in my list a through c. when I hit the edit button dataassist update function puts into the table null because I never chose anything. I want to have the list already populated with information already in the recordset. This works for list A but does not populate list b or c.
Thanks for the help
Ray Borduin
05-28-2009, 01:10 PM
use the "populate list from array" and "set selection in list" behaviors onload so that they are set properly after the page submit.
the only thing I see in my Behaviors panel when I have list A clicked is onChange Populate List from Array I don't see set selection in list. Also I want them to populate themselves when the previous page is submited and passes a parm with the id of the record set in the URL to populate the list
Ray Borduin
05-28-2009, 01:35 PM
That is because onChange you don't have to set the selection in the list... the list selection is being set by the user.
You should be able to do it with a passed parameter as well. Are you only passing the ID of list c? you would probably have to create a recordset to look up the value for list a and list b so that you could set those selections as well, but it would work.
Well list List A is set by the user but I'm trying to change that as well. I want list A in my update page to display the data already in my recordset.
When I look in the properties panel and choose dynamic and set the vale equale to the item I want shown it wont display. It only displays the list from my other record set that I have the options from
Ray Borduin
05-28-2009, 01:41 PM
You should only be using the dynamic properties panel attribute for the first list.
The rest of the lists will have to be done with the "populate list from array" and "set selection in list" behaviors onload so that they are set properly after the page submit.
hi Ray when I put the "set selection in list I don't see the option onLoad. and when I type it in also DW prompts me with an error saying onLoad is not a valid event for the SELECT tag
Ray Borduin
05-29-2009, 07:00 AM
That is because you should be highlighting the body tag to add onload events.
ok so what if the body tag is not editable because it is restricted by a page template? Am I S.O.L then?
Ray Borduin
05-29-2009, 11:12 AM
No... just apply it in any other event, and cut it and paste the code into a <script> tag you manually add just before the end of your final editable region on the page. This will behave similarly to onLoad since it will run inline and most of the page will be loaded by then, at least the form and the lists the code deals with.
jason312679
07-31-2009, 11:43 AM
That is because you should be highlighting the body tag to add onload events.
Horning in on this thread because now I don't need to create my own :)
Thanks, Ray. I was setting onLoad on the select element (like the idiot that I am) and I couldn't figure out for the life of me why it wasn't working.
Jason
vBulletin® v3.8.1, Copyright ©2000-2012, Jelsoft Enterprises Ltd.