When searching, you can always include certain conditions. Specify "condition value" and "expression".
An example is shown in which an implicit condition is added that searches only items whose "price" is larger than "0" in the product model.In Figure 1, we create a product with a price of 0 yen.
As shown in Figure 2, it is not displayed in search results.This is because the hidden search condition item "price" is prepared and the condition "greater than 0" is always valid.
If implicit conditions are set, no one can view data that is missing in the condition.Therefore, you can set up permissions that do not apply this condition. Figure 3 shows an example of preparing a principal called "product manager".
If you log on with an account with this principal, all product data will be retrieved.
Opens the detail definition dialog for the model item to which you want to apply implicit conditions.On the "Implicit conditions" tab, set the conditional expression.
In the example shown in Fig. 5, "greater than 0" is specified.
More than one implicit condition can be specified.Only data satisfying all conditions are searched.
First, create new permissions (permissions) for this model.(FIG. 6)
Here we have the authority named "Exclude (p_except)".
Create a principal to manage the added privileges.(FIG. 8)
Here we have prepared a principal named "product manager (product_mgr)".Have exclusion permission.
In the implicit condition setting, set the created "p_except" (excluding) permission in the "Not applicable permission" column.
As shown in Figure 3, implicit conditions are skipped for accounts with this principal.
Implicit conditions are automatically granted to the SQL where clause when querying the database. Therefore, the data itself is stored in the database itself.When using the system, it will not be searched.(Excluding applicable authority)
For string type items, In the condition value partCalculation results can be obtained without referring to itemsFunctions can be used.
The return value of the USERINFO function is a string type.If you want to use an integer type value, use it together with a function such as TOINT.
As an implicit condition, you can use a function whose argument does not have an item of a specific model attached. For example, take a function called ABS which takes an absolute value as an example.
Can I use it?
Can not be used.
In the implicit condition of "date" "time" "date and time" item Notation in "now"You can use.
If the result of the function is NULL or an empty string, narrowing down by implicit condition is not performed.
When using OR search with implicit condition, it is realized by script instead of setting of implicit condition. For details, please read "Customize search conditions with script".
Implicit conditions do not apply to system administrators.
Implicit conditions and normal search conditions can not be used together.In this case, the implicit condition takes precedence and even if you enter a value in the search condition, it is ignored.
If you do not prepare the search/list display screen for that model, implicit conditions can not be used.(The setting will be invalid.)
I will explain the confirmation method when the implicit condition does not work.