Tap Forms Database Pro for Mac, iPhone, iPad and Apple Watch › Forums › Using Tap Forms 5 › Date searches don't work
Tagged: bug dates search
- This topic has 6 replies, 3 voices, and was last updated 9 years, 2 months ago by
Mark Dehnert.
-
AuthorPosts
-
August 21, 2016 at 2:08 AM #18904
Fritz ReaderParticipantHello
I have just downloaded the latest version of Tap Forms for Mac (5.0.3), and have started creating a simple Form in a new document.
In this document, I have a date “Some Date”, and I want to query records which have that date of last month or not set at all (by the way, the date filters are way too simplistic; I don’t seem to be able to search records where items are before a dynamic date, for example before last month – unless I’m mistaken of course). But let’s get back to the current point.
I have 3 records: one without date, one with a date in July (last month) and one with yesterday’s date (August).
Then, I have created a “search”, and have set it to do the following:Any of the following are true "Some Date" "is empty" "Some Date" "is in the period" "last month"When I execute this search, it shows me only one record, the one with the July date. It doesn’t display the one w/o a date, although I have configured the search as “any”.
Worse, I then created another search called “no date” with the following arguments:All of the following are true "Some Date" "is empty"Guess what? It returns 2 records: the one w/o a date, and the one with the date in August. WTF???
At this point, I’m ready to accept that I’m doing it all wrong – but then please, come back w proper instructions before I switch back to using FileMaker…
Thank you
FritzAugust 21, 2016 at 2:37 PM #18933
BrendanKeymasterHi Fritz,
Could you please email me a backup of your .tapforms file where you’re having these problems.
I just tested your scenarios and I’m getting results back accordingly.
Thanks,
Brendan
August 22, 2016 at 9:22 AM #18959
Mark DehnertParticipantHello Brendan,
i cannot sort my searches.
Thank you
MarkAugust 22, 2016 at 11:52 AM #18968
BrendanKeymasterHi Mark,
I’m not sure what that has to do with Date searches not working (this forum topic). Could you please elaborate?
Thanks,
Brendan
August 22, 2016 at 1:39 PM #18975
Fritz ReaderParticipantHello Brendan
Sure. Here you go.
BTW, the “no date” search displays correctly only one record (the one w/o date). Yesterday, it also showed another one with the date set in August. Could it be possible that some savings of the record was not done, thus the date was not really saved? I have checked the option to show save buttons now and I’ll keep an eye on this condition going forward.
So the remaining problem is the search with the “or” condition not showing the record w/o a date. It’s still there in the sample document attached.
Thanks for your time looking into this.
Rgds
FritzAttachments:
You must be logged in to view attached files.August 22, 2016 at 3:01 PM #18978
BrendanKeymasterOk, I know what the problem is now. Those “in the period” date comparisons have to be done in a different way in Tap Forms than the regular date searches. It actually applies them only to the results already found, so it ends up being an ALL search instead of an ANY search if you include one of those. This was just a technical limitation of the way Couchbase Lite manages its data. So it’s something I’m going to have to think more about. The only thing I can think of at the moment to fix this problem is to execute a second search request which fetches ALL the records and then check every record to see if it should be included. Right now it’s applying the ‘in the period’ rules only to the found results from the other rule.
August 24, 2016 at 8:30 AM #19034
Mark DehnertParticipantHello Brandon, ok, not the right topic, i will try again. Thanks
-
AuthorPosts
You must be logged in to reply to this topic.