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 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.
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 (á) as an argument in the *html_to_text function
For example:
á= left((searchfield),1) = :arg1 && =*html_to_text("á")|||c|arg1
Add an Alphabet Search with International Characters:
Open the Grid Builder from the Web Projects control panel. Under Data Source select SQL Database accessed via AlphaDAO .
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:
あ = left({searchfield},1) = :arg1 && =*html_to_text("あ")|||c|arg1 い = left({searchfield},1) = :arg2 && =*html_to_text("い")|||c|arg2 う = left({searchfield},1) = :arg3 && =*html_to_text("う")|||c|arg3 え = left({searchfield},1) = :arg4 && =*html_to_text("え")|||c|arg4 お = left({searchfield},1) = :arg5 && =*html_to_text("お")|||c|arg5 か = left({searchfield},1) = :arg6 && =*html_to_text("か")|||c|arg6 き = left({searchfield},1) = :arg7 && =*html_to_text("き")|||c|arg7 く = left({searchfield},1) = :arg8 && =*html_to_text("く")|||c|arg8 け = left({searchfield},1) = :arg9 && =*html_to_text("け")|||c|arg9 こ = left({searchfield},1) = :arg10 && =*html_to_text("こ")|||c|arg10 さ = left({searchfield},1) = :arg11 && =*html_to_text("さ")|||c|arg11 し = left({searchfield},1) = :arg12 && =*html_to_text("し")|||c|arg12 す = left({searchfield},1) = :arg13 && =*html_to_text("す")|||c|arg13 せ = left({searchfield},1) = :arg14 && =*html_to_text("せ")|||c|arg14 そ = left({searchfield},1) = :arg15 && =*html_to_text("そ")|||c|arg15 た = left({searchfield},1) = :arg16 && =*html_to_text("た")|||c|arg16 ち = left({searchfield},1) = :arg17 && =*html_to_text("ち")|||c|arg17 つ = left({searchfield},1) = :arg18 && =*html_to_text("つ")|||c|arg18 て = left({searchfield},1) = :arg19 && =*html_to_text("て")|||c|arg19 と = left({searchfield},1) = :arg20 && =*html_to_text("と")|||c|arg20 な = left({searchfield},1) = :arg21 && =*html_to_text("な")|||c|arg21 に = left({searchfield},1) = :arg22 && =*html_to_text("に")|||c|arg22 ぬ = left({searchfield},1) = :arg23 && =*html_to_text("ぬ")|||c|arg23 ね = left({searchfield},1) = :arg24 && =*html_to_text("ね")|||c|arg24 の = left({searchfield},1) = :arg25 && =*html_to_text("の")|||c|arg25 は = left({searchfield},1) = :arg26 && =*html_to_text("は")|||c|arg26 ひ = left({searchfield},1) = :arg27 && =*html_to_text("ひ")|||c|arg27 ふ = left({searchfield},1) = :arg28 && =*html_to_text("ふ")|||c|arg28 へ = left({searchfield},1) = :arg29 && =*html_to_text("へ")|||c|arg29 ほ = left({searchfield},1) = :arg30 && =*html_to_text("ほ")|||c|arg30 ま = left({searchfield},1) = :arg31 && =*html_to_text("ま")|||c|arg31 み = left({searchfield},1) = :arg32 && =*html_to_text("み")|||c|arg32 む = left({searchfield},1) = :arg33 && =*html_to_text("む")|||c|arg33 め = left({searchfield},1) = :arg34 && =*html_to_text("め")|||c|arg34 も = left({searchfield},1) = :arg35 && =*html_to_text("も")|||c|arg35 や = left({searchfield},1) = :arg36 && =*html_to_text("や")|||c|arg36 ゆ = left({searchfield},1) = :arg37 && =*html_to_text("ゆ")|||c|arg37 よ = left({searchfield},1) = :arg38 && =*html_to_text("よ")|||c|arg38 ら = left({searchfield},1) = :arg39 && =*html_to_text("ら")|||c|arg39 り = left({searchfield},1) = :arg40 && =*html_to_text("り")|||c|arg40 る = left({searchfield},1) = :arg41 && =*html_to_text("る")|||c|arg41 れ = left({searchfield},1) = :arg42 && =*html_to_text("れ")|||c|arg42 ろ = left({searchfield},1) = :arg43 && =*html_to_text("ろ")|||c|arg43 わ = left({searchfield},1) = :arg44 && =*html_to_text("わ")|||c|arg44 を = left({searchfield},1) = :arg45 && =*html_to_text("を")|||c|arg45 ん = left({searchfield},1) = :arg46 && =*html_to_text("ん")|||c|arg46
See Also