debugger; {% fetchxml DraftRegistration %} {% endfetchxml%} { "totalcount": {{ DraftRegistration.results.total_record_count }} } alert("Query executed..."); {% comment %} {% if DraftRegistration.results != null and DraftRegistration.results.entities != null and DraftRegistration.results.entities.size >= 1 %} {% assign draftRegistration = DraftRegistration.results.entities | first %} {% assign draftRegistrationId = draftRegistration.shu_wellbeingregistrationid %} alert("Directing to existing registration..."); window.location.href = "/edit-registration/?id=" + draftRegistrationId; {% endif %} {% endcomment %}