web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Apps
Suggested Answer

Reset form height

(1) ShareShare
ReportReport
Posted on by 26
I am creating forms in powerapps that have multiple datacards. Datacards are visible dynamically based on the another datacard selection, based on the user role and based on the formmode (edit or view). Some datacards have auto height text box. How do I set the height of form with these conditions? I tried adding custom datacard on the bottom of form and set the form height with custom datacard's Y and height but it is not working. I am even hardcoding form heights, and resetting forms on form onSelect still it is not consistently setting the height. Please help with the solution, if any. Here is the code I have set for the form height: 
 
If(FormSRMnewOtherSpec.Mode=FormMode.New, 210,
 
If(FormSRMnewOtherSpec.Mode=FormMode.View,
 
If(varTechWriterForm,
 
'Category_DataCard'.Height+'Description of Specification_DataCard'.Height+30+'Reviewers_DataCard_OtherSpec'.Height+'Review By Date_DataCard_OtherSpec'.Height+'Reminder_DataCard_OtherSpec'.Height+'Approvers_DataCard_OtherSpec'.Height+'Approve By Date_DataCard_OtherSpec'.Height+'eSignature Require_DataCard_OtherSpec'.Height,Parent.Height,
 
 'Category_DataCard'.Height+ 'Description of Specification_DataCard'.Height+30
 )),
  //else is for form edit mode
 If(varTechWriterForm,  
 
 'Category_DataCard'.Height+'Description of Specification_DataCard'.Height+30+'Reviewers_DataCard_OtherSpec'.Height+'Review By Date_DataCard_OtherSpec'.Height+'Reminder_DataCard_OtherSpec'.Height+'Approvers_DataCard_OtherSpec'.Height+'Approve By Date_DataCard_OtherSpec'.Height+'eSignature Require_DataCard_OtherSpec'.Height,
 
 'Category_DataCard'.Height+ 'Description of Specification_DataCard'.Height+30))
Categories:
I have the same question (0)
  • Suggested answer
    Michael E. Gernaey Profile Picture
    53,928 Super User 2025 Season 2 on at
     
    If you dont mind me asking, why are you using the Forms OnSelect to set the height?
     
    I like per se what I see in the context of either hard coding and or calculating the height, but does the Screen, that the form sits on, show all the time(aka is visible) all the time, while the Form itself is changing its Size? 
     
    Or do people do something, Navigate to the Screen with the Form and THEN the height is needed to change.

    If so,
     
    Use a ContextVariable for the height and update it in the OnVisible property of the Screen.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
Kalathiya Profile Picture

Kalathiya 393

#2
WarrenBelz Profile Picture

WarrenBelz 345 Most Valuable Professional

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 271 Super User 2025 Season 2

Last 30 days Overall leaderboard