All,
I'm trying to multiply user input number by a constant. I need to use the final number (hoursBack) as a part of a web address.
local(
{Name= "ABCD", daysBack = "7", formError = 1, rv},
While( formError > 0,
formError = 0;
rv = Dialog(
Title( "Select Extract criteria" ),
VList(
HList( "Name:", Name= EditText( Name) ),
HList( "Days Back", daysBack = EditText( daysBack ) ),
HList( Button( "OK" ), Button( "Cancel" ) )
)
);
If( rv["button"] < 0,
Throw( "Bye!" )
);
Name= rv["Name"];
If( Name== "",
formError
++);
daysBack = rv["daysBack"];
If( daysBack == "",
formError
++);
If( formError > 0,
Dialog( "Missing required form input values" )
);
);
Write( "Name=" || Name);
hoursBack = daysBack*24; //Getting an error here
Status Msg( "Extracting data for " || Name);
dt = queryData( "Newtable", hoursBack, Name); //Query data function is defined in a different part of the code
);
Getting the below error -
Cannot convert argument to a number [or matrix] in access or evaluation of 'Multiply' , daysBack * /*###*/24 /*###*/