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

Re: OnSelect - Show One Column At A Time

@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
Super User

Re: OnSelect - Show One Column At A Time

@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
Frequent Visitor

Re: OnSelect - Show One Column At A Time

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

Re: OnSelect - Show One Column At A Time

@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
Frequent Visitor

Re: OnSelect - Show One Column At A Time

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

Helpful resources

Announcements
Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Super Users Coming in August

We are excited for the next Super User season.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

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