hmLoadTopic({
hmKeywords:"",
hmTitle:"Select",
hmDescription:"Executes a query in the database.  GET: api\/v1\/<apiresource>\/crud\/<filename>  <apiresource> ApiResource name. e.g. apidemo.  <filename> Name of the file on which the operatio",
hmPrevLink:"lk_read.html",
hmNextLink:"lk_new.html",
hmParentLink:"lk_crud-operations.html",
hmBreadCrumbs:"<a href=\"lk_linkarws-operations.html\">LinkarWS Operations<\/a> &gt; <a href=\"lk_crud-operations.html\">CRUD Operations<\/a>",
hmTitlePath:"LinkarWS Operations > CRUD Operations > Select",
hmHeader:"<h1 class=\"p_Heading1\" style=\"page-break-after: avoid;\"><span class=\"f_Heading1\">Select<\/span><\/h1>\n\r",
hmBody:"<p class=\"p_Normal\">Executes a query in the database.<\/p>\n\r<p class=\"p_Normal\">&nbsp;<\/p>\n\r<p class=\"p_Normal\"><span style=\"font-weight: bold;\">GET<\/span>: api\/v1\/<span style=\"font-weight: bold;\">&lt;apiresource&gt;<\/span>\/crud\/<span style=\"font-weight: bold;\">&lt;filename&gt;<\/span><\/p>\n\r<p class=\"p_Normal\">&nbsp;<\/p>\n\r<p class=\"p_Normal\" style=\"text-indent: 0; padding-left: 0.8125rem; margin-left: 0;\"><span class=\"f_Normal\" style=\"font-family: Arial,\'Lucida Sans Unicode\',\'Lucida Grande\',\'Lucida Sans\';display:inline-block;width:0.8125rem;margin-left:-0.8125rem\">&#8226;<\/span><span style=\"font-style: italic;\">&lt;apiresource&gt;<\/span> ApiResource name. e.g. <span style=\"font-style: italic;\">apidemo<\/span>.<br \/>\n\r<span style=\"font-style: italic;\">&nbsp;<\/span><\/p><p class=\"p_Normal\" style=\"text-indent: 0; padding-left: 0.8125rem; margin-left: 0;\"><span class=\"f_Normal\" style=\"font-family: Arial,\'Lucida Sans Unicode\',\'Lucida Grande\',\'Lucida Sans\';display:inline-block;width:0.8125rem;margin-left:-0.8125rem\">&#8226;<\/span><span style=\"font-style: italic;\">&lt;filename&gt;<\/span> Name of the file on which the operation is performed. e.g. <span style=\"font-style: italic;\">LK.CUSTOMERS<\/span><br \/>\n\r<span style=\"font-style: italic;\">&nbsp;<\/span><\/p><p class=\"p_Normal\" style=\"text-indent: 0; padding-left: 0.8125rem; margin-left: 0;\"><span class=\"f_Normal\" style=\"font-family: Arial,\'Lucida Sans Unicode\',\'Lucida Grande\',\'Lucida Sans\';display:inline-block;width:0.8125rem;margin-left:-0.8125rem\">&#8226;<\/span>{id} Parameter. Code of the record to be read. e.g. <span style=\"font-style: italic;\">api\/v1\/apidemo\/crud\/LK.CUSTOMERS\/10<\/span><\/p><p class=\"p_Normal\">&nbsp;<\/p>\n\r<p class=\"p_Normal\"><span style=\"font-style: italic;\">Select<\/span> operation has 2 more variants: <span style=\"font-style: italic;\">DICTIONARIES<\/span> and <span style=\"font-style: italic;\">SCHEMA<\/span>. The difference between the 3 variants is in how the results are displayed.<\/p>\n\r<p class=\"p_Normal\">Input and output parameters are the same in all 3 variants, and the differences are present only when records have multivalues.<\/p>\n\r<p class=\"p_Normal\">For more information, see <span style=\"font-style: italic;\">Response <\/span>section below.<\/p>\n\r<p class=\"p_Normal\">&nbsp;<\/p>\n\r<p class=\"p_Normal\">&nbsp;<\/p>\n\r<p class=\"p_Normal\"><span style=\"font-weight: bold;\">GET<\/span> (DICTIONARIES mode): api\/v1\/<span style=\"font-weight: bold;\">&lt;apiresource&gt;<\/span>\/crud\/dict\/<span style=\"font-weight: bold;\">&lt;filename&gt;<\/span><\/p>\n\r<p class=\"p_Normal\"><span style=\"font-weight: bold;\">GET<\/span> (SCHEMA mode): api\/v1\/<span style=\"font-weight: bold;\">&lt;apiresource&gt;<\/span>\/crud\/sch\/<span style=\"font-weight: bold;\">&lt;filename&gt;<\/span><\/p>\n\r<p class=\"p_Normal\">&nbsp;<\/p>\n\r<p class=\"p_Normal\">&nbsp;<\/p>\n\r<p class=\"p_Normal\">&nbsp;<\/p>\n\r<p class=\"p_Normal\"><span style=\"font-size: 1.09rem; font-weight: bold;\">Parameters<\/span><\/p>\n\r<p class=\"p_Normal\">&nbsp;<\/p>\n\r<div style=\"text-align: left; text-indent: 0; padding: 0 0 0 0; margin: 0 0 0 0;\"><table class=\"argumentos\" >\n\r<tr class=\"argumentos\">\n\r<td class=\"argumentos\" style=\"width:13.8125rem;\"><p class=\"p_Normal\">select_clause<\/p>\n\r<\/td>\n\r<td class=\"argumentos\" style=\"width:5.8125rem;\"><p class=\"p_Normal\">string<\/p>\n\r<\/td>\n\r<td class=\"argumentos\" style=\"width:49.3750rem;\"><p class=\"p_Normal\">Statement fragment specifies the selection condition. For example WITH CUSTOMER = \'1\'<\/p>\n\r<\/td>\n\r<\/tr>\n\r<tr class=\"argumentos\">\n\r<td class=\"argumentos\" style=\"width:13.8125rem; background-color:#CCFFFF;\"><p class=\"p_Normal\">sort_clause<\/p>\n\r<\/td>\n\r<td class=\"argumentos\" style=\"width:5.8125rem; background-color:#CCFFFF;\"><p class=\"p_Normal\">string<\/p>\n\r<\/td>\n\r<td class=\"argumentos\" style=\"width:49.3750rem; background-color:#CCFFFF;\"><p class=\"p_Normal\">Statement fragment specifies the selection order. If there is a selection rule Linkar will execute a SSELECT, otherwise Linkar will execute a SELECT. For example BY CUSTOMER<\/p>\n\r<\/td>\n\r<\/tr>\n\r<tr class=\"argumentos\">\n\r<td class=\"argumentos\" style=\"width:13.8125rem;\"><p class=\"p_Normal\">dict_clause<\/p>\n\r<\/td>\n\r<td class=\"argumentos\" style=\"width:5.8125rem;\"><p class=\"p_Normal\">string<\/p>\n\r<\/td>\n\r<td class=\"argumentos\" style=\"width:49.3750rem;\"><p class=\"p_Normal\">Space-delimited list of dictionaries to read. If this list is not set, all fields are returned. For example CUSTOMER DATE ITEM. In NONE mode you may use the format LKFLDx where x is the attribute number.<\/p>\n\r<\/td>\n\r<\/tr>\n\r<tr class=\"argumentos\">\n\r<td class=\"argumentos\" style=\"width:13.8125rem; background-color:#CCFFFF;\"><p class=\"p_Normal\">preselect_clause<\/p>\n\r<\/td>\n\r<td class=\"argumentos\" style=\"width:5.8125rem; background-color:#CCFFFF;\"><p class=\"p_Normal\">string<\/p>\n\r<\/td>\n\r<td class=\"argumentos\" style=\"width:49.3750rem; background-color:#CCFFFF;\"><p class=\"p_Normal\">An optional command that executes before the main Select.<\/p>\n\r<\/td>\n\r<\/tr>\n\r<tr class=\"argumentos\">\n\r<td class=\"argumentos\" style=\"width:13.8125rem;\"><p class=\"p_Normal\">only_records_ids<\/p>\n\r<\/td>\n\r<td class=\"argumentos\" style=\"width:5.8125rem;\"><p class=\"p_Normal\">boolean<\/p>\n\r<\/td>\n\r<td class=\"argumentos\" style=\"width:49.3750rem;\"><p class=\"p_Normal\">Returns just the selected record codes<\/p>\n\r<\/td>\n\r<\/tr>\n\r<tr class=\"argumentos\">\n\r<td class=\"argumentos\" style=\"width:13.8125rem; background-color:#CCFFFF;\"><p class=\"p_Normal\">pagination<\/p>\n\r<\/td>\n\r<td class=\"argumentos\" style=\"width:5.8125rem; background-color:#CCFFFF;\"><p class=\"p_Normal\">boolean<\/p>\n\r<\/td>\n\r<td class=\"argumentos\" style=\"width:49.3750rem; background-color:#CCFFFF;\"><p class=\"p_Normal\">Indicates if pagination is being used or not.<\/p>\n\r<\/td>\n\r<\/tr>\n\r<tr class=\"argumentos\">\n\r<td class=\"argumentos\" style=\"width:13.8125rem;\"><p class=\"p_Normal\">reg _page<\/p>\n\r<\/td>\n\r<td class=\"argumentos\" style=\"width:5.8125rem;\"><p class=\"p_Normal\">integer<\/p>\n\r<\/td>\n\r<td class=\"argumentos\" style=\"width:49.3750rem;\"><p class=\"p_Normal\">In case of pagination, indicates the number of records by page. It must be greater than 0.<\/p>\n\r<\/td>\n\r<\/tr>\n\r<tr class=\"argumentos\">\n\r<td class=\"argumentos\" style=\"width:13.8125rem; background-color:#CCFFFF;\"><p class=\"p_Normal\">num_page<\/p>\n\r<\/td>\n\r<td class=\"argumentos\" style=\"width:5.8125rem; background-color:#CCFFFF;\"><p class=\"p_Normal\">integer<\/p>\n\r<\/td>\n\r<td class=\"argumentos\" style=\"width:49.3750rem; background-color:#CCFFFF;\"><p class=\"p_Normal\">In case of pagination indicates the page to obtain. This must be greater than 0.<\/p>\n\r<\/td>\n\r<\/tr>\n\r<tr class=\"argumentos\">\n\r<td class=\"argumentos\" style=\"width:13.8125rem;\"><p class=\"p_Normal\">calculated<\/p>\n\r<\/td>\n\r<td class=\"argumentos\" style=\"width:5.8125rem;\"><p class=\"p_Normal\">boolean<\/p>\n\r<\/td>\n\r<td class=\"argumentos\" style=\"width:49.3750rem;\"><p class=\"p_Normal\">Return the resulting values from the calculated dictionaries.<\/p>\n\r<\/td>\n\r<\/tr>\n\r<tr class=\"argumentos\">\n\r<td class=\"argumentos\" style=\"width:13.8125rem; background-color:#CCFFFF;\"><p class=\"p_Normal\">conversion<\/p>\n\r<\/td>\n\r<td class=\"argumentos\" style=\"width:5.8125rem; background-color:#CCFFFF;\"><p class=\"p_Normal\">boolean<\/p>\n\r<\/td>\n\r<td class=\"argumentos\" style=\"width:49.3750rem; background-color:#CCFFFF;\"><p class=\"p_Normal\">Execute the defined conversions in the dictionaries before returning.<\/p>\n\r<\/td>\n\r<\/tr>\n\r<tr class=\"argumentos\">\n\r<td class=\"argumentos\" style=\"width:13.8125rem;\"><p class=\"p_Normal\">format_spec<\/p>\n\r<\/td>\n\r<td class=\"argumentos\" style=\"width:5.8125rem;\"><p class=\"p_Normal\">boolean<\/p>\n\r<\/td>\n\r<td class=\"argumentos\" style=\"width:49.3750rem;\"><p class=\"p_Normal\">Execute the defined formats in the dictionaries before returning<\/p>\n\r<\/td>\n\r<\/tr>\n\r<tr class=\"argumentos\">\n\r<td class=\"argumentos\" style=\"width:13.8125rem; background-color:#CCFFFF;\"><p class=\"p_Normal\">original_record<\/p>\n\r<\/td>\n\r<td class=\"argumentos\" style=\"width:5.8125rem; background-color:#CCFFFF;\"><p class=\"p_Normal\">boolean<\/p>\n\r<\/td>\n\r<td class=\"argumentos\" style=\"width:49.3750rem; background-color:#CCFFFF;\"><p class=\"p_Normal\">Return a copy of the records in MV format.<\/p>\n\r<\/td>\n\r<\/tr>\n\r<tr class=\"argumentos\">\n\r<td class=\"argumentos\" style=\"width:13.8125rem;\"><p class=\"p_Normal\">custom_vars<\/p>\n\r<\/td>\n\r<td class=\"argumentos\" style=\"width:5.8125rem;\"><p class=\"p_Normal\">string<\/p>\n\r<\/td>\n\r<td class=\"argumentos\" style=\"width:49.3750rem;\"><p class=\"p_Normal\">This is a free text field to send in the transaction. If not empty, subroutine SUB.LK.MAIN.CONTROL.CUSTOM will be called. Add custom code to that subroutine to define special behaviours for some or all transactions.<\/p>\n\r<\/td>\n\r<\/tr>\n\r<tr class=\"argumentos\">\n\r<td class=\"argumentos\" style=\"width:13.8125rem; background-color:#CCFFFF;\"><p class=\"p_Normal\">svr_timeout<\/p>\n\r<\/td>\n\r<td class=\"argumentos\" style=\"width:5.8125rem; background-color:#CCFFFF;\"><p class=\"p_Normal\">integer<\/p>\n\r<\/td>\n\r<td class=\"argumentos\" style=\"width:49.3750rem; background-color:#CCFFFF;\"><p class=\"p_Normal\">This is the maximum time in seconds that the client will wait for a response. Use 0 for no timeout.<\/p>\n\r<\/td>\n\r<\/tr>\n\r<\/table>\n\r<\/div>\n\r<p class=\"p_Normal\"><span style=\"font-size: 0.91rem; font-style: italic;\">(*) Mandatory<\/span><\/p>\n\r<p class=\"p_Normal\">&nbsp;<\/p>\n\r<p class=\"p_Normal\">&nbsp;<\/p>\n\r<p class=\"p_Normal\">&nbsp;<\/p>\n\r<p class=\"p_Normal\"><span style=\"font-size: 1.09rem; font-weight: bold;\">Request Body<\/span><\/p>\n\r<p class=\"p_Normal\">Unused<\/p>\n\r<p class=\"p_Normal\">&nbsp;<\/p>\n\r<p class=\"p_Normal\">&nbsp;<\/p>\n\r<p class=\"p_Normal\">&nbsp;<\/p>\n\r<p class=\"p_Normal\"><span style=\"font-size: 1.09rem; font-weight: bold;\">Responses<\/span><\/p>\n\r<p class=\"p_Normal\">On all kind of responses, an <span style=\"font-style: italic;\">ERROR<\/span> tag will list all possible errors during execution of the operation. This tag includes <span style=\"font-style: italic;\">CODE<\/span> tag with the error codes and <span style=\"font-style: italic;\">MESSAGE<\/span> tag with messages of each error.<\/p>\n\r<p class=\"p_Normal\">In responses of type &quot;text\/plain&quot; (LkString MV), error codes and messages are separated by multivalue marks.<\/p>\n\r<p class=\"p_Normal\">&nbsp;<\/p>\n\r<p class=\"p_Normal\"><span style=\"font-style: italic; font-weight: bold;\">application\/json<\/span><\/p>\n\r<p class=\"p_Normal\">Response is displayed in JSON format. For more information about the different tags in this response, <a href=\"lk_application_json.html\" class=\"topiclink\">click here<\/a>.<\/p>\n\r<p class=\"p_Normal\">&nbsp;<\/p>\n\r<p class=\"p_Normal\"><img style=\"margin:0;width:30.0000rem;height:23.0625rem;border:none\" src=\".\/images\/json_response.png\"\/><\/p>\n\r<p class=\"p_Normal\">&nbsp;<\/p>\n\r<p class=\"p_Normal\">&nbsp;<\/p>\n\r<p class=\"p_Normal\"><span style=\"font-style: italic; font-weight: bold;\">application\/xml<\/span><\/p>\n\r<p class=\"p_Normal\">Response is displayed in XML format. For more information about the different tags in this response, <a href=\"lk_application_xml.html\" class=\"topiclink\">click here<\/a>.<\/p>\n\r<p class=\"p_Normal\">&nbsp;<\/p>\n\r<p class=\"p_Normal\"><img style=\"margin:0;width:30.0000rem;height:24.1250rem;border:none\" src=\".\/images\/xml_response.png\"\/><\/p>\n\r<p class=\"p_Normal\">&nbsp;<\/p>\n\r<p class=\"p_Normal\">&nbsp;<\/p>\n\r<p class=\"p_Normal\"><span style=\"font-style: italic; font-weight: bold;\">text\/plain<\/span><\/p>\n\r<p class=\"p_Normal\">Response is displayed in text format. This response is a chain of characters structured in sections, named <span style=\"font-style: italic;\">LkString<\/span>. For more information about the different tags in this response, <a href=\"lk_text_plain.html\" class=\"topiclink\">click here<\/a>.<\/p>\n\r<p class=\"p_Normal\">&nbsp;<\/p>\n\r<p class=\"p_Normal\"><img style=\"margin:0;width:30.0000rem;height:19.1875rem;border:none\" src=\".\/images\/text_response.png\"\/><\/p>\n\r<p class=\"p_Normal\">&nbsp;<\/p>\n\r<p class=\"p_Normal\">&nbsp;<\/p>\n\r"
})
