Hi,
I have a table of email addresses and login count. If the user logs in for the first time I create a new record and set the count to 1. On subsequent logins, I increment the count.
Before inserting or updating, I “Do a search for” records based on email address. If the first item is empty, I insert a new record, else I update the existing record. I use the “only when” property for this.
What I’ve noticed is that if the user logged in on different days, the search returns empty, so I incorrectly create a new record for the user. However, if the user logged in multiple times in the same day, the search correctly returns not empty and I update the record instead. For e.g.:
- On Monday, user logged in for the first time. A new record gets created with count 1.
- The user logs in again multiple times on Monday. The existing record count gets updated.
- On Tuesday, user logs in, another record gets created. Now there is a duplicate record in the table for the same email.
Any thoughts / ideas on why this might be happening ?
Thanks!