Basic 6. Flashlight (Query_find)
Flashlight Specific Process Reference
Flashlight Trigger Reference
Development steps
- Copy the Query_find object group from the APPSTAND.FMB, get the template for the block, window, and canvas, then delete the object group
- Copy the item that will be queried from the data block, set the subclass information, set: Database – Database Item – No, because it is only used to temporarily save the data.
- New Lov (optional, if it is manual input do not need to do, but generally to use Lov, otherwise the error will result in no data)
- Modify the trigger of a button in a query_find block
- To add a query_find trigger in a primary block trigger
- Content:
app_find.query_find(‘TEST_BLOCK‘,‘QUERY_FIND‘,‘QUERY_FIND‘);
- Syntax:
APP_FIND.QUERY_FIND(<results window>,<Find window>,<Find block>);
This trigger will bring up this query window when the user taps the flashlight.
- To add a pre-query trigger in a primary block trigger
IF :PARAMETER.G_QUERY_FIND = ‘TRUE‘ THEN
:TEST_BLOCK.NAME := :QUERY_FIND.NAME;
:TEST_BLOCK.AGE := :QUERY_FIND.AGE;
:TEST_BLOCK.SEX := :QUERY_FIND.SEX;
:TEST_BLOCK.DATE_FROM := :QUERY_FIND.DATE_FROM;
:TEST_BLOCK.DATE_TO := :QUERY_FIND.DATE_TO;
:PARAMETER.G_QUERY_FIND := ‘FALSE‘;
END IF;
You can also use this method to assign a value:COPY (<find Window field>,<results field>);
This trigger assigns the values in the query block to the target block before the query, and when the App_find.find (' Test_block ') is executed, the data can be found.
When a query is a range, such as a data block with only one date field,
So with App_find.query_range (Low_value,high_value,db_item_name)
or App_find.query_date_range (low_value,high_value,db_item_name)
The types of Low_value and High_value can be varchar2/date/number
Detail analysis
- G_query_find
parameter.g_query_find
is a switch that determines the scope of the query.
In the Pre-query trigger, this value is judged to determine whether the query originated from a flashlight operation, thus deciding whether to apply the query condition in the flashlight.
This approach can also be used in our other client development.
From for notes (Wiz)
"EBS FORM" basic 6. Flashlight (Query_find)