| **Navigation:**  [[templates.htm|Templates]] > [[tlrcontents.htm|Template Language Reference]] > Complete Alpha Listing >====== #BUTTON (call another page of prompts) {{c6h0068.jpg|C6H0068.jpg}} ====== | [[ break break out of a loop .htm|{{btn_prev_n.gif|Previous page}}]][[tlrcontents.htm|{{btn_home_n.gif|Return to chapter overview}}]][[ call insert code from a group without indention .htm|{{btn_next_n.gif|Next page}}]] | | || | | **#BUTTON** | **(** //string// [, //icon// ] **)** [, **HLP(** //id// **)** ] [, **AT()** ] [, **REQ** ] [, **INLINE**] [, **SORT** ] [, **WHENACCEPTED(**//group//**) **] | | | | [,| **FROM(** //fromsymbol, expression //**)** [, **WHERE(** //condition// **)** ]| ] | | | | | **MULTI(** //multisymbol, expression// **) **| | | | //prompts// | | | | **#ENDBUTTON** | | {{blk2blue.jpg|blk2blue.jpg}} | **#BUTTON** | Creates a command button to call another page of //prompts//. | | //string// | An expression containing the text to display on the button's face. This may contain an ampersand (&) to indicate the "hot" letter for the button. | | //icon// | A string constant containing the name of an .ICO file or standard icon to display on the button's face. The //string// then serves only for "hot" key definition. | | **HLP** | Specifies on-line help is available for the #BUTTON. | | //id// | A string constant containing the identifier to access the Help system. This may be either a Help keyword or "context string." | | **AT** | Specifies the position of the button in the window, relative to the first prompt placed on the window from the Template (excluding the standard prompts on every procedure properties window). This attribute takes the same parameters as the Clarion language AT attribute. Specifying zero width and height indicates the #BUTTON occupies no space on the prompt dialog. | | **REQ** | Specifies the programmer must press the button at least once when the procedure is created. | | **FROM** | Specifies the programmer may enter a set of values for the //prompts// for each instance of the //fromsymbol//. | | //fromsymbol// | A built-in multi-valued symbol which pre-defines all instances on which the //prompts// symbols are dependent. The programmer may not add, change, or delete instances of the //fromsymbol//. | | //expression// | A string expression to format data display in the multiple value display list box. | | **WHERE** | Specifies the #BUTTON displays only those instances of the //fromsymbol// where the //condition// is true. | | //condition// | An expression that specifies the condition for use. | | **MULTI** | Specifies the programmer may enter multiple sets of values for the prompts. This allows multiple related groups of prompts. | | //multisymbol// | A user-defined symbol on which all the //prompts// symbols are dependent. This symbol is internally assigned a unique value for each set of //prompts//. | | **INLINE** | The multiple values the programmer enters for the #BUTTON appears as a list box with update buttons which allow the programmer to enter multiple values. The MULTI or FROM attribute must also be present. | | **SORT** | Sorts the inline list box alphabetically. | | **WHENACCEPTED** | Specifies the named //group// to execute when the #BUTTON is pressed. | | //group// | The name of the #GROUP to execute. | | //prompts// | One or more #PROMPT statements. This may also contain #DISPLAY, #VALIDATE, #ENABLE, and #BUTTON statements. | | **#ENDBUTTON** | Terminates the group of //prompts// which are on the page called by the #BUTTON. | The **#BUTTON** statement creates a command button displaying either the //string// or the //icon// on its face. When the programmer presses the button, a new page of //prompts// appears for selection and entry. Each new page of //prompts// has its own OK, CANCEL, and TEMPLATE HELP buttons as standard fields. All other fields on the page are generated from the //prompts// within the #BUTTON structure. Each page's OK button closes the current page of //prompts//, saving the data the programmer entered in the //prompts//, then returns to the prior window. The CANCEL button closes the current page of //prompts// without saving, then returns to the prior window. If the page calls another page with a nested #BUTTON statement and the programmer presses OK on the lowest level page, then CANCEL on the page that called it, the entire transaction is cancelled. The MULTI attribute specifies the programmer may enter multiple sets of values for the //prompts//. The button calls a window containing a list box to display all the multiple values entered for the sets of //prompts//, along with Insert, Change, and Delete buttons. These three buttons call another window containing all the //prompts// to allow the programmer to update the entries in the list. The //expression// is used to format the information for display in the list box. The FROM attribute also specifies the programmer may enter multiple sets of values for the //prompts//. The button calls a window containing a list box that displays each instance of the //fromsymbol//, along with an Edit button. This button calls another window containing all the //prompts// to allow the programmer to update the entries associated with that instance of the //fromsymbol//. The //expression// is used to format the information for display in the list box. The WHERE attribute may be used to limit the instances of the //fromsymbol// to only those that meet the WHERE //condition//. **Example:** **#PROMPT('Name a File',FILE),%FileName            #!Prompt on the first page** **#BUTTON****('Page Two')                              #!Button on first page calls** **  #PROMPT('Pick One',OPTION),%InputChoice        #!These prompts on second page** **  #PROMPT('Choice One',RADIO)** **  #PROMPT('Choice Two',RADIO)** **  #ENABLE(%InputChoice = 'Choice Two')** **    #PROMPT('Screen Field',CONTROL),%SomeField** **    #VALIDATE(%ScreenFieldType = 'LIST','Must select a list box')** **  #ENDENABLE** **#ENDBUTTON****                                       #!Terminate second page prompts** **#PROMPT('Enter some value',@S20),%InputValue1    #!Another prompt on first page** **#!Multiple input button:** **#BUTTON****('Multiple Names'),MULTI(%ButtonSymbol,%ForeName & ' ' & %SurName)** **  #PROMPT('First Name',@S20),%ForeName** **  #PROMPT('Last Name',@S20),%SurName** **#ENDBUTTON****                                       #!Terminate second page prompts** **#PROMPT('Enter another value',@S20),%InputValue2 #!Another prompt on first page** ** #!Multiple input button dependent on %File:** **#BUTTON****('File Options'),FROM(%File)** **  #PROMPT('Open Access Mode',DROP('Open|Share'),%FileOpenMode** **#ENDBUTTON****                                       #!Terminate second page prompts** **See Also:     **[[ prompt entry types.htm|#PROMPT]] ,[[ validate validate prompt input .htm|#VALIDATE]] ,[[ enable enable disable prompts .htm|#ENABLE]]