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

4 REPLIES 4
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.

@yashag2255 thanks for this, you've helped me today 🙂

Helpful resources

Announcements
2022 Release Wave 1 760x460.png

2022 Release Wave 1 Plan

Power Platform release plan for the 2022 release wave 1 describes all new features releasing from April 2022 through September 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (2,197)