Email Link in a HTML Template in a Table

Hello,

 

I was able to generate a table dynamically based on the data entered by the user but.

we need to  give a link for each record with an Identifier in the Table.

Can any one help me with this?

 

Thanks

  Discussion posts and replies are publicly visible

  • 0
    Certified Lead Developer

    You can use fn!urlforrecord to generate the url stub for a record given the record type and record identifier. Ex.  "<a href=""" & fn!urlforrecord(cons!APP_YOUR_RECORD_TYPE, ri!recordId) & """>Click Me</a>""

  • 0
    Certified Lead Developer
    Can you provide slightly more detail about what you did to generate tables dynamically, what the dynamic user data is like, and what exactly you need your links to do? Have you tried anything yet and if so, is anything in particular going wrong?

    We can probably help you accomplish this but there are too many variables to give you the correct advice without some more of the details as requested above.
  • Use <a href="###recLink###" target="_blank">Click here</a> in html code and generate record link using urlforrecord(cons!myrecordtype, "identifier"). You have to manage looping
  • 0
    Certified Associate Developer
    in reply to Dastagiri Dudekula
    To go a little further on Datagiri's comment, you could use something like this:

    a!forEach(
    items: ri!yourRecordIDs,
    expression: "<a href="&""""&urlforrecord(
    recordType: cons!yourRecord,
    recordIds: fv!item
    )&""""&">Record ID: "& fv!item&"</a>"
    )

    which will output html (as text within Appian). You can then feed this as a single parameter to a custom email template wherever you like. Modify the expression as needed to make it an html table if you prefer. If you're working with a table, I'd recommend making the entire table a single input to the email template and modifying the expression as needed.

    In summary, write an expression that generates the html (table), and feed that into an email template wherever you wish. There is probably a more elegant way to get the expression to handle things like quotation marks :).