cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Perez
Helper V
Helper V

make fields visible on a button click

Hi,

im new to powerapps and trtying to do the following:

  1. i started a customized form for a sharepoint list
  2. for edit mode i want only two filds to be visible and all the rest will be visible only if the user click on "see More" button.

second question can i do seperate form for each mode? new and edit?

 

thanks in advance.

 

1 ACCEPTED SOLUTION

Accepted Solutions
FrederikBroux
Frequent Visitor

For the first question, this can be realised quite easily:

  • create a context variable on the onvisible property of the form: UpdateContext( { showAllFields: false } ), This creates a variable showAllFields which is set to false
  • select the datacard you want to hide on default and set the visible property to showAllFields, this will show the datacard when the variable is true and hide it when it's false
  • Add a button and put the following on the onselect property: UpdateContext({showAllFields:!showAllFields}). This will switch the variable from false to true if it's false and from true to false if it's true

For the second question you find good information here: https://powerapps.microsoft.com/en-us/blog/separate-custom-forms/

View solution in original post

3 REPLIES 3
yashag2255
Dual Super User II
Dual Super User II

Hey @Perez 

 

To configure this, you can update the configuration as:

See More Button -> OnSelect -> Set(ShowFields, true)

Screen -> OnVisible -> Set(ShowFields,false)

Form ->
First Two Data Cards -> If (FormName.Mode <> FormMode.New, true, false)
Rest of the DataCards -> If (FormName.Mode <> FormMode.New && ShowFields = true, true, false)

 

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

FrederikBroux
Frequent Visitor

For the first question, this can be realised quite easily:

  • create a context variable on the onvisible property of the form: UpdateContext( { showAllFields: false } ), This creates a variable showAllFields which is set to false
  • select the datacard you want to hide on default and set the visible property to showAllFields, this will show the datacard when the variable is true and hide it when it's false
  • Add a button and put the following on the onselect property: UpdateContext({showAllFields:!showAllFields}). This will switch the variable from false to true if it's false and from true to false if it's true

For the second question you find good information here: https://powerapps.microsoft.com/en-us/blog/separate-custom-forms/

View solution in original post

@FrederikBroux , thanks a lot manage to imlement both suggestions!!

marked it a s solution.

@yashag2255 , didnt have a chance to check it, thanks.

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

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