I want to populate fields in my Team Forms based on a selected item in my SharePoint list. I want to use it in a case such as:
Name Email Contact Evaluate
Test use test@gmail.com 1037435467 Evaluate Candidate (hyperlink)
When I click the evaluate column, it would redirect me to my form which had already populated Name, Email and Contact for me.
Anyone who had already implemented a case like this? I'm also open to any other workaround that would have the similar output :)
Hi @Yors,
Your questions have several distinct parts that I’ll address individually below. You should be able to combine these different functionalities to achieve what you’re describing. However, I suggest you might be overcomplicating your setup. You could simply have a single form where the responder selects the person from a drop-down menu and completes the evaluation in the same form instead of launching a separate, pre-populated form. This approach aligns better with Team Forms best practices, which encourage simplifying forms and processes wherever possible.
Populating other fields based on a selected item in a SharePoint list
The following article describes how you can do this with different component types like Text Fields, content and html component. You can use this approach to dynamically display hyperlinks to your next form based on the selected item
Pre-populating a form using a URL
You can use the method outlined in the article below to create a URL that is pre-filled with data. By combining this with dynamically referencing the response from the SharePoint list, you can dynamically construct a URL with pre-filled data based on the selected item.
Bringing it together
Here’s an example of one form launching another with pre-populated data. Note for the "Launch Evaluation" link I use the following dynamic html.
<a href="https://web.teamforms.app/teams/team_Id/forms/form_Id/response?tenantId=tenant_Id&data={{ encodeURIComponent(JSON.stringify({name: data.spSelect.Name, email: data.spSelect.Email, department: data.spSelect.Department})) }}"> Launch Evaluation </a>
Again I don’t recommend this approach as it’s unnecessary complex. Instead, include the questions you want in the original form.