Tally up visits

So I have to tally up how many visits that the members have done to a tennis centre, because this then gives the tennis centre the funding they need.

So I can tally up in a ‘Visits’ field no problem, my problem is getting the visits to only tally up once a day as the members will be probably going to the till more than once a day.

Any ideas?

Matt

Whilst taking a walk I worked out a ‘possible’ way to do this.

Add another custom field that shows the date of their current visit, then set a constraint that if the date doesn’t match todays date then increase the tally by 1

What u reckon?

A proably really roundabout way, would be getting your entity data into a sql table and then you can just do a COUNT query on it…
Im sure there is a far more efficient way!

might need help with the constraint.

im thinking '{ENTITY DATA:Customers:Last Visit}' != '{DATE}'

But having the date of their last visit will be helpful too I think

I dont think it’ll be too hard if I get the constraint right.

to increase the field im guessing I would do {{ENTITY DATA:Customers:Visits}+1}

EDIT, this didnt work.

I had to create a setting, and add the action to the rule and then add the setting to the edit entity data action with the setting in, with increment. It works as expected! :smiley:

my solution updates TOTAL visits rather than each visit.

So one Customer visited 4 times in the past week… and another comes in for the first time… his visit number goes to 5 … I cant help that ive done this wrong and my original idea was the one that would have been right?

All fixed. I was over thinking it.

[={ENTITY DATA:Customers:Visit Count}+1]