&SELECT_STRING = "WHERE 1 = 1";
if [some condition] then
&SELECT_STRING = &SELECT_STRING | " AND YOUR_FIELD = '" | &Variable | "'";
end-if;
[more conditions/fields as required]
&RS1 = GetLevel0()(1).GetRowset(Scroll.YOUR_RECORD_VW);
&RS1.Flush();
&RS1.Select(Record.YOUR_RECORD_VW, &SELECT_STRING);
if [some condition] then
&SELECT_STRING = &SELECT_STRING | " AND YOUR_FIELD = '" | &Variable | "'";
end-if;
[more conditions/fields as required]
&RS1 = GetLevel0()(1).GetRowset(Scroll.YOUR_RECORD_VW);
&RS1.Flush();
&RS1.Select(Record.YOUR_RECORD_VW, &SELECT_STRING);
No comments:
Post a Comment