possible problem with validation scripts when dataset label contains spaces

LabKey Support Forum (Inactive)
possible problem with validation scripts when dataset label contains spaces Ben Bimber  2010-07-07 12:38
Status: Closed
 
I have gotten most validation scripts working. However, I cannot get them working when the dataset label has spaces. Take this example:

dataset name: 'behavetrem'
label: 'Behavior Remarks'

I have tried files named either 'Behavior Remarks.js' or behavetrem.js. Neither of these scripts is running as far as I can tell from the console. Two questions:

1. am i supposed to use dataset name or label in the validation script filename?

2. If I'm supposed to use label, is labkey handling situations where spaces are in the label correctly?
 
 
kevink responded:  2010-07-07 13:08
Hi Ben,

Can you try replacing the spaces with an underscore? The label is used as the dataset's query name so try 'Behavior_Remarks.js'
 
Ben Bimber responded:  2010-07-07 13:24
ok, the underscores did it. so the behavior i'm seeing for the names of files is:

1. validation scripts: use the dataset label and replace spaces with underscores

2. XML metadata: use the dataset label, but spaces are kept