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
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

secondImage

Power Apps Community Call

Please join us on Wednesday, October 20th, at 8a PDT. Come and learn from our amazing speakers!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Top Kudoed Authors
Users online (1,691)