cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Frequent Visitor

SharePoint list custom form Power Apps

I made a custom form for a SharePoint list using Power Apps. I am using two buttons on my form (SharePointForm1) for displaying certain information and hiding some, depending on which button clicked .

 

On the OnSelect of the buttons I have respectively the following:
Set(varFormTab, "General")
Set(varFormTab, "Planning")

 

And on the DisplayMode:
If(varFormTab = "General",Disabled,Edit)
If(varFormTab = "Planning",Disabled,Edit)

 

On the OnVisible of my FormScreen1
varFormTab="General"

 

And OnStart of the App
varFormTab="General"

 

Everything works fine except when the user opens the form is doesn't open displaying the information from the "General" button. It doesn't show anything. When I click on one of the buttons then it shows the information.

I hope you can help me with this.

2 ACCEPTED SOLUTIONS

Accepted Solutions

On the buttons I have:

Set(varFormTab, "General")
Set(varFormTab, "Planning")

 

And on the apps OnStart and the FormScreen1:

varFormTab="General"

 

But when I open the form it doesn't display any information. When I click on the button then it displays the information correctly.

View solution in original post

Hi @pketeldijk ,

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.

View solution in original post

5 REPLIES 5
Anonymous
Not applicable

I think you should use
UpdateContext({varFormTab:"General"});
to update the variable value.

 

varFormTab="General" is a comparison of variable versus the text.

Community Support
Community Support

Hi @pketeldijk ,

Do you mean that if user doesn't open the screen by clicking "general" button, nothing shows?

Could you tell me if user doesn't click "general" button, whether do you want the situation of "general" or "planning"?
1)If you want to set varFormTab="General" when the app starts, please set the app's OnStart:

Set(varFormTab,"General")

2)If you want to  set varFormTab="General" when you open  FormScreen1, please set this screen's OnVisible:

Set(varFormTab,"General")

 

Then even you not click the general button, when you open the app or open formscreen1, the variable will become "General".

 

 

Best regards,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

On the buttons I have:

Set(varFormTab, "General")
Set(varFormTab, "Planning")

 

And on the apps OnStart and the FormScreen1:

varFormTab="General"

 

But when I open the form it doesn't display any information. When I click on the button then it displays the information correctly.

View solution in original post

@pketeldijk ,

That is because you need to Set the Variable at OnStart

Set(varFormTab,"General")

 

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.

Hi @pketeldijk ,

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.

View solution in original post

Helpful resources

Announcements
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

Top Solution Authors
Top Kudoed Authors
Users online (19,557)