Search Bar Type

Description

Defines the search bar type. The search bar can be an Alphabet Button Bar or a Custom Button Bar.

Discussion

You are not limited to a pre-defined list of buttons showing A through Z when you turn on the Alphabet buttons feature. You can completely customize the buttons that are shown in the button bar and the corresponding search that is performed when you click a button. To customize the buttons, select 'Custom Buttons' in the 'Search bar type' prompt. Then click the smart field in the 'Custom search definition' property. The following dialog will appear:

The Custom Search Bar Dialog lets you customize an Alphabet

The button definition is to the left of the equal sign and the corresponding filter expression is to the right of the equal sign.

You can display arbitrary HTML as the button definition (as long as you set the button style to be button or hyperlink - not dropdown). This means (for example) that you can include images in the buttons.

Result for Example Definition

If you plan to add use arguments in the filter expression and/or use international characters, be aware that .dbf files do not support unicode; they only support acp. You can use arguments in the filter expression using this syntax

Button text = search expression && argumentValue|||argumentType|argumentName

For example:

A..C = left({searchfield},1) >= :arg1 AND left ({searchfield},1) <= :arg1 && a|||c|arg1

The argument value can be an expression if you prefix it with an = sign. For example:

A..C = left({searchfield},1) >= :arg1 AND left({searchfield}, 1) <= :arg1 && ="a"|||c|arg1

argument value. However, if you are using international chanracters, you will need to use the expression syntax to set the argument value to an international character.

For example, say you want to have a button that uses the an acute accent ( ). You can not enter the character directly for either the button label, or the argument value. Instead, you have to use the HTML encoded character (&aacute;) as an argument in the *html_to_text function

For example:

&aacute;= left((searchfield),1) = :arg1 && =*html_to_text("&aacute;")|||c|arg1

Add an Alphabet Search with International Characters: 

  1. Open the Grid Builder from the Web Projects control panel. Under Data Source select SQL Database accessed via AlphaDAO .

  2. Open the Query (AlphaDAO) page. Add a connection string and connect to a table that you want to be able to retrieve data from.

Hiragana Unicode: 

&#12354; = left({searchfield},1) = :arg1 && =*html_to_text("&#12354;")|||c|arg1 
&#12356; = left({searchfield},1) = :arg2 && =*html_to_text("&#12356;")|||c|arg2 
&#12358; = left({searchfield},1) = :arg3 && =*html_to_text("&#12358;")|||c|arg3 
&#12360; = left({searchfield},1) = :arg4 && =*html_to_text("&#12360;")|||c|arg4 
&#12362; = left({searchfield},1) = :arg5 && =*html_to_text("&#12362;")|||c|arg5 
&#12363; = left({searchfield},1) = :arg6 && =*html_to_text("&#12363;")|||c|arg6 
&#12365; = left({searchfield},1) = :arg7 && =*html_to_text("&#12365;")|||c|arg7 
&#12367; = left({searchfield},1) = :arg8 && =*html_to_text("&#12367;")|||c|arg8 
&#12369; = left({searchfield},1) = :arg9 && =*html_to_text("&#12369;")|||c|arg9 
&#12371; = left({searchfield},1) = :arg10 && =*html_to_text("&#12371;")|||c|arg10 
&#12373; = left({searchfield},1) = :arg11 && =*html_to_text("&#12373;")|||c|arg11 
&#12375; = left({searchfield},1) = :arg12 && =*html_to_text("&#12375;")|||c|arg12 
&#12377; = left({searchfield},1) = :arg13 && =*html_to_text("&#12377;")|||c|arg13 
&#12379; = left({searchfield},1) = :arg14 && =*html_to_text("&#12379;")|||c|arg14 
&#12381; = left({searchfield},1) = :arg15 && =*html_to_text("&#12381;")|||c|arg15 
&#12383; = left({searchfield},1) = :arg16 && =*html_to_text("&#12383;")|||c|arg16 
&#12385; = left({searchfield},1) = :arg17 && =*html_to_text("&#12385;")|||c|arg17 
&#12388; = left({searchfield},1) = :arg18 && =*html_to_text("&#12388;")|||c|arg18 
&#12390; = left({searchfield},1) = :arg19 && =*html_to_text("&#12390;")|||c|arg19 
&#12392; = left({searchfield},1) = :arg20 && =*html_to_text("&#12392;")|||c|arg20 
&#12394; = left({searchfield},1) = :arg21 && =*html_to_text("&#12394;")|||c|arg21 
&#12395; = left({searchfield},1) = :arg22 && =*html_to_text("&#12395;")|||c|arg22 
&#12396; = left({searchfield},1) = :arg23 && =*html_to_text("&#12396;")|||c|arg23 
&#12397; = left({searchfield},1) = :arg24 && =*html_to_text("&#12397;")|||c|arg24 
&#12398; = left({searchfield},1) = :arg25 && =*html_to_text("&#12398;")|||c|arg25 
&#12399; = left({searchfield},1) = :arg26 && =*html_to_text("&#12399;")|||c|arg26 
&#12402; = left({searchfield},1) = :arg27 && =*html_to_text("&#12402;")|||c|arg27 
&#12405; = left({searchfield},1) = :arg28 && =*html_to_text("&#12405;")|||c|arg28 
&#12408; = left({searchfield},1) = :arg29 && =*html_to_text("&#12408;")|||c|arg29 
&#12411; = left({searchfield},1) = :arg30 && =*html_to_text("&#12411;")|||c|arg30 
&#12414; = left({searchfield},1) = :arg31 && =*html_to_text("&#12414;")|||c|arg31 
&#12415; = left({searchfield},1) = :arg32 && =*html_to_text("&#12415;")|||c|arg32 
&#12416; = left({searchfield},1) = :arg33 && =*html_to_text("&#12416;")|||c|arg33 
&#12417; = left({searchfield},1) = :arg34 && =*html_to_text("&#12417;")|||c|arg34 
&#12418; = left({searchfield},1) = :arg35 && =*html_to_text("&#12418;")|||c|arg35 
&#12420; = left({searchfield},1) = :arg36 && =*html_to_text("&#12420;")|||c|arg36 
&#12422; = left({searchfield},1) = :arg37 && =*html_to_text("&#12422;")|||c|arg37 
&#12424; = left({searchfield},1) = :arg38 && =*html_to_text("&#12424;")|||c|arg38 
&#12425; = left({searchfield},1) = :arg39 && =*html_to_text("&#12425;")|||c|arg39 
&#12426; = left({searchfield},1) = :arg40 && =*html_to_text("&#12426;")|||c|arg40 
&#12427; = left({searchfield},1) = :arg41 && =*html_to_text("&#12427;")|||c|arg41 
&#12428; = left({searchfield},1) = :arg42 && =*html_to_text("&#12428;")|||c|arg42 
&#12429; = left({searchfield},1) = :arg43 && =*html_to_text("&#12429;")|||c|arg43 
&#12431; = left({searchfield},1) = :arg44 && =*html_to_text("&#12431;")|||c|arg44 
&#12434; = left({searchfield},1) = :arg45 && =*html_to_text("&#12434;")|||c|arg45 
&#12435; = left({searchfield},1) = :arg46 && =*html_to_text("&#12435;")|||c|arg46

See Also