cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

How to select only three cards and then hide the rest?

I am trying to do a survey(ish) app with powerapps. I would like the user to select 1st,2nd,3rd choices (ranked) from a sharepoint list(12 items). Secondly, I would like to tie their choices to a pie chart.  I am having trouble and any suggestions would be much appreciated. 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User III
Super User III

Re: How to select only three cards and then hide the rest?

@KHenderson 

Here's my suggestion on how to create the ranked choices.

 

#1  Create a new SharePoint list called 'MySurvey'.  Then add 3 columns all with the data type single-line text.

  • ChoiceRank1
  • ChoiceRank2
  • ChoiceRank3

 

#2  Now go to PowerApps.  Add an Edit Form to your app.  Use the SharePoint list you just created in the Items property

MySurvey

 

#3  Add the fields ChoiceRank1, ChoiceRank2, ChoiceRank3 to the Edit Form.

 

#4  Now delete the TextInput from each Card.  Add in a new Dropdown control.  Name it drp_ChoiceRank1.

 

#5  Put this code in the Items property of drp_ChoiceRank1

your_choices_sharepoint_list_name.column_name

 

#6  Change the Update property of the Card for drp_ChoiceRank1 to this code

drp_ChoiceRank1.Selected.Value

 

#7 Repeat steps 4-6 for drp_ChoiceRank2 and drp_ChoiceRank3

#8  Add a submit button to the form and change and set the DisplayMode property.  This will have the impact of disabling the button if two of the choices are the same. 

If(
    drp_ChoiceRank1.Selected.Value <> drp_ChoiceRank2.Selected.Value
    And drp_ChoiceRank2.Selected.Value <> drp_ChoiceRank3.Selected.Value
    And drp_ChoiceRank1.Selected.Value <> drp_ChoiceRank3.Selected.Value,
    DisplayMode.Edit
    DisplayMode.Disabled
)

 

#9  Put this code in the OnSelect property of the Submit button

SubmitForm(your_form_name)

 

#10  Give your form a test run.

 

 

That seems like more than enough instructions for now.  Best to wait on anything related to the pie chart until you've built the form.  It will probably be a totally different question.

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

View solution in original post

1 REPLY 1
Highlighted
Super User III
Super User III

Re: How to select only three cards and then hide the rest?

@KHenderson 

Here's my suggestion on how to create the ranked choices.

 

#1  Create a new SharePoint list called 'MySurvey'.  Then add 3 columns all with the data type single-line text.

  • ChoiceRank1
  • ChoiceRank2
  • ChoiceRank3

 

#2  Now go to PowerApps.  Add an Edit Form to your app.  Use the SharePoint list you just created in the Items property

MySurvey

 

#3  Add the fields ChoiceRank1, ChoiceRank2, ChoiceRank3 to the Edit Form.

 

#4  Now delete the TextInput from each Card.  Add in a new Dropdown control.  Name it drp_ChoiceRank1.

 

#5  Put this code in the Items property of drp_ChoiceRank1

your_choices_sharepoint_list_name.column_name

 

#6  Change the Update property of the Card for drp_ChoiceRank1 to this code

drp_ChoiceRank1.Selected.Value

 

#7 Repeat steps 4-6 for drp_ChoiceRank2 and drp_ChoiceRank3

#8  Add a submit button to the form and change and set the DisplayMode property.  This will have the impact of disabling the button if two of the choices are the same. 

If(
    drp_ChoiceRank1.Selected.Value <> drp_ChoiceRank2.Selected.Value
    And drp_ChoiceRank2.Selected.Value <> drp_ChoiceRank3.Selected.Value
    And drp_ChoiceRank1.Selected.Value <> drp_ChoiceRank3.Selected.Value,
    DisplayMode.Edit
    DisplayMode.Disabled
)

 

#9  Put this code in the OnSelect property of the Submit button

SubmitForm(your_form_name)

 

#10  Give your form a test run.

 

 

That seems like more than enough instructions for now.  Best to wait on anything related to the pie chart until you've built the form.  It will probably be a totally different question.

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

View solution in original post

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Top Solution Authors
Top Kudoed Authors
Users online (6,325)