I have got an issue with [@cbParamVirtual3]. [@cbParamVirtual3] value is calculated with the below CASE statement. For clarity [@cbParamVirtual2] is a calendar pop up. The CASE statement below works fine. When a user picks a date in [@cbParamVirtual2], [@cbParamVirtual3] is calculated correctly.
However, the problem is when [@cbParamVirtual3] is hidden and blank. [@cbParamVirtual2] and [@cbParamVirtual3] are hidden under certain circumstances with a rule which hides the section that contains those two fields. When a user tried to move on to the next datapage, the 'Values in one or more fields are invalid' message appears. It is appearing because [@cbParamVirtual3] is required even though it is hidden and not made required by the field setting or any rule.
I have tried to add an ELSE statement to the above CASE statement to get around the issue:
CASE
WHEN [@cbParamVirtual2] IS NOT NULL AND [@field:Price_Type]='New'
You can post now and register later.
If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.
Question
JKSGT
Hi,
I have got an issue with [@cbParamVirtual3]. [@cbParamVirtual3] value is calculated with the below CASE statement. For clarity [@cbParamVirtual2] is a calendar pop up. The CASE statement below works fine. When a user picks a date in [@cbParamVirtual2], [@cbParamVirtual3] is calculated correctly.
CASE
WHEN [@cbParamVirtual2] IS NOT NULL
THEN
DateAdd(year, 1,DateAdd(day, -1,CONVERT(DATETIME, '[@cbParamVirtual2]', 103)))
END
However, the problem is when [@cbParamVirtual3] is hidden and blank. [@cbParamVirtual2] and [@cbParamVirtual3] are hidden under certain circumstances with a rule which hides the section that contains those two fields. When a user tried to move on to the next datapage, the 'Values in one or more fields are invalid' message appears. It is appearing because [@cbParamVirtual3] is required even though it is hidden and not made required by the field setting or any rule.
I have tried to add an ELSE statement to the above CASE statement to get around the issue:
CASE
WHEN [@cbParamVirtual2] IS NOT NULL AND [@field:Price_Type]='New'
THEN
DateAdd(year, 1,DateAdd(day, -1,CONVERT(DATETIME, '[@cbParamVirtual2]', 103)))
ELSE
DateAdd(year, 1,DateAdd(day, -1,CONVERT(DATETIME, '[@cbParamVirtual2]', 103)))
END
I was expecting the result in [@cbParamVirtual3] to be 31 Dec 1900 but I'm not getting anything if [@field:Price_Type] does not equal 'New'.
If you can see where I am going wrong with the above, I will be very grateful for any tips.
Many thanks
Jay
Link to comment
Share on other sites
2 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.