Hi @heku_ ,
In Adobe campaign the xpathsToLoad and xpathsToLoadOpt attributes in input forms are used to define which data fields (XPath references) from the underlying schema are loaded when a form is rendered.
xpathsToLoad : Is the mandatory XPath fields that must be loaded when the form is opened. These are the core fields required for the form to function correctly. This Fields listed in xpathsToLoad are always retrieved from the database, regardless of whether they are immediately displayed or used in the form. This ensures that essential data is available for processing or display.
xpathsToLoadOpt: Is the optional XPath fields that are loaded only when needed or explicitly requested by the form's logic or user interaction. This Fields in xpathsToLoadOpt are not loaded by default when the form opens. They are fetched on-demand, typically when a specific action (e.g., a button click or tab switch) or condition requires them. This helps optimize performance by reducing the initial data load.
Example:
A delivery form (nms:delivery) in Adobe Campaign:
- xpathsToLoad: You might include @id, @label, and @state because these are essential for identifying and displaying the delivery.
- xpathsToLoadOpt: You might include @deliveryCode or @trackingUrl because these are only needed when viewing advanced details or performing specific actions.
Thanks
Sushant Trimukhe