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

OnSelect - Show One Column At A Time

Hi,

 

I am trying to add a "+" icon that each time it is selected, it shows another datacard one at a  time. I have already done this in the past but I accidentally removed it and I cannot restore my app to the previous version because it was from 7 months ago. I feel like it might have to do with the "switch" function and I cant't figure out how to formulate it. Any help on this would be great!

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

@MFern 
Try this if its an Edit Form

 

Put this code in the OnVisible property of the app

Set(varShowPeople, 1)

 

Then put this code inside the OnSelect property of the '+' button

Set(varShowPeople, Min(varShowPeople+1,5))

 

Finally, put code like this in the Visible property of the Card for Person2, Person3, and beyond...

varShowPeople>=2
varShowPeople>=3

 

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

4 REPLIES 4
Highlighted
Super User III
Super User III

@MFern 

I assume you are doing this inside a gallery.  What code do you have in the Items property so far?  Is there a collection?

 

I would add a new line to the collection in Items like this:

 

Collect(yourCollection, Defaults(yourCollection))

 

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

 

 

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

Highlighted

Hello,

 

It is actually inside a form. I am wanting the "+" icon  to be selected once: person#2 visible, selected twice: person#3 visible, etc...and when the final person to choose from is selected, the "+" icon and its datacard visible gets changed to false as I only have 5 total people they can add to this form (I have that part figured out). Attached is how I had it working.

Highlighted

@MFern 
Try this if its an Edit Form

 

Put this code in the OnVisible property of the app

Set(varShowPeople, 1)

 

Then put this code inside the OnSelect property of the '+' button

Set(varShowPeople, Min(varShowPeople+1,5))

 

Finally, put code like this in the Visible property of the Card for Person2, Person3, and beyond...

varShowPeople>=2
varShowPeople>=3

 

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

Highlighted

YES!! Thank you, it worked!! I appreciate your help, this was really driving me crazy.

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (8,234)