cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
fernandosilva
Helper V
Helper V

How not to get a error message for empty fields on the email when using Adaptive Cards in PVA .

Hi there,

 

I'm using Adaptive Cards with PVA and sending the data to an email address.

So, when the field is not required and the user don't need to fill up the field, the data is still sent and when the email arrives there is an error code like this one {ff075097-c8fe-4ac5-bc6a-657484f672a4} corresponding to the field that was empty .

 

So, how to avoid the adaptive cards sending the field when is empty?

 

Thanks in advance.

 

Fernando

1 ACCEPTED SOLUTION

Accepted Solutions
Pstork1
Dual Super User
Dual Super User

Are you sending the email using a flow that posts the adaptive card and then sends the email based on what is returned?  If you are you can just add a Coalesce() around each field that might be empty when you send the email.  Then supply a space or an empty string as the alternate value in the Coalesce().  If the field is null it will use the blank instead.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

4 REPLIES 4
Pstork1
Dual Super User
Dual Super User

Are you sending the email using a flow that posts the adaptive card and then sends the email based on what is returned?  If you are you can just add a Coalesce() around each field that might be empty when you send the email.  Then supply a space or an empty string as the alternate value in the Coalesce().  If the field is null it will use the blank instead.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Hi @Pstork1 ,

 

Thank you very much for your reply.

I'm not sure how to implement Coalesce() on the adaptive cards.

If you could please paste a code example, that would help a lot.

 

Thank you in advance,

 

Fernando

I wasn't suggesting that you implement it on the cards themselves.  Instead, you use it in the email where you are getting the error to make sure that a default value is supplied when one of the fields on the adaptive card returns a null.  



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Gotcha!

 

Thank you.

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Top Solution Authors
Users online (2,766)