January 7, 201511 yr Having a difficult time getting $$Event_Filter to work. My event table has id_event_type. I have a global field that filters an event list by this value. Any help incorporating $$Event_Filter? I even tried hard-coding the $$Event_Filter by setting it to "id_event_type = "1F7CED2C-D153-45FC-AFD5-DA796FAF4F28" and still just ?s. Here is what I see in the data viewer: SELECT "event_description", "EzCal_Text_Color", '', "start_time", "end_time" FROM "event" WHERE ( ( NUMVAL ( "start_date" ) = [[DATE]] ) OR ( ( NUMVAL ( "start_date" ) < [[DATE]] ) AND ( NUMVAL ( "thru_date" ) >= [[DATE]] ) ) ) AND ( id_event_type = "1F7CED2C-D153-45FC-AFD5-DA796FAF4F28" )
January 8, 201511 yr It looks like the filter that you are specifying is resulting in an invalid SQL command. Try wrapping the value in single quotes. For example: $$Event_Filter = "( id_event_type = '1F7CED2C-D153-45FC-AFD5-DA796FAF4F28' )" -- Tim
January 8, 201511 yr Author Yeah! Boy, I thought I have tried that. Now, onto the fact that I do not want to hard-code the id_event_type. How would I do that, Tim? "id_event_type = " & "'" & ( GetField ( "@SYS::EVENT_TYPE_FILTER ") ) & "'" Thanks, Tim! You're inspiring me. -Barbara
January 9, 201511 yr How about this... $$Event_Filter = "( id_event_type = '" & GetField ( "@SYS::EVENT_TYPE_FILTER ") & "' )" - Tim
January 9, 201511 yr Author that works well, too! Of course, I needed to also test for an empty FILTER, so Case ( IsEmpty (@SYS::EVENT_TYPE_FILTER ) ; "" ;"( id_event_type = '" & GetField ( "@SYS::EVENT_TYPE_FILTER ") & "' )" ) is the final calc.
Create an account or sign in to comment