setVariable()
Last updated 10/05/2023
Example One
This code is setting the global variables ISBN
, Title
, UserKey
using the setVariable()
on the Five
object. These variables come from the property five.field
on
the current form.
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);
}
Set the global variables for the fields ISBN, Title, and UserKey
function SetSearchISBN(five, context, result) {
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);
}