11-20-2007 6:53 PM
How do I pass the <i><b>contents</b></i> of a field to a macro rather than the field name itself?
For example in the SUBT macro below, I want to pass the VALUE of setnode-subsetname to the SUBTOTAL macro, not the field name itself
DEFINE SUBT.
select * from setnode
where setclass = '0101'
and subclass = 'AAAA'.
and SETNAME = '&1'.
SUBTOTAL <b>setnode-subsetname</b> &1.
endselect.
END-OF-DEFINITION
11-20-2007 7:02 PM
Parameters can be accessed with &. You don't need to use the single quotes.
DEFINE SUBT.
select * from setnode
where setclass = '0101'
and subclass = 'AAAA'.
and SETNAME = &1. " << &1 without quotes
SUBTOTAL setnode-subsetname &1.
endselect.
END-OF-DEFINITION
Use of macro:
SUBT 'TEST40'.
Regards,
Naimesh Patel
11-20-2007 7:02 PM
Parameters can be accessed with &. You don't need to use the single quotes.
DEFINE SUBT.
select * from setnode
where setclass = '0101'
and subclass = 'AAAA'.
and SETNAME = &1. " << &1 without quotes
SUBTOTAL setnode-subsetname &1.
endselect.
END-OF-DEFINITION
Use of macro:
SUBT 'TEST40'.
Regards,
Naimesh Patel