BrowseDialog


Author
Message
Larry Caylor
Larry Caylor
StrataFrame VIP (1.2K reputation)StrataFrame VIP (1.2K reputation)StrataFrame VIP (1.2K reputation)StrataFrame VIP (1.2K reputation)StrataFrame VIP (1.2K reputation)StrataFrame VIP (1.2K reputation)StrataFrame VIP (1.2K reputation)StrataFrame VIP (1.2K reputation)StrataFrame VIP (1.2K reputation)
Group: Awaiting Activation
Posts: 592, Visits: 3.7K

Don’t know if it has already been suggested but I’d like to see the BrowseDialog search criteria support a DatePicker control for date fields.

-Larry

Larry Caylor
Larry Caylor
StrataFrame VIP (1.2K reputation)StrataFrame VIP (1.2K reputation)StrataFrame VIP (1.2K reputation)StrataFrame VIP (1.2K reputation)StrataFrame VIP (1.2K reputation)StrataFrame VIP (1.2K reputation)StrataFrame VIP (1.2K reputation)StrataFrame VIP (1.2K reputation)StrataFrame VIP (1.2K reputation)
Group: Awaiting Activation
Posts: 592, Visits: 3.7K
Now that's what I call service. Just think of an enhancement and it's there. Wink (Sorry to bother you guys, I didn't realize you had already added support for DatePicker)
Larry Caylor
Larry Caylor
StrataFrame VIP (1.2K reputation)StrataFrame VIP (1.2K reputation)StrataFrame VIP (1.2K reputation)StrataFrame VIP (1.2K reputation)StrataFrame VIP (1.2K reputation)StrataFrame VIP (1.2K reputation)StrataFrame VIP (1.2K reputation)StrataFrame VIP (1.2K reputation)StrataFrame VIP (1.2K reputation)
Group: Awaiting Activation
Posts: 592, Visits: 3.7K

Now that I’ve had a chance to use DatePicker in the BrowseDialog it I’ve run into a problem. Any search for a date Equal to the date selected in DatePicker fails to return any records even though they exist in the data base.  I’m assuming the probable cause is that the time portion of the date/time field is not being handled correctly to allow a comparison of the dates only.

-Larry

StrataFrame Team
S
StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
Hrm... that's strange.  I'll check into that and see if there is something I can come up with.  However, if the dates in the database all have a time attached to them, then there might not be much I can do, but I will check.
Larry Caylor
Larry Caylor
StrataFrame VIP (1.2K reputation)StrataFrame VIP (1.2K reputation)StrataFrame VIP (1.2K reputation)StrataFrame VIP (1.2K reputation)StrataFrame VIP (1.2K reputation)StrataFrame VIP (1.2K reputation)StrataFrame VIP (1.2K reputation)StrataFrame VIP (1.2K reputation)StrataFrame VIP (1.2K reputation)
Group: Awaiting Activation
Posts: 592, Visits: 3.7K

In SQL server any date stored as type DateTime or SmallDateTime is going to have a time component so you would need to eliminate it to search for a date equal to a specified date. One way to do that would be to use a select statement similar to the following

 

SELECT * FROM [Table] WHERE CONVERT(Char(10),[DateTimeColumn],101) =@SearchDate

 

If you were using a DateTimePicker to specify the search date, your search parameter would be something like

 

@SearchDate = String.Format(“{0:MM/dd/yyyy}”, DateTimePicker.value)

 

Another possibility I considered was adding a computed column (DateOnly) to my table. It would be defined as

 

CONVERT(Char(10),[DateTimeColumn],101)

 

I could then search on this in the BrowseDialog as text field by entering my search date in mm/dd/yyyy format. Some problems with this approach are that >, < searches wouldn’t work and  the Database Deployment Toolkit does not support computed fields which means I would have to modify the database after deploying it. I would also have to use the database and not DDT in ObjectMapper.

 

Regardless on whether or not you can fix this in the framework I suggest adding a “Between” for DateTime fields and displaying two DateTimePikcers for beginning and ending dates when selected  Most of the time, my users are looking for a specific date or a date that falls within a date range.

 

-Larry

 

 

Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
I will look into this.  Thanks.
Larry Caylor
Larry Caylor
StrataFrame VIP (1.2K reputation)StrataFrame VIP (1.2K reputation)StrataFrame VIP (1.2K reputation)StrataFrame VIP (1.2K reputation)StrataFrame VIP (1.2K reputation)StrataFrame VIP (1.2K reputation)StrataFrame VIP (1.2K reputation)StrataFrame VIP (1.2K reputation)StrataFrame VIP (1.2K reputation)
Group: Awaiting Activation
Posts: 592, Visits: 3.7K

Another problem I found with the “computed column” approach is that even if it’s defined as a ReadOnly field in ObjectMapper the framework wants to update it on a Save and since you can’t insert or update a computed column you get an exception. I saw in another post that preventing the framework from trying to save all mapped fields would require a lot of work so this would likely be difficult to fix. When I was considering this approach I had assumed that marking a field as ReadOnly prevented the framework from trying to update the DB.

 

-Larry

 

James H Hansen
James H Hansen
StrataFrame Beginner (11 reputation)StrataFrame Beginner (11 reputation)StrataFrame Beginner (11 reputation)StrataFrame Beginner (11 reputation)StrataFrame Beginner (11 reputation)StrataFrame Beginner (11 reputation)StrataFrame Beginner (11 reputation)StrataFrame Beginner (11 reputation)StrataFrame Beginner (11 reputation)
Group: Forum Members
Posts: 11, Visits: 57
Here's another vote for a "between" option for searches, but for other types as well, e.g.: any numeric type, character strings, etc.  It would look a lot better than having two lines in the search: "Distance between xxxx and xxxx"  It would also be nice if the BrowseDialog optimized this as appropriate for >=, <= or = when appropriate.
Chan
Chan
Advanced StrataFrame User (701 reputation)Advanced StrataFrame User (701 reputation)Advanced StrataFrame User (701 reputation)Advanced StrataFrame User (701 reputation)Advanced StrataFrame User (701 reputation)Advanced StrataFrame User (701 reputation)Advanced StrataFrame User (701 reputation)Advanced StrataFrame User (701 reputation)Advanced StrataFrame User (701 reputation)
Group: Forum Members
Posts: 533, Visits: 2K
I also need "between" range search feature. Has it been implemented? If not, any workaround?

Thank you

StrataFrame Team
S
StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
To implement a "between," you can add the search field twice... one with a "Greater Than" option and one with a "Less Than" option and turn off the Advanced Options for both of those fields.  Then, your users can just select the start and end values for the range.
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search