jamesjames Posted September 5, 2011 Posted September 5, 2011 (edited) Hi. Maybe someone could point me in the right direction.. I have a portal that need to be filtered by 3 different values. And since I want to be able to show all rows if the search field = "0" I cant use the related records function (i think). So I figure I should do it natively in the filter portal calculation. The problem is that I dont know how to build the IF statements correctly. I can use Tider Line::G_Month = "0" or Tider Line::G_Month = Tider Line::Cal_ Month to filter one value, but how do I proceed to include two more, and secure that if they are 0 they will be ignored? Global fields G_Month G_week G_day Cal fields (extracted from a date field) Cal_Month Cal_week Cal_day Or is there a much better way to do this? many thanks. edit: Oh, and also, all the values are numbers, even thou the attachment show text. Edited September 5, 2011 by jamesjames
comment Posted September 5, 2011 Posted September 5, 2011 (edited) How about something like: ( IsEmpty ( gMonth ) or gMonth = cMonth ) and ( IsEmpty ( gWeek ) or gWeek = cWeek ) and ( IsEmpty ( gDay ) or gDay = cDay ) Edited September 5, 2011 by comment
jamesjames Posted September 5, 2011 Author Posted September 5, 2011 Jippi, works like a charm. Much easier calculation then what I tried to write.. Many thanks. ps IsEmpy = IsEmpty
Recommended Posts
This topic is 5179 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