= a!localVariables( local!emails: ri!test.emailAddresses, local!individualMail: if( a!isNullOrEmpty(local!emails), {}, reject(fn!isnull(_), split(local!emails, char(10))) ), local!invalidEmails: substitute( tostring( reject( fn!isnull(_), a!forEach( items: local!individualMail, expression: if( regexmatch( pattern:"^[A-Z0-9\_-]+(\.{0,1}[A-Z0-9\+_-]+)*[@]{1}[A-Z0-9.-]*[A-Z0-9-]+[.]{1}[A-Z]{2,6}$", searchString: fv!item, regexFlags: "si" ), null, fv!index ) ) ) ), ";", "," ), local!validation: if( isnull(local!invalidEmails), {}, "Emails must be in a valid format, and each email must be on a new line. " ), a!formLayout( label: "Test", contents: { a!sectionLayout( contents: { a!columnsLayout( columns: { a!columnLayout( contents: { a!boxLayout( label: "", labelSize: "EXTRA_SMALL", contents: { a!paragraphField( label: "Email Addresses", labelPosition: "JUSTIFIED", placeholder: "Email Addresses should be one per line (can be pasted from Excel) ", value: ri!test.emailAddresses, saveInto: ri!test.emailAddresses, refreshAfter: "UNFOCUS", height: "TALL", required: true, validations: local!validation ) }, style: "#134f5c", marginBelow: "STANDARD" ) } ) } ) } ) }, buttons: a!buttonLayout( primaryButtons: { a!buttonWidget( label: "Submit", saveInto: { }, submit: true, style: "PRIMARY" ) }, secondaryButtons: { a!buttonWidget( label: "Cancel", value: true, saveInto: ri!cancel, submit: true, style: "NORMAL", validate: false ) } ) ) )
it should throw error on UI saying "emails doesn't exists" on the interface and user should be able to correct incorrect emails and then resubmit same form again.
can some please help with process model design and interface
Discussion posts and replies are publicly visible
Your description and process model seems plausible. Maybe add some chaining to route the user back to the interface in case of an issue. Where exactly are you stuck?
if some emails are invalid ,it should go back to same form , it is going to form but the details are missing in the form . how to resolve this
Store that details to a process variable and pass it to a rule input of the interface.