Capture who uses or copies a Form Template

Occasional Visitor

I am looking to set up a company resource page with a number of standardised forms people can copy and use for their own purposes.  I have looked at using the Template link in the share tab of forms which will let them add a copy of the forms to their one drive. 

 

To help us follow up with teams and check how successfully their project has been we want to track who has duplicated a form using a template link.

 

Is there a way to log, track or record who has copied a Form Template native to MS Forms or through automation tools?

1 Reply

@Fracturedscot There is nothing in Forms itself that tracks this and there are also no actions or triggers in Power Automate that can do this.

But what you could do is to have a list in SharePoint which lists the forms and has a JSON-formatted button next to each one which triggers a flow in Power Automate that gets the details of which form it is the user wants and who they are.  You would need to give your users a link to this list but bear in mind you can't embed it in a SharePoint page due to the JSON button which won't run from a web part. The flow sends the user an email with a link to the template and uploads the details to a "FormTemplatesSent"  list. It can't check whether they actually did duplicate it but it gets you much closer and gives you a way to follow up with them.

 

So the list of form templates looks like this. The Get Template Link column is a single line of text column and I'll give you the JSON code for formatting it later in the post.
0-FormTemplates.pngWhen the button is pressed a panel opens with the template they have requested and a go button to start the flow that sends tehm the email.

0-PanelFlowRun.png

 

The flow looks like this, with a for a selected item trigger and then the first action is to get the item, selecting ID from the dynamic content box that appears when you click in the field.

 

1-Flow.png

 

We then add a get user profile (v2) action to get the details of the user who triggered the flow. And we add a compose action to get the department the user is in.

2-Flow.png

Next, add a switch control which is a type of condition that just looks at one thing and is based on is equal to.

So if the Title from the FormTemplates list equals Aircraft Service then create an item in the Form TemplateSent list. You then add a Send an email (v2) action to send an email to the user with the link to the tempate.

You would copy the actions to your clipboard then paste them in, changing the link to the template, for the other switch cases. You can have up to 25 cases in any switch.

 

3-Flow.png

 

4-Flow.png

The resulting email looks like this:


5-Email.png

 

And the ForTemplatesSent list has had the item added to it:

0-FormTemplatesSent.png

 

For the button you need to format the single line of text column in advanced mode and add the following JSON, changing the id to the ID of your flow: 

6-FlowID.png

 

JSON format code:  

{
  "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
  "elmType": "button",
  "txtContent": "Get template link by email",
  "customRowAction": {
    "action": "executeFlow",
    "actionParams": "='{\"id\":\"dd92571b-ce5e-49e9-8379-94f1ad176204\", \"headerText\":\" ' + [$Title] + '\",\"runFlowButtonText\":\"Go\"}'"
  },
  "style": {
    "background-color": "#cf000f",
    "color": "white",
    "border-radius": "10px"
  }
}

 

I hope that gives you something to think about and try.

 

Rob
Los Gallardos
Microsoft Power Automate Community Super User