Assay Design created from Assay Module

LabKey Support Forum (Inactive)
Assay Design created from Assay Module cheryl  2015-10-29 15:04
Status: Closed
 
Hi-
I created an assay module with the fields defined in a results.xml file.
One of the fields that was originally defined in the results.xml file was defined as an int.
I know that I can change the xml file definition to string, but as far as I can tell, that would only affect new assay designs.
There is already data populated into an assay design that was created from this module, but the lab using that assay design had never filled data into the field that I want to change the field type for.
Is there any way to change that field type or delete the field and add a new field back in to the actual assay design?
 
 
Ben Bimber responded:  2015-10-29 15:15
hi cheryl,

we have experienced the same issue. to the best of my knowledge there are no features in the core that handle this. i ended up writing something to deal with this if you want to try. an admin action that will compare the fields present in all instances of file-based assays against their XML definitions. it gives you the option to add missing fields, and change datatype. it does the later by renaming the existing field and adding a new one with the right datatype.

if you're interested, you will need to install the laboratory module, which is part of DISCVR (https://github.com/bbimber/discvr). these modules are designed for other purposes, but they include a number of admin helpers along these lines. once installed, go to the admin console, pick DISCVR Admin, then 'Synchronize Assay Fields'. this is tested code that we've used on many servers; however, it reaches around normal LabKey UI, so please backup your DB first and understand that this is at your own risk.

-ben
 
jeckels responded:  2015-10-31 12:19
Hi Cheryl,

As you observed and Ben confirmed, the XML file with the field definition is used as a template when a new assay design is created. Later changes to the XML file do not change the existing assay designs.

Without using a custom module like Ben described, to change the property type, I think you would need to:

1. Temporarily remove the field from the XML file.
2. Rename or delete the existing field.
3. Create a new field of the desired type.
4. Re-introduce the field from the XML file with the desired type.

Without #1, as you've probably seen, the server won't let you edit or remove the existing field.

Thanks,
Josh