Forum Discussion

VayaWillemen's avatar
VayaWillemen
Brass Contributor
Nov 04, 2024

Hide data records collected via Microsoft forms based on user account or group membership?

We have a Microsoft form where people from different departments need to log things. But for privacy reasons, it should not be possible for person A using the form for logging things for department A to read the items logged by person B working for departement B.

Person A and person B need the same view when filling out the form (they need to see the samen fields, among them the field "department"). But when the form is filled out and submitted, when looking at the data collected by the form, person A should only see the data records where department = department A en person B should only see the data records where department = department B.

How can this be achieved in Microsoft Forms?

  • Rob_Elliott's avatar
    Rob_Elliott
    Bronze Contributor

    If you respondents to see the responses but only those from their department then you won't be able to do this Forms on its own. You'll need to have a list in SharePoint for each department (with the permissions set appropriately) with a column for each question. Then have a flow in Power Automate that gets each response and based on the department save the response into the relevant list.

    • VayaWillemen's avatar
      VayaWillemen
      Brass Contributor

      I do not quite understand your solution. Am I correct in assuming you are suggesting the following:

      1. Have 1 single Form that all departments use. Users filling out the form should not be able to view the collected answers, only upper management should have that ability. That way they have one point of refenrence to see ALL info of all departments.
      2. In the backend also create different Sharepoint lists, one per department.
      3. Based on the field "department" in the Form, redirect the answers to the questions in the form to the correct department list

      Is my assumption of the flow described in the above 3 bullet points correct?

      Somehow point 3 could be achieved with some Power Automate code? But I do not quite understand how yet. 

       Upper management already has the Forms way of working set up and it is running. They need to see all answers of all departments and they want it in one place (not in different lists, that would mean they have to consult different sources of info to do their analystics on). So we need to expand upon the already implemented solution (they obviously did not analyse thoroughly enough before implementing this, but that is another issue)

      • Rob_Elliott's avatar
        Rob_Elliott
        Bronze Contributor

        If it is only specific upper management people who need to see all the responses then just give them the collaborate link. But if all staff in a department need to see the responses from their department then you will need to do it the way I suggested before because Forms has no way to do that.

        Yes #3 is a flow in Power Automate. It's not code, it's all visual.

Resources