Quick Search Bug?

Not sure whether this is a bug or not. But

  1. When I’m doing a quick search on a “GRID” by pressing ENTER after keyword, it doesn’t work. But if I click the search icom (magnifying glass), it WORKS.

  2. I’m doing the same quick search but on an “EDITABLE GRID VIEW”, it WORKS if I press ENTER.

Just curious.

CAPTURE LINK’ bug

CAPTURE LINK bug with Quick Search

(SC updated to las version).

Button ‘Select’ registration fails if previously it has been used ‘Quick Search’ to display any records in the grid: CLICK ON BUTTON SELECT returns no records.

Comment:
Button ‘Select’ registration don’t fails if button ‘Search’ has been used to display any records in the grid.

Result:

  1. Capture link is a common used tool.

  2. ‘Quick Search’ button is very usefull

  3. ‘Quick Search’ button produces a failure on capture link.

  4. Consequences of the bug

suppression of all capture link
or
suppression of all ‘Quick Search’ boxes

in new or updated applications to avoid the bug.

  • Example in attached files: sequence of bug images is bug1 -> bug2 -> bug3
    bug1 image: New record -> Capture link -> Quick search…
    bug2 image: Result of Quick search -> Select buttton pressed to select a record…
    bug3 image: BUG here: And CLICK ON BUTTON SELECT returns no record.

  • SAMPLE MySQL DATABASE to test:

CREATE TABLE IF NOT EXISTS events (
id bigint(20) NOT NULL AUTO_INCREMENT,
date date NOT NULL,
contact varchar(6) NOT NULL,
PRIMARY KEY (id),
KEY contact (contact)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ;

INSERT INTO events (id, date, contact) VALUES
(1, ‘2014-03-04’, ‘n2’),
(2, ‘2014-03-05’, ‘n1’);


CREATE TABLE IF NOT EXISTS people (
id varchar(6) NOT NULL,
name varchar(24) NOT NULL,
PRIMARY KEY (id),
KEY name (name)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

INSERT INTO people (id, name) VALUES
(‘n1’, ‘Name One’),
(‘n2’, ‘Name Two’);

ALTER TABLE events
ADD CONSTRAINT events_ibfk_1 FOREIGN KEY (contact) REFERENCES people (id);

bug3.png

bug2.jpg

bug1.jpg

Hello,

Issue reported to our bugs team.

regards,
Bernhard Bernsmann

More info about bug:

SC Version 7.01.0018 (last upate)

Test in previous sample app:

  • Grid ‘gird_people’

a) If no code is inserted in grid events, ‘select button’ returns the expected id from the record using previously ‘Search button’ or ‘Quick search button’. Environment works as expected.

b) If next code in event (used to start grid empty and force user to filter)

b.1) if 'Search button' is used,
          'Select button' in a record returns the expected record selected id

but
b.2) if ‘Quick search button’ is used,
‘Select button’ in a record don’t returns the expected record selected id

Comment:
‘Search button’ seems to replace inital where clause with full new condition defined by user using the ‘Search button’.
‘Quick search button’ seems to maintain the initial condition established in onScriptInit event when ‘Select button’ is pressed.
Two similar search buttons (the two search buttons are just different in the way in which the user expresses the condition, not its function) act in different ways, not in user filter action, but in the action applied by the ‘Select button’.

Code in onScriptInit event:

if(empty({sc_where_current})) {

// If the filter is empty, the condition below is added to SQL

sc_select_where(add) = "WHERE id = NULL";

}