Support > Repository > Screen function > Screen transition (2) Transit to search screen

We will explain how to transition from detailed screen and search screen to search screen of arbitrary models. Pass parameters at the same time.

Figure 1 shows an example of preparing buttons to transition from the detailed screen of the estimate model to the search screen of the customer model. Here, the value of "company name" is reused as a search condition.

Figure 1 Example of preparing a button to move to the search screen of customer model

When this button is pushed, the search process of the customer model is performed with the company name given as the search condition. In FIG. 2,Search and list are put together on the same screen.

Figure 2 Search & list screen of customer model

In the "estimate model" shown in Figure 1, open "Screen> Other> Set Java source code".
Here, define the add button as follows.

item Description Input example
screen name Specify which screen to add a button to.Here we will define "Detailed display screen". Detailed display screen
indicate Enable it. (check)
Display condition When displaying buttons always, this column is blank.Please read "button display condition" for conditions.
Button name Specify an arbitrary name.It can also be expressed as an expression. Search by this company
event name Specify the event for the transitioned screen.[To be described later] Reset
Action name Specify the screen to transition.[To be described later] showListCustomer
Additional parameters Parameters can be specified on the transition screen.[To be described later] companyname=${companyname}
Figure 3 Setting the add button

event name

For each screen, events that can be received are prepared.The events that can be accepted on the search screen are as follows.

event name Description
Reset Resets the current search condition and performs search processing using external parameters.It is effective when passing parameters from outside like this time.
Search Use the search condition that was set first.For this reason, the second and subsequent external parameters are not set.This is a screen transition that goes back and forth between the search screen and the list display screen and is an event to hold search conditions.
Search_Condition It is the same as Search, but if there is no parameter, it is treated as an empty search condition was specified.
Event names are case sensitive.Please input correctly.

Action name

A string consisting of a combination of model and screen.It becomes part of address bar (URL).

The search and list display screen is as follows.

"showList" + モデル名(キャメル記法)

With this rule, the action name corresponding to the search list display screen of the model "customer" is "showListCustomer". Extension is not required.

Camel notation: Capitalize the first letter.Remove the underscore included in the model name and capitalize the next letter.For example my_funny_valentine would be MyFunnyValentine.

Additional parameters

Search conditions can be passed directly to the search screen.

The format is "key = value".The key part is the item ID (of the transition destination model).
Using placeholders ($ {...}) in the value part,Transition sourceYou can pass in the value of the item.

To pass multiple parameters, separate them with &.

Additional parameters for realizing the operation in Figure 2 are as follows.The left side of Equal is an item of the customer model, this time it becomes search condition.The right side of the equal is an item of the estimate model.


Initial value setting of receiving side (search condition)

For this item of the receiving side model (customer model in this example), set the REQUEST function to "When initial value> search screen is displayed".

Fig. 4 Initial value of search condition


The following can not be specified for the item name described in the additional parameter.

  • Repeat item
  • Repeating container item
  • A foreign key child model tied to this model

In the examples of Figs. 1 and 2, the "company name" in the customer model was a character string type. Next is an example of dividing "company model" and "customer model".The "company name" of the customer model changes to a structure holding the primary key of the company model.(FIG. 5, FIG. 6)

Figure 5 Definition of company model
Figure 6 Modified customer model


"Company name" in the estimate is model reference (from string type) - reference linked - -.At this time, if you click "Search by this company" button, we will pass the company name code (ID part).

Figure 7 Detailed screen of revised quotation model

For model reference, you can also check that the parameters are crossed.(FIG. 8)

Figure 8 Customer search screen after pressing the button


Quotation model

"Company name" in the estimation model is reference interlocking.In the case of reference linkage, standard content is passed as standard, but this time it is required to pass "ID part" as argument.(This is because the "company name" of the customer model is model reference.)

Therefore, we modify the "additional parameter" of the estimate model shown in Fig. 3 as follows.You can pass ID by giving "#id".

#idFor details of notation, please read "Calculation formula model reference".

Figure 9 Correction of additional parameters

Customer model

In order to set the code (ID part) as the initial value of the search condition,TOINTApply the function.

Fig. 10 Changing the expression of the initial value (application of the TOINT function)

Here is an example of transition from the search screen of model 2 to the search screen of model 1.Here item 1 is a character string type, item 2 is a numeric type, and range searching is enabled.

Definition of model 2

"Additional parameters" of buttons prepared for model 2 are as follows.

Figure 11 Definition of buttons prepared for model 2
  • "Model name _cp." Indicating the search condition is attached to the item name (of model 2) enclosed in $ {and}.
  • In case of range search, "1jshparam" and "2jshparam" are further added to the item name.It means start and end respectively.

Definition of model 1

Initial value of item 1

Indicates the expression of the item item 1 of character string type.Since the same name item 1 is used in the above figure 11, the argument of the REQUEST function is omitted.

Figure 12 item 1 item (character string type) of model 1 that is the receiving side
timing Expression type formula
When search screen is displayed Automatic formula REQUEST()

Initial value of item 2

Indicates the expression of the item item 2 whose numeric type and range search are enabled.It is surrounded by TOINT because it is a numerical type.The starting part is item21jshparam.The end part is item22jshparam.

Figure 13 item 2 item (numerical type) of model 1 which is the receiving side
timing Expression type formula
When search screen is displayed Automatic formula TOINT(REQUEST("item21jshparam"))
When search screen is displayed
(Upper limit item of range search)
Automatic formula TOINT(REQUEST("item22jshparam"))

Notes on operation

When using this setting, be sure to perform search processing of model 2.(You can not pass parameters when search processing is not done at all.)

"Screen Transition (1) Please read" Specifications/Restrictions "to transit from detail screen to registration screen.