Support > Repository > Search control > [Application] Search character strings with full-width half-width characters mixed without using input filter
ja | en

This section explains how to search character string items mixed with alphabets and numbers with full-width half size without using input filter, regardless of full-width and alphabetic capital letters at search.

Wagby provides the function "input filter" as standard.When using this function, double-byte characters are automatically replaced with half-width characters when string type items are stored in the database.

However, we do not use the input filter function here, but assume a character string item with full-width one-byte characters mixed. In such a state, for example, it makes it possible to search by search character string "jasminesoft" (half-width characters and all lower case letters) for items registered in "JasmineSoft" (double-byte characters and mixed case and lower case letters).

In this example, we will explain the "company name" item as an example.Register as company name "JasmineSoft".It is full-width characters.

Figure 1 Customer details display screen

Even if you search by half-width characters it will hit.

Figure 2 Searching with half-width characters

Even if there is a case difference, it will hit.

Figure 3 Search in all lowercase letters

Even all capital letters will hit.

Figure 4 Search in all capital letters

We ignore mid-spaces and search.

Ignore whitespace in Figure 5

The point of definition is to prepare two items "company name"."Companyname" is for normal input and list display.On the other hand, "companyname 2" is hidden on the input screen and it is used for search conditions.

Figure 6 Model item list
Figure 7 Relationship between companyname and companyname2 items

Setting the input filter

For both "companyname" and "companyname 2", the input filter is "string (minimum)".As a result, character strings entered in full-width characters are stored in the database as they are.

Figure 8 Make input filter string (minimum) (1)
Figure 9 Make input filter string (minimum) (2)

All subsequent settings are done for "companyname 2" item.

Calculation formula and database save settings

Set the expression as follows.

ASC (LOWER (SUBSTITUTE (SUBSTITUTE ($ {companyname}, "", ""), "", "")))
Figure 10 Calculation formula setting

ASC functionConverts double-byte characters to half-width characters. LOWER functionWill convert the alphabet to lower case. the first SUBSTITUTE functionReplaces single-byte spaces with empty strings. Another SUBSTITUTE function replaces double-byte spaces with empty strings.

Also, in order to perform a search with this companyname 2 item, save it in the database.

Make it a hidden item

In input control, make it a hidden item.

Fig. 11 Make it hidden when entering

Also in output control, it is supposed to be a hidden item.

Figure 12 Hidden items when output

Do not perform CSV output.With this setting, even when using the CSV download function, this item will not be included.

Figure 13 No CSV output

Setting search conditions

Normalize the character (search condition character string) entered on the search screen as the initial value of the search.Strings stored in the database are also normalized in the same way, so they will definitely hit.

ASC (LOWER (SUBSTITUTE (SUBSTITUTE ($ {companyname 2}, "", ""), "", "")))
Fig. 14 Setting of "initial value" at search