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

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/

@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
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

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