I am trying to use this SQL block to set a field called Amount:
DECLARE @aamount NVARCHAR(20)
DECLARE @datechange DATETIME
DECLARE @today DATETIME
SET @today = GETDATE()
SET @datechange = '7/20/2012'
IF @today >= @datechange
BEGIN
SET @aamount=55
END
ELSE
BEGIN
SET @aamount=45
END
SELECT @aamount as DefaultValue
I enter this into the field definition under Advanced Field Options, Update the field, then Update the Settings, but when I go to the form, the value has reverted to the previous value, and when I go back into the field options, it has reset from SQL driven, to just the number. I can't get it to save it at all.
I am using DNN 4.9 and Dynamic Forms 3.40.40.0 (old I know, but this has been going on for a while... finally getting around to asking.)
Thanks,
J.R.