Hi there,
I need to create on Interface, a text with a clickable email address. It should look like: For enquiries, please email emailaddress@company.com
The email address should be interactive and clickable. After clicking on it, it should automatically open Outlook or other default Inbox and populate emailaddress@company.com in the 'To' field.
This is the code I started working on, but it looks like I'm missing something
a!richTextItem( text: concat("For enquiries please email ", a!safeLink( label: "emailaddress@company.com", uri: "mailto://emailaddress@company.com" )), size: "MEDIUM")
Is it even achievable? Sounds simple, but I'm new to Appian, so I'm wondering if you can concat text and safelink together.
Any suggestions high appreciated.
Cheers,
Discussion posts and replies are publicly visible
Hi,
Try this
a!richTextDisplayField( value : a!richTextItem( text: "For enquiries please email ", link : a!safeLink( label: "emailaddress@company.com", uri: "mailto://emailaddress@company.com" ), size: "MEDIUM" ) )
Thanks
I get an error message. However I need a link only on emailaddress@company.com and not whole text
Not sure why you got the error message, but for me its working fine.
Please share the error message.
a!richTextDisplayField( value : { a!richTextItem( text : "For enquiries please email ", size: "MEDIUM" ), a!richTextItem( text: "emailaddress@company.com", link : a!safeLink( label: "emailaddress@company.com", uri: "mailto://emailaddress@company.com" ), size: "MEDIUM" ) } )
Thanks so much for this. This is the error message: Interface Definition: Expression evaluation error at function a!richTextDisplayField [line 70]: A rich text display component [label=“”] has an invalid value for “value”. Value can only be of type text, rich text item, rich text image, rich text icon, rich text bulleted list, or rich text numbered list. Received RichTextDisplayField.
What error do you see? The code should work, you can even pass email subject and cc recipients if needed from Appian on clicking that link. Below is the code snippet,
a!richTextDisplayField( value: { a!richTextItem( text: "For enquiries please email " ), a!richTextItem( text: "ask@company.com", link: a!safeLink( label: "ask@company.com", uri: "mailto://ask@company.com?subject=Clarification needed&cc=test@test.com" ), size: "MEDIUM" ) })