= 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?
how to add validation in UI based on response received ,if the response says some incorrect emails are present then validation must be "incorrect emails are present" on the same Ui with all same fields which was already there
Add a rule input to the interface and display that error message based on a value that you pass in, e.g. the "success" value of the integration call stored to a process variable.
can you please add more details
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
When the integration is called, you need to store the response of it in a process variable. Then based on what is response, you route back the process to the interface and pass that process variable that has the response, in the Interface's rule input. Now on the interface, if the value of the rule input is null, then no validation should be shown, otherwise, the validation will be visible.
Store that details to a process variable and pass it to a rule input of the interface.
what do i need to select type as to pass process variable response, i haven't used process variables in interface .so i don't have much idea on this .can you please help
Process variables are used in the process. Rule inputs are used in interfaces. And ou establish a connection between the two in process model > User Input Task > Form.
How did you pass the email address from your from to the integration?
The trainings and tutorials in the Appian Academy and documentation will help you understanding these concepts. Highly recommended!