JSON-Code (link to the event element id in the email)

Martin, Heidi (SE GP T SP PS) 571 Reputation points
2023-09-18T06:36:23.98+00:00

Hello,

Is it possible to insert the link to the event element in the above code?

At the moment only the event name appears here. But it would be great if you could put the link to this event element here.

Thank you so much!

This is the email:

User's image

This is the code:

{
  "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
  "elmType": "a",
  "style": {
    "display": "=if(length([$Atendees]) > 0, 'flex', 'none')",
    "text-decoration": "none"
  },
  "attributes": {
    "href": {
      "operator": "+",
      "operands": [
        "mailto:",
        "=join([$Atendees.email], ';')",
        "?Bcc=",
        "[$BCC.email]",
        "&subject=Event name: ",
        "[$Title]",
        "&body=Dear XXX,",
        "\r\n \r\n",
        "As you probably know, we have created the GT-wide overview for the handling the relevant external events, conferences, and trade shows:",
        "https://www.baidu.com",
        "\r\n",
        "The target is to have the single tool for all relevant events for SE GT to reach transparency, coordinate performance, use the synergies, and evaluate the efforts for the future.",
        "\r\n",
        "\r\n",
        "Furthermore, we want to learn from events where we have participated to evaluate our performance, and to learn for the participation in further events. For this purpose we have created the event feedback sheet: ",
        "https://www.baidu.com",
        ", which you also can find in the above tool bar as per screenshot below.",
        "\r\n",
        "I kindly ask you to take approx. 9 Min. time and fill in this event to support us. As per our notes, you’ve participated in: ",
        "\r\n",
        "Furthermore, we store all conference proceedings (papers, publications, presentations, etc.) in: ",
        "https://www.baidu.com",
        " to allow access for all GT staff.",
        "\r\n",
        "In case you as participant have got access to these documentation, please provide it to me for the uploading.",
        "\r\n \r\n",
        "Appreciating your support with kind regards,",
        "\r\n \r\n"
      ]
    }
  },
  "children": [
    {
      "elmType": "span",
      "style": {
        "display": "inline-block",
        "padding": "0 4px"
      },
      "attributes": {
        "iconName": "Mail"
      }
    },
    {
      "elmType": "span",
      "txtContent": {
        "operator": "+",
        "operands": [
          "Send email to ",
          {
            "operator": "?",
            "operands": [
              "=length([$Atendees]) == 1",
              "[$Atendees.title]",
              "='all ' + length([$Atendees]) + ' members'"
            ]
          }
        ]
      }
    }
  ]
}
Microsoft 365 and Office | SharePoint | For business | Windows
0 comments No comments
{count} votes

Accepted answer
  1. Yanli Jiang - MSFT 31,596 Reputation points Microsoft External Staff
    2023-09-20T09:35:20.05+00:00

    Hi Heidi ,

    I think I understand your question. You want to display a link at the original location to jump to this item, right?

    However, based on my testing, this cannot be achieved very precisely.

    First, the recipient must have appropriate permissions on the list to see the item through this link.

    Secondly, because the URL when filtering by title is like this:

    https://tenant.sharepoint.com/sites/sitename/Lists/list/AllItems.aspx?FilterField1=Title&FilterValue1=[$Title].

    User's image

    09201

    Generally speaking, there is no problem with directly plugging into the display. However, the "&" symbol in this URL has appeared before, and the same symbol cannot have two meanings in a piece of code. That is, the final result of this link in the email template will lose "&" and all the content after it.

    09202

    It is recommended that you only insert the connection to the list (https://tenant.sharepoint.com/sites/sitename/Lists/list/AllItems.aspx) and let the attendees enter the list and then filtering to the corresponding Event.

    Hope this helps.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    1 person found this answer helpful.
    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Yanli Jiang - MSFT 31,596 Reputation points Microsoft External Staff
    2023-09-18T09:48:07.46+00:00

    Hi @Heidi ,

    Nice to meet you. I've been there for the weekend. I hope you have a happy weekend too.

    Based on your previous question, I still have some questions. The type of Title column is single line of text. Do you mean you want to insert a hyperlink to it somewhere else? According to my understanding, I conducted tests and discussed with my colleagues. Unfortunately, This requirement is currently unachievable through JSON.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.