web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id : UcgtQcsUMODk4pVjtXvxtZ
Power Pages - Design & Build
Unanswered

Customized survey using Power Pages

Like (0) ShareShare
ReportReport
Posted on 14 Nov 2022 17:15:07 by 6

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

Categories:
  • SuryaRavindran Profile Picture
    6 on 20 Dec 2022 at 18:47:52
    Re: Customized survey using Power Pages

    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

    CRUD Operation with Editable Grid on Power Portal Pages using WEB API with Dynamics 365 Power Apps - YouTube

  • Manish R Sharma Profile Picture
    96 on 22 Nov 2022 at 11:20:02
    Re: Customized survey using Power Pages

    @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.

  • oliver.rodrigues Profile Picture
    9,342 Most Valuable Professional on 22 Nov 2022 at 08:13:51
    Re: Customized survey using Power Pages

    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

  • Manish R Sharma Profile Picture
    96 on 21 Nov 2022 at 20:50:43
    Re: Customized survey using Power Pages

    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.

  • SuryaRavindran Profile Picture
    6 on 21 Nov 2022 at 18:08:39
    Re: Customized survey using Power Pages

    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?

     

  • oliver.rodrigues Profile Picture
    9,342 Most Valuable Professional on 21 Nov 2022 at 17:40:26
    Re: Customized survey using Power Pages

    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/

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Pages

#1
Lucas001 Profile Picture

Lucas001 60 Super User 2025 Season 2

#2
Fubar Profile Picture

Fubar 55 Super User 2025 Season 2

#3
surya narayanan Profile Picture

surya narayanan 35

Featured topics

Loading complete