bcooney Posted January 7, 2015 Posted January 7, 2015 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" )
timdietrich Posted January 8, 2015 Posted January 8, 2015 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
bcooney Posted January 8, 2015 Author Posted January 8, 2015 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
timdietrich Posted January 9, 2015 Posted January 9, 2015 How about this... $$Event_Filter = "( id_event_type = '" & GetField ( "@SYS::EVENT_TYPE_FILTER ") & "' )" - Tim
bcooney Posted January 9, 2015 Author Posted January 9, 2015 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. 1
Recommended Posts
This topic is 3875 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now