Choices [examples]

 

Static Lists

Static lists are based on a comma-separated list of choices.

Choices: Buchanan,Callahan,Davolio,Dodsworth,Fuller,King,Leverling,Peacock,Suyama

Dynamic List

A dynamic list is based on the evaluation of an expression from a specified table.

@<table-name>,<expression>

Here the list is based on the current values of the lastname field from the employees table.

Choices: @employees,lastname

SQL Select List

A SQL Select list is generated by the resultset from a SQL Select statement.

Here the list is based on the ordered current values of the lastname field from the employees table.

Choices: select lastname from employees order by lastname

Note: to display a blank value at the top of the choice list, prefix the SQL Select statement with a ‘+’.

Choices: +select lastname from employees order by lastname

User Defined Function

The list can be based on the return value from a user defined function or procedure (Lianja/VFP scripting).

{UserDefinedFunction()}

The return value should be a comma-separated list. Here the list is based on the return value from the ‘getempname’ procedure defined in the App’s custom library.

Choices: {getempname()}

As in the other examples, it returns the lastname field values from the employees table.

proc getempname()
	sqlvalues("select lastname from employees order by lastname")
	creturn = astring(_sqlvalues)
	return creturn
endproc

https://www.lianja.com/doc/index.php/Choices


 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.