Click HERE to see how Saviynt Intelligence is transforming the industry. |
04/12/2022 12:52 PM
Hi,
Is there a way to pre-populate the manager User ID in field 2 based on the user selected in field2
Solved! Go to Solution.
04/12/2022 01:44 PM
Example :
DynamicAttr1 is Enum type and Values, UserId1, UserId2, UserID3,....... and so on.
Then ,
DynamicAttr2 should be Single Select From SQL Query,
value - select username from users where userkey in (Select manager from users where username = '${DynamicAttr1 }')
04/12/2022 01:44 PM
Thanks for the response.
I get the below error: dynamic attribute name is userid
select username from users where userkey in (Select manager from users where username = '${userid}')
No such property: userid for class: SimpleTemplateScript2. Stacktrace follows:
org.codehaus.groovy.grails.web.pages.exceptions.GroovyPagesException: Error processing GroovyPageView: Error executing tag <g:render>: No such property: userid for class: SimpleTemplateScript2
at grails.plugin.springsecurity.web.filter.GrailsAnonymousAuthenticationFilter.doFilter(GrailsAnonymousAuthenticationFilter.java:53)
at grails.plugin.springsecurity.rest.RestAuthenticationFilter.doFilter(RestAuthenticationFilter.groovy:143)
at grails.plugin.springsecurity.web.authentication.logout.MutableLogoutFilter.doFilter(MutableLogoutFilter.java:62)
at grails.plugin.springsecurity.web.SecurityRequestHolderFilter.doFilter(SecurityRequestHolderFilter.java:59)
at com.mrhaki.grails.plugin.xframeoptions.web.XFrameOptionsFilter.doFilterInternal(XFrameOptionsFilter.java:69)
at com.brandseye.cors.CorsFilter.doFilter(CorsFilter.java:82)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: org.codehaus.groovy.grails.web.taglib.exceptions.GrailsTagException: Error executing tag <g:render>: No such property: userid for class: SimpleTemplateScript2
at app_tomcat_apache_tomcat_8_5_29_webapps
04/12/2022 01:44 PM
Please use below example :
DynamicAttr1 is Enum type and Values, UserId1, UserId2, UserID3,....... and so on.
Then ,
DynamicAttr2 should be Single Select From SQL Query,
Please use below value in DynamicAttr2 :
Value in DynamicAttr2 - Select username as ID from users where departmentname=${DynamicAttr1}
Also you have to mention Parent Attribute as DynamicAttr1
Regards,
Rakesh
04/12/2022 01:45 PM
How to specify the entire list of users in the Dynamic Attr1? A company would have more than 60K users.
04/12/2022 01:45 PM
Our requirement is to bring in the companyname attribute value from users table. How do we select company name for the selected user using dynamic attribute?