1 #join('|',substitute(prompt('Prompt','token','Excl'),'',grep(prompt('Prompt','token','Excl'),array('Incl', 'Excl /* '))))#
2 And column_name is not null
3 #join('|',substitute(prompt('Prompt','token','Excl'),'',grep(prompt('Prompt','token','Excl'),array('Incl', 'Excl */ '))))#
3 #join('|',substitute(prompt('Prompt','token','Excl'),'',grep(prompt('Prompt','token','Excl'),array('Incl', 'Excl */ '))))#
The prompt named Prompt has two values, Incl and Excl.
When the prompt value is 'Excl' the grep macro in line 1 returns the array element 'Excl /* '. The substitute macro replaces the array element with an array element containing ' /* '. The join macro converts the array element to a string. /* is used as the start of a comment block in Cognos.
Line 3 resolves to */ when the prompt value is 'Excl' thus commenting out line 2 entirely.
Line 3 resolves to */ when the prompt value is 'Excl' thus commenting out line 2 entirely.
No comments:
Post a Comment