toggleall
Toggleall reverses the selection status of all found records.
Syntax
command=toggleall
-
output
(String)
[optional] output format to be returned. Values for
output
can be either json
or xml
(xml
is the default, so you don't need to specify that explicitly). However, the output format produced by jQuery applications is always JSON, so you don't need to specify the output type there either.
Read more about JSON output here.
-
callback
(String)
[optional] returns JSON output wrapped in brackets with your callback function name, for AJAX requests: <callback function name>( <JSON output> ); You don't need to specify
output=json
, because the output format is JSON by default.
Description
You can use a selection to collect records (with getselections) for some common goal, like storing them in a saved search (aka pointer file).
A reversal of selection status means that all currently selected records will be deselected, while all currently deselected records will be selected. All records found by the most recent search will be affected by this command, not just the retrieved records. So if a search finds 315 records, while only the first 10 are actually retrieved, then still all 315 records will be affected by toggleall.
A selection can only be made if in the current session a search yielded a result set, and you want to select a record in that result set. The selection remains intact during the current session and applies only to this session (so you won't be able to observe a WebAPI record selection in your Collections application). In the return XML, selected records have the attribute selected="True"
present in the <record>
node, for example: <record priref="2" selected="True">
.
Examples
-
Start a stateful session
show
For selection commands to work, an active session is required. Usually, a session will be started implicitly when the user begins submitting WebAPI requests, so this explicit startsession
command will often not be required. See the startsession command documentation for more information.
http://test2.adlibsoft.com/api/wwwopac.ashx?database=collect.inf&command=startsession
-
Search all records: return all records from collect.inf
show
- no further description -
http://test2.adlibsoft.com/api/wwwopac.ashx?database=collect.inf&search=all
-
From the result set of the example above, select the record with record number 2
show
- no further description -
http://test2.adlibsoft.com/api/wwwopac.ashx?database=collect.inf&command=selectrecord&priref=2
-
From the result set of the examples above, toggle the selection status of all records
show
Record 2 will be deselected, while all other records will be selected. Execute the command again, and the selection status of all records will be reversed again.
http://test2.adlibsoft.com/api/wwwopac.ashx?database=collect.inf&command=toggleall
Description
- no Adlib.Data-specific description available yet; see the URL request tab for all information -
Examples
Description
- no jQuery-specific description available yet; see the URL request tab for all information -
Examples