Skip to main content

setVariable()

Last updated 31/01/2024

Example

This code is setting the global variables ISBN, Title, and UserKey using the setVariable() on the Five object. The variables can then be accessed by using either the

property on the
Five
object, or using the function on the Five object.

Set the global variables for the fields ISBN, Title, and UserKey
function SetSearchISBN(five: Five, context: any, result: FiveError) : FiveError  {
five.setVariable('ISBN', five.field.ISBN);
five.setVariable('Title', `%${five.field.Title}%`);
five.setVariable('UserKey', five.currentUserKey());
five.refreshTable('Book');
five.refreshTable('iUser');
return five.success(result);
}