Hi,
I am currently stuck in a peculiar situation where a field which is empty in UI and while xogging out it doesn't have that attribute, but still I would like to update that particular attribute with some value. Is there any way out?
For example in my code below the XogWrite response doesnt fetch nov_comment column value in xog output but I would like to update that nov_comment field through gel script.
Check my code below and let me know in case of any details required.
<gel:forEach select="$xogWriteResponse//NikuDataBus/CostPlans/CostPlan/Details/Detail" var="rows1">
<gel:forEach select="$rows1/GroupingAttributes/GroupingAttribute" var="rows2">
<gel:set asString="true" select="$rows2/@code/text()" var="role"/>
<gel:set asString="true" select="$rows2/@value/text()" var="roleValue"/>
<!-- Role 1 Budget - Travel & Meetings -->
<core:if test="${role=='role_id' and roleValue=='bdgt_travel_and_meet'}">
<gel:set select="$rows2/@value" value="aa02_bdgt_tnm_ind_fix"/>
<!-- Set PO Num and Comment start -->
<gel:forEach select="$rows1/CustomInformation/ColumnValue" var="rows3">
<gel:set asString="true" select="$rows3/@name/text()" var="p_num"/>
<core:if test="${p_num=='nov_po_num'}">
<gel:set asString="true" select="$rows3[@name='nov_po_num']/text()" var="ponum"/>
<core:catch var="dbException">
<sql:query escapeText="false"
var="getPO"><![CDATA[SELECT regexp_replace(?, '[^0-9]', '') as val1 from dual
where length(regexp_replace(?, '[^0-9]', '')) = 10
and regexp_replace(?, '[^0-9]', '') like '%300%']]><sql:param value="${ponum}"/>
<sql:param value="${ponum}"/><sql:param value="${ponum}"/>
</sql:query>
</core:catch>
<core:choose>
<core:when test="${dbException != null}">
<gel:log level="ERROR">Failed PO Query for ${roleValue}. Database::${dbException.getMessage()}</gel:log>
</core:when>
<core:when test="${getPO.RowCount != 1}">
<gel:set select="$rows1/CustomInformation/ColumnValue[@name='nov_po_num']/text()" value=""/>
<gel:set select="$rows1/CustomInformation/ColumnValue[@name='nov_comment']/text()" value="${ponum}"/>
</core:when>
<core:otherwise>
<gel:set select="$rows1/CustomInformation/ColumnValue[@name='nov_po_num']/text()" value="${getPO.rows[0].val1}"/>
<gel:set select="$rows1/CustomInformation/ColumnValue[@name='
nov_comment']/text()" value="${ponum}"/>
</core:otherwise>
</core:choose>
</core:if>
</gel:forEach>
<!-- Set PO Num and Comment end -->
</core:if>
</gel:forEach>
</gel:forEach>