As shown in the above image i have a record table and from this record table i have to retrieve the fields recruiter and candidateID so i can send e-mails to them.
This was my code for retrieving the data from the fields and then sending them automated emails. But, i am not getting any mails. Can anyone please help me about where i went wrong so i can rectify it.
Discussion posts and replies are publicly visible
The send email node has a few outputs that provide insights of what email could be sent.
Receiving an email is a whole different story and heavily depends on external systems (mail servers, DNS, SPAM filters ...) outside of your control.
But when i choose an user it is sending an email to the user's email.
OK. And the node outputs?
I didnt give any Node outputs. even when i just gave the specified user i didnt give any node outputs or inputs and yet got the mail. But when iam trying to do that same while retrieving the fields iam not getting the mails.
your filter code is wrong.
field should not have pv!record. It should be just IP Add Details.recruiter ,
value should have pv!record. So if recruiter columns stores recruiter record then value should be pv!record[IP Add Details.recruiter]. If you understand the code you would want system to filter the rows in record where recruiter field in record matches with provided recruiter value. So value should have pv and field should not!
One question I have is the field IP Add Details.recruiter - > what data is in this field?
On another note, Is the recruiter id same as recruiter's username in appian? If yes can you replace the lines 5-16 with the below expression and try.
toemailaddress(pv!record[IP Add Details.recruiterId])
Harsha Sharma said:One question I have is the field IP Add Details.recruiter - > what data is in this field?
The recruiter field has the recruiters data like (Recruiter ID, Name, Mail, Phone, DOB)
so you mean its a relationship. If thats the case you need to have code like below after correcting the "field" and "value" configurations.
toemailaddress(pv!record[IP Add Details.recruiter.mail)
- please adjust the field name as per exact filed name that you have!
No no its not a relationship. It is a user. Iam using an userpicker object in the interface to select a recruiter from the existing user i already have in appian.
And now in the process model, Iam retrieving the 2 fields candidateID and the recruiter so that i cant send mails to both of them.
Have you debug what's the output of queryRecordType?Looks like your value part does not represent which value you are trying to filter out(You are passing whole record instead pass recruiter id or some identifier which uniquely identify record.)
Did you try putting your second "toemailaddress()" with the internal "a!queryRecord().data" into an empty expression rule editor to see what its output would be?
My first guess is that the result will be nonsensical, because the result of that query expression as-written will not possibly result in an email addresss (and all "toemailaddress()" does is take an email address as text and convert it to the "Email Address" data type for use in the send e-mail smart service).