Jump to content

Portal filter not working as expected


Adam Abrams

This topic is 4790 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Hi! I have a portal showing records of Contacts, where the filter criteria are:

- The contact is specified as an Ongoing Pledge (OGP) donor;

- The most recent donation from them was NOT received in the current month.

This displays a list of all donors with outstanding monthly donations for THIS month.

My filter criteria seemed to work fine and list the right people, however I saw that after I added any donation for someone in the list - even one that was not dated in the current month - their name gets removed from the portal. Yet the criteria for the filtering would seem to indicate that they most definitely should still be listed! And indeed I want them to still be in the list if the current month's donation has not yet been received.

Here's my portal filtering calculation:

-----------

(Contacts::Currently has OGP = "Yes" )

and

Month(Contacts::LastDonationDate) ≠ Month(Get(CurrentDate))

and

Year(Contacts::LastDonationDate) ≠ Year(Get(CurrentDate))

---------

I even set up a button just to throw up a custom dialog to confirm the various values used in the calculation:

"Last donation date: " & Contacts::LastDonationDate & ".

Month of that date is: " & Month(Contacts::LastDonationDate) & ".

Year of it is: " & Year(Contacts::LastDonationDate) & ".

CURRENT month is: " & Month(Get(CurrentDate)) & ".

CURRENT year is: " & Year(Get(CurrentDate)) & "."

The donor in question comes up with this info:

Last donation date: 01/01/2011

Month of that date: 1

Year of that date: 2011

Current month: 3

Current year: 2011

So, by rights they should still be listed in the portal - but they're not.

I imagine I'm missing something totally obvious... but what? Hope someone can see what I can't.

Thanks!

Link to comment
Share on other sites

Well then, I guess my question is, how do I phrase it to require that ALL the three conditions be true, not just one or two of them? Even if LastDonationDate is the same year, I want the donor to appear in the portal if it's not in the same month.

I tried putting brackets between the last two conditions but it didn't make a difference in the portal listing...

Link to comment
Share on other sites

how do I phrase it to require that ALL the three conditions be true

Exactly the way you did. The problem here is one of logic, not syntax. The conditions you have set up simply do not match your stated requirements:

- The contact is specified as an Ongoing Pledge (OGP) donor;

- The most recent donation from them was NOT received in the current month.

Try something like:

Contacts::Currently has OGP = "Yes"

and

Let ( [

lastDon = Contacts::LastDonationDate ;

today = Get (CurrentDate)

] ;

lastDon - Day ( lastDon ) ≠ today - Day ( today ) 

)

Link to comment
Share on other sites

Wait a minute, I see what you mean - I'm forcing BOTH the month and day of the last donation to be different, which is not the criteria I actually want. I just don't want to show the donor if the month and day are both the same... I think I need to take my logic back to the drawing board for a bit!

Link to comment
Share on other sites

Indeed, I just hadn't thought through my logic. This gets me the results I want!

(



Year(Contacts::LastDonationDate)  ≠  Year(Get(CurrentDate))



or



(

Year(Contacts::LastDonationDate)  =  Year(Get(CurrentDate))

and

Month(Contacts::LastDonationDate)  ≠  Month(Get(CurrentDate))

)



)



and



Contacts::Currently has OGP = "Yes"

Thanks for making me think more clearly... :)

Link to comment
Share on other sites

This topic is 4790 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.