photo

Wayne McGowan

shared this problem
6 years ago

Employees Involved

photo

Ryan Bonham

Admin

photo

PIV Support

Admin

Statistics

7
Comments
472
Views

Share

1
votes

Date Search

I am having some issue with date search.

Open Realty 3.2.1

Basically every search that include more than one date does not work no matter what search type I use in "Search Page Options" in the "Field Editor"

Regular min/max pull down actually works but the number do not look like day formats, just numbers.

Even when I use the search type "Date range; two text fields"

That actually give me this "YearBuilt-mindate=1970&YearBuilt-maxdate=1985"

I only get a result if I use a custom form using

"YearBuilt-min and YearBuilt-max" not YearBuilt-mindate and YearBuilt-maxdate that the current defualt is using.

I hope I made sense and someone can verify this and someone can verify this

Thank you

Not a Problem
+1 The same problem
Add Comment

Comments (7)

photo
1

Any take on this at all?

I just need to make sure it's not my setup or my server.

Thank you

photo Employee
1

Wayne,

1970 is not a complete date. Date Search work with Date fields, which contain full and valid dates.. In your case the use of -min and -max is correct as you have a simple number field to search.

photo
1

Thanks Ryan but how would you enter info in the "year_built" field?

Even in the demo it's entered in that format and is a text field.1. After Reading your response I installed Open Realty 3.2.1

It had 4 demo listings after installation

Year Built fields for the 4 demo listings are as follows

1793

1800

1884

1990

In "Listing Field Editor"

Field Type: Text Field

Search Page Options tab

Search Type: Distinct - allow multiple

This returns no results although it clearly shows the values you can click on on the search page.

2. I then set

Search Type: Date range; two text fields

This will not allow me to enter

1793

1800

1884

1990

or any of the dates that came with the demo install.

3. "Checkbox list of distinc values"

This also returns no results

4. Distinct list - allow multiple

Does not return any results althou I could clearly click values form the list.

So is the date example in the demo listings wrong?

Thank you

photo Employee
1

Field Type: Text Field

That's not a Date Field, that's a Text Field that in this case contains a numeric 4 digit year and not a date. The date range search type in OR only works with Date Fields that contain a valid date in the proper Date Format that is set in Site Config --> Listings.

photo
1

1. I agree it's not a date field, I noted above that it was a text field but it come in your demo install so you need to change that example.

2. How do you explain why my example in point 2,3 and 4 does not return a result in that it's entered as a text field data.

Can you please run the test I did above, it's using the fresh install of Open Realty 3.2.1

I am not trying to make trouble, I am simply trying to get the search function to work on that field in spite the fact it's not in a date format.

The fact it's in a text field should allow returns on the test I indicated above.

Thanks for your response

photo Employee
1

The demo does not contain a date example search.

The example "Year Built" field in the OR demo contains a 4 digit year, and as such this could be set to be a Number or Text field.

"Search Type: Date range; two text fields" means two HTML text-type input fields i.e. <input type="text">, you still need to have the contents of the fields stored as a valid date and enter a valid date in a Date Range search field.

1985 = year

01/10/1985 = date

photo
1

Thank you PIV

Leave Comment

photo

Attach files...

The file must be a jpg, gif, png, bmp, ico, pdf, doc, rtf, txt, zip or rar no more than 20M