cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Adding and Removing fields in a Powerapps form

Hello,

I need to crate a 'add' and 'remove' functionality for a user in a PowerApps form. It seems you can't actually do this but would it then be possible to just have code that will make visible, hidden fields? that also would solve the SP back end storing issue. So to clarify say I have a default section showing input fields for "Name, Mobile, Email" with the 9 other sections hidden (not visible).  Would anyone know  how to  code a 'add' button that just makes visible the next hidden field? or hide it (remove button code) as needed.

 

1 ACCEPTED SOLUTION

Accepted Solutions
WarrenBelz
Super User
Super User

Hi @Anonymous ,

Use a Variable - on the button

UpdateContext({varShow:!varShow})

the Visible of the controls would be

varShow

and the button would toggle between showing.hiding them.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

 

View solution in original post

3 REPLIES 3
WarrenBelz
Super User
Super User

Hi @Anonymous ,

Use a Variable - on the button

UpdateContext({varShow:!varShow})

the Visible of the controls would be

varShow

and the button would toggle between showing.hiding them.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

 

WarrenBelz
Super User
Super User

Hi @Anonymous ,

Just checking if you got the result you were looking for on this thread. Happy to help further if not.

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Anonymous
Not applicable

Hi Warren, not sure if I explained my situation correctly. I have 9 hidden rows (each row has a field 'Name', 'Number', 'Mobile') and if the use clicks on the 'Add Guest' row 2 is revealed etc. And conversely click the 'Remove Guest' button would hide the last added row giving the illusion of actually adding and removing. Isn't there a need for a count somewhere? 

Thanks is advance

Helpful resources

Announcements
PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Top Solution Authors
Top Kudoed Authors
Users online (3,311)