Hi All,
I am working on a Power portal solution that should be able to list a dynamic set of questions depending on the 'Role' and 'Function' specified by the user. The first form will collect demographics details from the anonymous user such as Role, Function, Location etc and depending on these details I want to be able to display another form that shows the questions that apply to this user. Eg. User A is a Software Engineer and works in the Marketing Department -the questions listed for user A will be different from questions listed for User B who is a Data Analyst working in the finance department. The options for the question would be a rating between 1-10 that the user can specify using the slider.
I had previously built this on a Canvas App using Galleries but can't find a way to do this in Power Pages. If someone has created similar soultions in Power Pages/Portals before would really be great to get some help on this.
Thanks a mil,
Surya
Thanks @OliverRodrigues & @PortalNewbie for your responses. We were able to build a survey using Javascript and the Web API. This is the video I used as a starting point and managed to bring in sliders and perform update operations using Javascript
@OliverRodrigues you are right regarding datatype issues! In my case the questions and the respones to each question are pre-determined (though the users can change it at the back-end without having to do anything on the portal and the new questions and responses just show up on the portal, as long as they are related to the same question category). I have configured scoring points against each response, and I use that to calculate the applicant's overall score.
thanks for sharing your solution @PortalNewbie (time to change the profile name to PortalExpert 😉)
that's probably the most common scenario that I find, as we normally need to apply back-end logic to the selected "answers" of the form
if you really, really need the questions to be dynamic, there is no OOB simple solution, you can create a table that will hold questions/answers, but all your HTML rendering will be custom
then you will enter issues of datatype and how to set them mandatory etc, because you won't be using any OOB component
Hi Surya
I had a similar requirement, and this is how I went about it.
While the questions themselves can be dynamic, they will still need a fixed field to anchor to. You can't create fields on the fly based on the question. This is what I did.
Defined an option set for Question category. This had values A, B, C etc.
On my main entity, I defined 2 fields for each question category
1. Question (lookup to Questions table. Question table fields - Question, question category)
2. Response (lookup to response table. Response table Fields - Question, response, points)
On the portal, I created different sections for each question category and did a show/hide using javascript based on question category. On the Question field I had a lookup view filtered on the question category. For the response I had filtered responses based on question chosen (you can use filtered lookups or jquery if you are displaying the lookups as dropdown , as in my case)
I hope this gives you enough information to build out a similar solution.
Thanks for your response Oliver
Our problem is more in line with the former type you mentioned. The question set has to be dynamic, so we’ll have a list of questions in a dataverse table and depending on the options chosen in the form, the next page should display the questions that apply to the user.
Is there a way to do this?
You have multiple ways to achieve this.
Do you want the questions to be dynamic? In terms of the business configuring them? Or do you have a specific set of questions (fields/columns) and just want to hide/show according to previous items selected?
Most common scenario in my experience would be the latter, you can use Multi-step Forms for this: Tutorial: Add a multi-step form to your page | Microsoft Learn
And then use JavaScript to hide & show fields according to the selected values: http://oliverrodrigues365.com/2020/07/19/power-apps-portals-javascript-tip-01-hide-show-elements/
Lucas001
60
Super User 2025 Season 2
Fubar
55
Super User 2025 Season 2
surya narayanan
35