QuerySetCell

Sets a cell to a value.

Method Signature

QuerySetCell(query=[query], column=[string], value=[any], row=[integer])

Arguments

Argument
Type
Required
Description
Default

query

query

true

The query to set the cell in

column

string

true

The column name to set the cell in

value

any

true

The value to set the cell to

row

integer

false

The row number to set the cell in. If no row number is specified, the cell on the last row is set.

Examples

Tag Example

<!--- start by making a query ---> 
 <bx:query name="GetCourses" datasource="cfdocexamples"> 
 SELECT Course_ID, Descript 
 FROM Courses 
 </bx:query> 
<bx:set temp = queryAddRow( GetCourses ) > 
<bx:set Temp = querySetCell( GetCourses, "Number", 100 * CountVar ) > 

Script member function example

<bx:script>
	q = queryNew( "id,name" );
	q.addRow();
	q.setCell( "id", 1, 1 );
	q.setCell( "name", "one", 1 );
	writeDump( q );
</bx:script>

Additional Examples

Run Example

q = queryNew( "id,name" );
QueryAddRow( q );
QuerySetCell( q, "id", 1, 1 );
QuerySetCell( q, "name", "one", 1 );
dump( q );

Last updated

Was this helpful?