DesiLogi Posted October 13, 2021 Report Share Posted October 13, 2021 Hi, the below code is used to create comma-delimited text values (in a text255 field) so the user can select multiple values in a list box and save them (separated by commas) in a text field. It's necessary to use this method instead of the Caspio-native 'List' data type because the lookup values need to be dynamic (I wish Caspio would enable this, been waiting FOREVER). This method works great for Details and Update datapages but I need it to also work in a Bulk Edit page. I've tried changing 'EditRecord' to 'BulkEditRecord' but it doesn't work. Does anyone know how to modify this code to work in a Bulk Edit page? This is so the user can select multiple records and update them with multiple selections in a listbox. <script type="text/javascript"> var v_state = "[@field:state]" ; var o_state = document.getElementById("EditRecordstate") ; o_state.multiple = true ; function f_listbox() { if ( v_state.indexOf(",") > 0 ) { for (var i=0 ; i < o_state.options.length; i++ ) { if(o_state[i].value == v_state) { o_state.remove(i); break ; } } var o_st = v_state.split(", ") ; for (var j=0 ; j < o_st.length; j++) { for (var i=0 ; i < o_state.options.length; i++ ) { if(o_st[j]== o_state.options[i].value){ o_state.options[i].selected = true ; break ; } } } } } document.addEventListener('DataPageReady', f_listbox); //You can also use the line below instead of the eventlistener // setTimeout(f_listbox, 20); </script> Quote Link to comment Share on other sites More sharing options...
Kurumi Posted October 13, 2021 Report Share Posted October 13, 2021 Hi @DesiLogi - you can try this solution: For Bulk Edit fields, have you tried to use BulkEditFIELDNAME without the word Record? Quote Link to comment Share on other sites More sharing options...
DesiLogi Posted October 14, 2021 Author Report Share Posted October 14, 2021 I did try that, along with every permutation I could think of. Must be some minor difference but key.. Quote Link to comment Share on other sites More sharing options...
Kurumi Posted October 14, 2021 Report Share Posted October 14, 2021 Do you have a sample URL? Quote Link to comment Share on other sites More sharing options...
DesiLogi Posted October 14, 2021 Author Report Share Posted October 14, 2021 Unfortunately I don't as there's a lot of other stuff going on. I'll see on Monday if I can create a stripped down version to post--that's a really good idea. Kurumi 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.