Adding units to built in units lists

LabKey Support Forum
Adding units to built in units lists katy wiseman  2024-06-26 06:41
Status: Active
 

Hi,

I have the units column turned on in my sample tables but someone has asked for a new measurement unit, block. I don't seem to be able to add to this table, am I missing something? Otherwise I will make my own list and lookup to that instead.

Best,
Katy

 
 
mohara responded:  2024-06-29 11:25

Hi Katy:

That’s right that the built-in Units table (exp.MeasurementUnits) can’t be expanded by users, since there is math among the scalable unit values like g->mg, mL->L, etc. You also wouldn’t want to redirect that built-in field’s lookup to your own list as it could create incompatibilities with other sample functionality.

One good way to accommodate this request is to add a new Text Choice field like “unitDescription” with any options your users want, like “block, slice, chunk, none”. The Sample Type would then be set to use “unit” as the units, the user would enter the number of blocks as # units (in the built in fields) and be able to select the type of unit in your other field. Of course if lots of Sample Types want this range of types, using a traditional lookup field to a shared list would also work well.

Hope that helps,

--Molly

 
katy wiseman responded:  2024-07-01 03:10

Hi Molly,

Ah yes, I wouldn't have re-directed the built-in list to my list, just re-created it entirely with my new terms as well. However you suggestion of keeping the built-in column and adding a unit description column might work for now. I can see users getting confused if they can't immediately see the block/section option in the unit list and not knowing what to select. I think block and section might be the only additonal options we'd need so it would be a simple list to make with a traditional lookup!

Thanks,

Katy