<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
Dyana,
<div class=""><br class="">
</div>
<div class="">I think that the attribute definition that you’ve started writing is based on Rhino, not Nashorn. You should probably update if possible.</div>
<div class=""><br class="">
</div>
<div class=""><a href="https://wiki.openjdk.java.net/display/Nashorn/Rhino+Migration+Guide" class="">https://wiki.openjdk.java.net/display/Nashorn/Rhino+Migration+Guide</a></div>
<div class=""><br class="">
</div>
<div class="">
<div>
<blockquote type="cite" class="">
<div class="WordSection1" style="page: WordSection1; font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
If I can do something like this would be great if (SwitchOn==”true”). I don’t know if that’s possible.</div>
</div>
</blockquote>
<div><br class="">
</div>
<div>Almost anything is possible in a script definition. That should be easy. Just get the right dependencies in place.</div>
<br class="">
<blockquote type="cite" class="">
<div class="WordSection1" style="page: WordSection1; orphans: auto; text-align: start; text-indent: 0px; widows: auto;">
<div style="margin: 0in 0in 0.0001pt;" class=""><font face="Calibri, sans-serif" class=""><span style="font-size: 11pt;" class=""> if (SwitchOn.getValues().get(0).toLowerCase().contains("true</span><span style="font-size: 15px;" class="">”</span><span style="font-size: 11pt;" class="">))</span></font></div>
<div style="font-family: Calibri, sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; margin: 0in 0in 0.0001pt;" class="">
<o:p class=""></o:p></div>
</div>
</blockquote>
<br class="">
</div>
<div>get(0) in the attribute definition is how I would pull the first value.</div>
</div>
<div><br class="">
</div>
<div>If you’re creating attribute values in the script definition, though, you probably don't need a static connector at all. Why not just do it all in logic here?</div>
<div><br class="">
</div>
<div>Take care,</div>
<div>Nate.</div>
</body>
</html>