Hi!
I have some code inside the enter-tag in a delivery input form (nms:delivery) that I want to move over to a new "extension" input form (let's call it abc:delivery) and use reference from this.
This is mostly just to avoid having too much code clutter in nms:delivery.
I managed to move the container from nms:delivery to abc:delivery, with adding a name in abc:delivery, and reference it with ref="" in the nms:delivery input form, and this worked fine.
But I have quite a lot of code (if, set expr..) inside the enter tag (and leave tag) in nms:delivery that I would like to move there aswell, and use reference instead, like the container.
I think the problem is that my container is shown in the first and main window when opening a delivery, so I only get my enter-code to work if it exists in the top most <enter> directly under the main form-tag. And if I reference my enter-tag above the original enter, it just ignores the original one, so it does not seem like I can have two enter-tags after eachother. And I can't find a way to reference anything from inside the original enter-tag either.
abc:delivery: This is currently how the extension input form (abc:delivery) looks (simplified and just x'ed out some id's etc):
<form _cs="Delivery extension (abc)" created="2020-04-19 17:59:22.975Z" createdBy-id="xxxxxxxx"
entitySchema="xtk:form" img="xtk:form.png" label="Delivery extension"
lastModified="2020-05-26 11:20:00.893Z" md5="XXXXX"
modifiedBy-id="xxxxxxxxxx" name="delivery" namespace="abc"
xtkschema="xtk:form">
<enter name="testEnter">
<set value="Setting fieldOne value" xpath="@fieldOne"/>
</enter>
<container label="Parameters" name="parameters" type="frame">
<value label="Showing fieldOne value" xpath="@fieldOne"/>
<value label="Showing fieldTwo value" xpath="@fieldTwo"/>
</container>
<leave name="testLeave">
<set value="Setting fieldTwo value" xpath="@fieldTwo"/>
</leave>
</form>
nms:delivery: This is currently how the main input form (nms:delivery) looks (super simplified and x'ed out some id's etc):
<form _cs="Delivery (nms)" created="2017-03-08 10:09:18.605Z" createdBy-id="x" editionMode="dialog"
entity-schema="nms:delivery" entitySchema="xtk:form" img="xtk:form.png" label="Delivery"
lastModified="2020-05-25 13:39:22.742Z" maxLabelWidth="50" md5="XXXXX"
modifiedBy-id="xxxxxxxxx" name="delivery" namespace="nms" readOnlyExpr="[/tmp/@readOnly]"
xtkschema="xtk:form">
<enter>
<!-- OTHER EXISTING ORIGINAL NMS ENTER CODE -->
...
<!-- My code is now here, but I want to only reference this from abc -->
<set value="Setting fieldOne value" xpath="@fieldOne"/>
</enter>
<!-- ... Lots of other nms containers ... -->
<!-- My referenced container (that works!) -->
<container label="Parameters" ref="abc:delivery:parameters" type="frame"/>
<!-- ... Lots of other nms containers ... -->
<leave>
<!-- OTHER EXISTING ORIGINAL NMS LEAVE CODE... -->
...
<!-- My code is now here, but I want to only reference this from abc -->
<set value="Setting fieldTwo value" xpath="@fieldTwo"/>
</leave>
</form>
I'm relatively new to Adobe Campaign, so would really appreciate some help, still lots that I find confusing 🙂