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.
Solved! Go to Solution.
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.
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.
I think you should use
UpdateContext({varFormTab:"General"});
to update the variable value.
varFormTab="General" is a comparison of variable versus the text.
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,
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.
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.
User | Count |
---|---|
209 | |
94 | |
84 | |
49 | |
39 |
User | Count |
---|---|
264 | |
104 | |
104 | |
61 | |
59 |