Linking directly to a Microsoft Forms response in the results view
You may find that in certain processes in your organisation you want to show someone contextual information about the item that are about to approve. Example being if you have a requesting processes that works through Microsoft Forms, how do you show them the information they need before they can hit approve?
An example request process using Power Automate and Forms
Take a marketing team. They probably have a process to allow the organisation to request resources to be created. This might take the shape the request process starting with a Microsoft Form to collect all the needed information and add an element of control about the answers that can be selected.
Once you have the Form submitted you need something to actually process the Form, run any necessary logic, and finally start the approval with an outcome.
This is where the problem arises. If my approval has a large quantity of information held within it I can't just simply add it all into the approval itself. For example the data I might be collecting and requires review:
- Contact
- Department
- Budget
- Background
- Services required
- Timelines
- Objectives
- Audience
So now if I need to present all of these results easily and quickly back to the approver, how can I do that without cramming everything into the body of the approval?
A quick solution using the results view
Simply put we can utilise an already existing user interface in Forms itself where we would usually view the results. As long as the URL is structured correctly you can take a user to a specific result in this view - assuming they have permission to view it!
So how do you get his data? When a response is submitted via Power Automate triggers, the returned object contains the Form ID and the response ID. Together these two values can be utilised in the below URL format.
https://forms.office.com/pages/designpagev2.aspx?subpage=design&id=[FormId]&topview=SurveyResults&analysis=true&ridx=[ResponseId]]
This above URL can then be delivered in an adaptive card, as part of the approval message body, or just a reference if more information is required.
A side note to be aware of
Another issue with this approach is that it relies on the response ID remaining the same. These can get out of sync when a user deletes the responses from Forms. In my case this happened so I informed the user not to and built in an offset for the ID.