>
>Hi Paul, thanks for your reply. I was wrong in my original post. It only asks for the first two parameters. I can enter these as strings and the query works fine. I tried removing the quotes but on the first one, I got an error from the framework that it didn't know what the variable "general" was. This is the value of This.cnotetype. On the second one, when I removed the quotes I didn't get an error, but it still asks for the 2 values for the query.
>
Try pulling the IIF statement completely out and substituting in a variable. You're basically trying to pass a hard-coded value to the view, since (as you've found out) your variables are going out of scope. One way to handle this is to just create two more properties that will contain your view parameters. Another way is to do something like:
<
>
lcLastNoteDate = IIF(THIS.lReminders, "'"+DTOC(DATE())+"'", "'01/01/2100'")
lcReminder = IIF(THIS.lReminders, "'N'", "'_'")
THIS.AddViewParameter('vp_NoteType','This.cnotetype')
THIS.AddViewParameter('vp_LastNoteDate', lcLastNoteDate)
THIS.AddViewParameter('vp_ReadStatus', lcReminder)
<
>
I didn't have a chance to test these, so hopefully this example works for you.
-Paul