value list based on stored calculation field

Hi all,

Is there a way to create value list based on a stored calculation field? I have an employee database. It has 2 fields, Employee name, and employee_group category. Let’s say there’s only 2 categories. “QA” and Engineer".

I made a stored calculation field that returns all employee names of just engineering group. When I go to define valuelist, show list based on database value on the calculated fied “ENG_GROUP”. it doesn’t work. nothing shows up in the value list. Is there something I’m doing wrong?

code of calulation field “ENG_GROUP”:

if (employee_grp == ‘Engineering’)
{
return employee_full
}

else return null

The calculation gives an error…not? (see status bar)

I believe this should be the proper code:

if (employee_grp == 'Engineering') 
{ 
   return employee_full;
} else {
   return null;
}

If the calc gives an error then it wouldn’t store any data in the database which would account for the empty valuelist.

Hey, thanks for your help, i figured out what it is.

The calculation field is CASE SENSATIVE! if you want to make it a stored calculation and add the same field name to the dataprovider. I didn’t think that mattered, but it does. This fixed the problem.

thanks,
sammy