Chaining models
Tip
Despite dynamics, models have very restricted options for data chaining. Switching to the dynamic data model is strongly recommended, except cases when using model approach is more convenient or dynamic model not usable at all. But keep in mind, models are significantly less flexible in comparison with dynamics.
Chain models with in-build data sources
Currently, models supports chaining with in-built data sources only. Those are: Session
, Storage
and Parameters
.
Note
If source doesn’t contain data, then chaining would be skipped and target parameter would be set to the empty value.
Tip
There is also option to save data from data models to the Storage. Check storage guides for more information.
Session
<!-- in presets -->
<input name="Preset.ErplyApi.SalesDocumentQuery.ClientID<-" value="Session.customer.ID">
<!-- inside the form -->
<form method="post">
<input name="ErplyApi.SalesDocumentQuery.ClientID<-" value="Session.customer.ID">
</form>
Storage
<!-- in presets, expects that storage have the value, otherwise chaining would be skipped -->
<input name="Preset.ErplyApi.SalesDocumentQuery.ClientID<-" value="Storage.customerID">
<!-- inside the form, expects that storage have the value, otherwise chaining would be skipped -->
<form method="post">
<input name="ErplyApi.SalesDocumentQuery.ClientID<-" value="Storage.customerID">
</form>
Parameters
<!-- in presets, expects that storage have the value, otherwise chaining would be skipped -->
<input name="Preset.ErplyApi.SalesDocumentQuery.ClientID<-" value="Parameters.customerID">
<!-- inside the form, expects that storage have the value, otherwise chaining would be skipped -->
<form method="post">
<input name="ErplyApi.SalesDocumentQuery.ClientID<-" value="Parameters.customerID">
</form>