Is there any way to mask the usernames on the Discussion Board app?

Copper Contributor

Hi,

 

I'd like to do a 'shoutbox' of sorts for my company on our Sharepoint site. It's meant for people to ask or comment about work matters, throw suggestions for improvement, or even a quick Thank You note to any employee.

 

However, we would like to make the posts anonymous. No usernames or employee names to be shown on the posts, or at least give the users a choice on whether they want their identity to be shown on their post/reply/comment.

 

I did try to 'create' a view for general users, unchecking the 'Created By' column, but it seems that in the app view, the creator's name still shows....

 

Any way to do that?

2 Replies

@MHX87 we do a similar thing in our company for staff to ask questions.  But we don't use the Discussion Board. Users submit questions via a Microsoft Forms form on the intranet which gets automatically saved to a list via a flow in Power Automate.  The user can elect to make the question anonymous if they wish. Depending on the category, the question is also sent by the flow in an email to the appropriate member of the senior management team to answer. The JSON-formatted view of the list is displayed  in a list web part on the intranet.

 

0-form.png

 

1-formattedList.png

 

The JSON I used for that was as follows:

{
  "$schema": "https://developer.microsoft.com/json-schemas/sp/view-formatting.schema.json",
  "hideSelection": true,
  "hideColumnHeader": true,
  "rowFormatter": {
    "elmType": "div",
    "_comment_": "MAIN DIV",
    "attributes": {
      "class": "ms-bgColor-themeLight"
    },
    "style": {
      "display": "flex",
      "flex-wrap": "wrap",
      "align-items": "stretch",
      "flex-direction": "row",
      "padding": "20px",
      "margin-bottom": "16px",
      "max-width": "98%",
      "border-radius": "5px",
      "background-color": "#08526b"
    },
    "children": [
      {
        "elmType": "div",
        "style": {
          "flex-grow": "1",
          "display": "flex",
          "flex-direction": "column",
          "flex-wrap": "nowrap",
          "align-items": "left",
          "max-width": "98%",
          "min-width": "205px"
        },
        "children": [
          {
            "elmType": "div",
            "style": {
              "display": "block",
              "font-size": "15px",
              "font-weight": "normal"
            },
            "children": [
              {
                "elmType": "span",
                "txtContent": "='Question: ' + [$Question] + ' ' + [$SubmittedOn] + ' ' + [$Email]",
                "style": {
                  "display": "=if([$Question] == '', 'none', 'block')",
                  "padding-top": "0",
                  "margin": "0 20px 20px 0",
                  "color": "white"
                }
              }
            ]
          }
        ]
      },
      {
        "elmType": "div",
        "_comment_": "DIV TWO",
        "style": {
          "flex-grow": "1",
          "display": "flex",
          "flex-direction": "column",
          "align-items": "left",
          "max-width": "98%px",
          "min-width": "155px"
        },
        "children": [
          {
            "elmType": "div",
            "style": {
              "display": "block",
              "font-size": "15px",
              "txtContent": "='Answer: ' + [$Answer]",
              "font-weight": "normal",
              "color": "white"
            },
            "children": [
              {
                "elmType": "span",
                "txtContent": "='Answer: ' + [$Answer]",
                "style": {
                  "padding-right": "5px",
                  "display": "=if([$Answer] == '', 'none', 'block')"
                }
              }
            ]
          },
          {
            "elmType": "div",
            "style": {
              "display": "block",
              "font-size": "15px",
              "font-weight": "normal"
            }
          }
        ]
      }
    ]
  }
}

 

Come back with questions about any of this.

 

Rob
Los Gallardos
Intranet, SharePoint and Power Platform Manager (and classic 1967 Morris Traveller driver)

Thank you for your suggestion!

Perhaps I should've put this in my original post - my company has an air-gapped network, so it isn't connected to the internet. And we want the posts to be viewed by all staff, exactly like a shoutbox - but we just don't want the names to appear :'(