SC_LOOKUP() USING

Hi, All

​I have a piece of code as follow ;

​SC_LOOKUP(dataset,"SELECT COUNT(Staff_id) FROM Staff_master_file WHERE Staff_name = ‘John’ ");

{number_of_staff} = {dataset}[0][0];

​My question is can I use SC_LOOKUP() macro like this, my intension is to count the number of staff from staffmaster file and return the result to local variable {number_of_staff}, which will be shown in a form.

​Because I use SELECT COUNT I don’t know that it will return the result into the dataset or not. I already tried this code but get no result.

​If someone have an idea please help me.

Thank & Regards,

​Panya

Hi

​I got it!, I forgot the one of ’ in the command. Now it solved.

Thank

Regards,

Panya