Report Select Parameter Dynamically by Query | Community
Skip to main content
joe_s66
Level 3
September 17, 2020
Solved

Report Select Parameter Dynamically by Query

  • September 17, 2020
  • 1 reply
  • 1885 views

I'm creating a new content report in ACS AEM commons and I'd like to utilize the "Report Select Parameter Dynamically by Query" component. Specifically I'd like to query all the content authors under " /home/users" and display their name in the dropdown with their rep:authorizableId as the option value. Thanks for any tips.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by AlbinIs1

You can try something like below

Search Parameters - "ACS Commons Report Builder Select Parameter Dynamically by Query"

Label - User Id

Name - userid

Query Language - JCR SQL2

Dropdown Query - SELECT * FROM [rep:User] AS user WHERE ISDESCENDANTNODE([/home/users])

Allowed Property Names: rep:authorizableId

Configuration:

Query - SELECT * FROM [rep:User] AS user WHERE ISDESCENDANTNODE([/home/users]) {{#if userid}} AND [rep:authorizableId] like '{{userid}}' {{/if}}

Query Language - JCR SQL2

Page Size - e.g. 50

 

Configure the required Result Columns

Regards

Albin I

www.albinsblog.com

1 reply

AlbinIs1Community AdvisorAccepted solution
Community Advisor
September 17, 2020

You can try something like below

Search Parameters - "ACS Commons Report Builder Select Parameter Dynamically by Query"

Label - User Id

Name - userid

Query Language - JCR SQL2

Dropdown Query - SELECT * FROM [rep:User] AS user WHERE ISDESCENDANTNODE([/home/users])

Allowed Property Names: rep:authorizableId

Configuration:

Query - SELECT * FROM [rep:User] AS user WHERE ISDESCENDANTNODE([/home/users]) {{#if userid}} AND [rep:authorizableId] like '{{userid}}' {{/if}}

Query Language - JCR SQL2

Page Size - e.g. 50

 

Configure the required Result Columns

Regards

Albin I

www.albinsblog.com

joe_s66
joe_s66Author
Level 3
September 18, 2020
Thanks Albin. Also useful blog post.