I had a similar problem recently. I solved it (in my case) by making my lookup return 2 values; "1" and the calculated value. But I made the"hidden key" my dummy "1" value and the "Display Attribute" to be my calculated value. I was then able to specify a default value of "1" in the attribute in the object and make the attribute read only. I then only put the attribute on the EDIT layout of my object (so it is not on the CREATE layout). This meant I never got the "[--Select--]" value displayed. Also "my" solution means that the attribute on the database is always "1", but my data-entry screen works well. Pehaps something like that could help you? I mean by changing the NSQL to something like; SELECT @SELECT:1:DUMMYID@,@SELECT:CASE nvl(inv.GOAL_CODE, 'Leeg')
WHEN 'Leeg' THEN ' '
WHEN 'Beheer' THEN 'Beheer'
WHEN 'Onderhoud' THEN 'Onderhoud'
WHEN 'Not_Available' THEN 'Indirect'
ELSE 'Projecten'
END:myCategory@
FROM INV_INVESTMENTS inv
WHERE 1 = 1
AND inv.ID = @WHERE:PARAM:XML:INTEGER:/data/id/@value@ Dave. EDIT : My query also "always" returns a value (even when previewed), you could try; SELECT @SELECT:1:DUMMYID@,@SELECT:X.myCategory:myCategory@FROM(SELECT( SELECT CASE nvl(inv.GOAL_CODE, 'Leeg')
WHEN 'Leeg' THEN ' '
WHEN 'Beheer' THEN 'Beheer'
WHEN 'Onderhoud' THEN 'Onderhoud'
WHEN 'Not_Available' THEN 'Indirect'
ELSE 'Projecten'
END:myCategory@
FROM INV_INVESTMENTS inv
WHERE inv.ID = @WHERE:PARAM:XML:INTEGER:/data/id/@value@)FROM DUAL) X
WHERE @FILTER@ (that should make sure you always get a value, even it is "null") (Note that this is an Oracle solution)[left] Message Edited by Dave on 22-12-2009 01:07 PM [left]