I’m looking for clarity as to when using the email block is a better idea. Historically, I have always used the single line text block but I am noticing that on import, my data came in using the email block.
The above is a screenshot from a “clients” app. I am calling the email field in an related estimate app. The estimate as an “optional email” field in case we need to email someone who is not the primary contact.
glad to hear you were able to figure this out - it’s indeed not too easy as the email field is provided as an array of objects to allow more complex manipulations inside the calculation field.
Let me give you some code examples; You already figured out how to show all email addresses.
In order to show only the first one, just use [0] instead of .join(...):
PS: A simple and effective debugging advice for calculation fields: You may use JSON.stringify() to stringify any available token and see what value it has at runtime. The output is rather technical and not user friendly, but can help to solve issues and debug more quickly.