Vitalikssssss Posted May 17, 2018 Report Share Posted May 17, 2018 Hi there, Could anyone help me to resolve the issue with the following search logic scenario: a user can search by Date field with "from&to" range with criteria, but if criteria are blank I would like to return records with blank Date field Field datetype: Date&Time Thanks, @Vitalikssssss Quote Link to comment Share on other sites More sharing options...
0 Andrii Posted May 17, 2018 Report Share Posted May 17, 2018 Hello. You can implement such workflow using Search criteria while setting up search and report datapage and some additional jQuery code. We will need 3 criteria fields (Criteria1, Criteria2, Criteria3) You need to set up Criteria1 and Criteria2 fields for "from&to" range search. First one will have Greater than or Equal comparison type and the second will be Less than or Equal. To get all blank fields we need to keep all 3 criteria fields blank and also we need to set up Criteria3 field. This field will be hidden and the comparison type is "Equal". Also we need to select "Match blank values" in advanced section. But now if we choose any values to get range of dates we will get the range and blank values at the same time. That's why we need to add some jQuery code. We need to pass value from Criteria1 and Criteria2 into Criteria3 to make it as a value from a search range. Code is pasted into header of search form. See the implemented APP attached. Regards. Date_Search.zip Quote Link to comment Share on other sites More sharing options...
Question
Vitalikssssss
Hi there,
Could anyone help me to resolve the issue with the following search logic scenario:
a user can search by Date field with "from&to" range with criteria, but if criteria are blank I would like to return records with blank Date field
Field datetype: Date&Time
Thanks,
@Vitalikssssss
Link to comment
Share on other sites
1 answer to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.