I'm having the exact same issues with the update page with regards to the old code being inserted. But this time, it's inserting the old code within the part I added from your post up top.
Here is the select with your added "select if" code. It works to select the matching ids already in the relational table, but if I click Update, I loose them. All the relational ids are removed from the table. This might be a different issue, I'm still investigating that.
<select name="u_DepartmentCategory[]" multiple="multiple" id="u_DepartmentCategory">
<?php
while(!$rsDepartmentCategories->atEnd()) { //dyn select
?>
<option value="<?php echo($rsDepartmentCategories->getColumnVal("DepartmentCategoryID")); ?>"<?php echo(in_array($rsDepartmentCategories->getColumnVal('DepartmentCategoryID'),$RelationalQuery_1->getSelected())?"selected":""); ?>><?php echo($rsDepartmentCategories->getColumnVal("DepartmentCategoryName")); ?></option>
<?php
$rsDepartmentCategories->moveNext();
} //dyn select
$rsDepartmentCategories->moveFirst();
?>
</select>
If I open the MRT wizard and inspect or change it, and click "Finish", this is what happens to the multi-select. You can see that not only is old code inserted, but it splits out the current if statement.
<select name="u_DepartmentCategory[]" multiple="multiple" id="u_DepartmentCategory">
<?php
while(!$rsDepartmentCategories->atEnd()) { //dyn select
?>
<option value="<?php echo($rsDepartmentCategories->getColumnVal("DepartmentCategoryID")); ?>"<?php echo(in_array($rsDepartmentCategories->getColumnVal('DepartmentCategoryID'),$RelationalQuery_1- <?php if (!(strcmp(($rsDepartmentCategories->getColumnVal("DepartmentCategoryID")), WA_AB_returnPreSelectValue($WA_PreSelect_RelationalTable_1, ($rsDepartmentCategories->getColumnVal("DepartmentCategoryID")))))) {echo "selected=\"selected\"";} ?> >testgetSelected())?"selected":""); ?>><?php echo($rsDepartmentCategories->getColumnVal("DepartmentCategoryName")); ?></option>
<?php
$rsDepartmentCategories->moveNext();
} //dyn select
$rsDepartmentCategories->moveFirst();
?>
</select>
I don't have any redirects in either of the Update behavior or the MRT behavior, so I know it's not moving away form the page.
Is there a different way I should be doing this page as well?
Thanks,
TroyD