How do I define a parameter when creating an advanced query for a custom report?

0 Likes

Problem:

How do I define a parameter when creating an advanced query for a custom report?

Resolution:

QUESTION
----------------------------------
How do I define a parameter when creating an advanced query for a custom report?

ANSWER
----------------------------------
Creating parameters in an advanced query is quite a simple process. Replace the constant value in your SQL Query with code which follows the format:

${||}


Default value and guiname are optional values and your parameter name cannot contain any white spaces. For example, to create a parameter which replaces the constant value "Windows XP":

OLD SCTM QUERY
SELECT Count(AttributeValue) FROM TM_ExecInputAttributes WHERE AttributeValue="Windows XP"

NEW SCTM QUERY
SELECT Count(AttributeValue) FROM TM_ExecInputAttributes WHERE AttributeValue=${PLATFORM|"Windows XP"}


Parameter can be view and edited in the Reports -> Parameters tab


Old KB# 24511
Comment List
Anonymous
Related Discussions
Recommended