AnsweredAssumed Answered

<Gel:Parse: var inside another <gel:parse> variable

Question asked by matej256 on Apr 7, 2016
Latest reply on Apr 8, 2016 by matej256

Hi All,


I'd like to ask if someone of you, working with GEL, used <gel:parse> inside next <gel:parse> variable . I didn't find it anywhere but I think it should work.

If not please notify me and suggest another solution. Many Thanks


In this example I'm trying to "re-use" a piece of code where Cost or Budget plan is retrieved. I've put this code into $xogReadFinPlan_Query variable and would like to "add" this variable/XML code into $xogReadFinPlan - the whole XOG read for Cost or Budget plan read according to $Plan_type. I assume a "select" statement there is maybe not correct

but couldn't find out what should be there. Can you please help if anyone knows this? Thanks og

I assume a "select" statement


<!-- Prepare XOG Fin plan read according to Fin plan type, 
  if FORECAST then Cost plan if BUDGET, then Budget plan-->
  <gel:parse var="xogReadFinPlan_Query">
  <Filter name="code" criteria="EQUALS">${Plan_code}</Filter>
  <Filter name="investmentCode" criteria="EQUALS">${Project_code}</Filter>

  <core:if test="${debugFlag != 0}">
  <gel:set asString="true" select="$xogReadFinPlan_Query" var="output"/>
  <core:set value="xogReadFinPlan_Query read: ${output}" var="logMessage"/>
  <gel:log level="DEBUG">${logMessage}</gel:log>

  <!-- Budget plan XOG read -->
  <core:if test="${Plan_type eq 'BUDGET'}">
  <gel:parse var="xogReadFinPlan">
  <NikuDataBus xmlns:xsi="" xsi:noNamespaceSchemaLocation="../xsd/nikuxog_budgetPlan.xsd"> 
  <Header version="" action="read" objectType="budgetPlan" externalSource="NIKU">
  <args name="no_dependencies" value="true"/>
  <gel:set select="$xogReadFinPlan/NikuDataBus" value="${xogReadFinPlan_Query}" insert="true"/>

  <!-- Cost plan XOG read -->
  <core:if test="${Plan_type eq 'FORECAST'}">
  <gel:parse var="xogReadFinPlan">
  <NikuDataBus xmlns:xsi="" xsi:noNamespaceSchemaLocation="../xsd/nikuxog_costPlan.xsd"> 
  <Header version="" action="read" objectType="costPlan" externalSource="NIKU">
  <args name="no_dependencies" value="true"/>
  <gel:set select="$xogReadFinPlan/NikuDataBus"  value="${xogReadFinPlan_Query}" insert="true"/>



Edit: And the error is saying" Missing or invalid XML" ... as usual