Previously I was using separate email context for different subjects and I was doing something like this.
Now I want to fetch organization name from VM file only from formRowModels but this is giving an error.
${ctx.formRowModels.stream().filter(row -> row.getKey().contains("Organization"))}
This is because when you're writing code in a VM file, you're not using Java but VTL (Velocity Template Language). You need to filter the desired value using a combination of #foreach
& #if #else
directives.
Example:
#foreach ($row in $ctx.yourList)
#if ($row ... )
doSomethingHere
#end
#end