..or right click in the criteria row and select 'build', then in the expression builder choose functions-'name of your db' and the your functions will be listed on the right -double click to insert into the function fnGetMyVariable into the text box and OK. Your function doesn't require any arguments so job's a good 'un as we say up north.