my code stock.com

Using Query Parameters
If the DataSource defined in the AXVW uses a custom SQL restriction or a custom SQL query with parameters, you can set these parameters from your JavaScript code. The parameters will be used in all consequent calls to getRecord()or getRecords() methods.

In the AXVW you need to define <parameter> elements for all parameters used inside the SQL text.

Parameter declarations must specify the parameter data type using the dataType attribute. The supported parameter data types are:

text (or string): the parameter value is a text string which will be converted into a string literal, i.e. all single quotes inside the text will be escaped, and the text itself will be put inside single quotes.
number: the parameter value is a numeric value which will be parsed to verify that it is a valid number.
date: the parameter value is a date which will be parsed to verify that it is a valid date and converted into database-dependent date string representation.
time: the parameter value is a time which will be parsed to verify that it is a valid date and converted into database-dependent time string representation.
literal: the parameter value is a text string which will be inserted into SQL as is.
Parameter declarations can include the default parameter value using the value attribute. The default parameter value will be used if the client JavaScript code does not send a value for this parameter.

Parameter with text or verbatim data type can use ${} binding expressions

Snippet options

Download: Download snippet as using-query-parameters.txt.
Copy snippet: For this you need a free my code stock.com account.
Embed code : You will find the embed code for this snippet at the end of the page, if you want to embed it into a website or a blog!


Create a free my code stock.com account now.

my code stok.com is a free service, which allows you to save and manage code snippes of any kind and programming language. We provide many advantages for your daily work with code-snippets, also for your teamwork. Give it a try!

Find out more and register now

You can customize the height of iFrame-Codes as needed! You can find more infos in our API Reference for iframe Embeds.