AnsweredAssumed Answered

Gel Script - Update Master Object Value from Subobject

Question asked by AndreaMcVey on Sep 27, 2010
Latest reply on Oct 6, 2010 by Patrick Cooper
Hi all...

I want to update values on the Investment object from a subobject. Got a script from a previous thread, but am getting an error (described after script...)

<gel:script xmlns:core="jelly:core" xmlns:gel="jelly:com.niku.union.gel.GELTagLibrary"
<gel:setDataSource dbId="Niku"/>

<!-- Get the investment-project id and the field values from the sub object -->
<sql:query var="projid">
select cic_scope, odf_parent_id from odf_ca_cic_proj_status where id=${gel_objectInstanceId}
<!-- Update the parent project record with field data from sub object-->
<core:forEach items="${projid.rows}" trim="true" var="data">
update odf_ca_inv
set cic_scope_status = ${data.cic_scope}
where id=${data.odf_parent_id}

The pulled field is a text field, but the script is reading the text as a column name and not a data value.
I have tried throwing in quotation marks, but still errors out.
I am assuming it is just a syntax error.
Can anyone clarify this for me?