We're reclaiming inactive PDIs to keep them available for active builders. Learn what's changing, who's affected, and how to protect your work. Read More

Calling UI Macro

KiranmaiP
Tera Contributor

Can we  call and print a specific g2 evualate value from parent UI Macro to child UI macro, if yes please provide the syntax to call 

2 REPLIES 2

Not applicable

Hi

 

Can you try this
Parent Macro

<g2:evaluate var="currentUserName" expression="gs.getUser().getFullName()" />
<!-- Pass the value to the child macro -->
<g2:invoke macro="child_macro" currentUserName="${currentUserName}" />

 Child Macro

<j2>${currentUserName}</j2>

KiranmaiP
Tera Contributor

Please suggest another approach. This is giving error : Avoid Dynamic JEXL Expressions in an Evaluate