Hi Community,
I have a multistep form, where in the first step I need to perform a validation to check for duplication of data in the database on one specific field on the first step of this form.
The Liquid Code to accomplish this is this one, but I am not sure how to add this code to the step in the form:
{% if entity.cr5d9_nro_id_fiscal %}
{% fetchxml proveedor_query %}
<fetch top="1">
<entity name="cr5d9_datos_proveedor">
<attribute name="cr5d9_nro_id_fiscal" />
<filter>
<condition attribute="cr5d9_nro_id_fiscal" operator="eq" value="{{ entity.cr5d9_nro_id_fiscal }}" />
</filter>
</entity>
</fetch>
{% endfetchxml %}
{% if proveedor_query.results.entities.size > 0 %}
{% validation "cr5d9_nro_id_fiscal" "This Fiscal ID is already registered in the database." %}
{% endif %}
{% endif %}
How do I add this code to the multistep form ? I am not sure I am missing steps for configuration in the Power Pages Admin Portal or overlooking something
I can see the code calling the Multistep form like this :
<div data-component-theme="portalThemeColor7" class="row sectionBlockLayout text-start" style="display: flex; flex-wrap: wrap; margin: 0px; min-height: auto; padding: 8px; border: 0px solid rgb(0, 0, 0); border-radius: 0px; background-position: center center; background-repeat: no-repeat; background-size: cover;">
<div class="container" style="display: flex; flex-wrap: wrap; column-gap: 0px;">
<div class="col-lg-8 columnBlockLayout" style="flex-grow: 1; display: flex; flex-direction: column; min-width: 250px; padding: 16px; margin: 60px 0px; width: calc(66.6667% + 0px);">{% webform name: 'RegistraProveedorPorPasos' %}</div>
<div class="col-lg-4 columnBlockLayout" style="flex-grow: 1; display: flex; flex-direction: column; min-width: 250px; padding: 16px; margin: 60px 0px; width: calc(33.3333% + 0px);">
<p><br /></p>
</div>
</div>
</div>
I will really appreciate any suggestion you may have,
Best Regards,
Carlos.