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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Make a field 'required...
Power Apps
Unanswered

Make a field 'required' even if not 'visible' using custom card text fields

(0) ShareShare
ReportReport
Posted on by 9

Hello,

I am working on a SharePoint Custom List and as such am limited with certain formatting options. 

 

I am trying to recreate a 'table'-like design for part of my form for 6 SP columns and could not find a way to do this using form columns from SharePoint. As a workaround I did the following:

 

1. I created a Custom Data Card and added 6 text fields in a table-like format with 3 rows and 2 columns. The Data Card is visible based on a DropDown elsewhere in the form. As there are multiple fields in this card I have left the 'Required' property as 'false'

 

2. I then added the 6  SP 'columns' to my form and set their default values equal to the text of one of each of the custom text fields mentioned above (only if the text field was filled, to prevent zeroes being pulled through). I then set the properties of these to 'required' if the Custom Data Card mentioned above is visible.

If (CustomDataCard.Visible=true,true,false)

 

This validated the form as expected, preventing submission if the Custom Text Fields were not completed and allowing submission if they were.

 

However I then set visible properties of the SP columns (mentioned in part 2.) to 'false' and the validation stopped working, allowing submission whether the custom fields were filled or not.

 

Any help appreciated, including correction if my approach to the table format is wrong.

 

Let me know if more information required

 

 

 

Categories:
  • rebeccas Profile Picture
    2,591 on at

    I set those rules on my button. Typically what I do is set the star visible (for each field) if it is a required field...sometimes you will have more than one criteria for this like if combobox1.Selected.Value="blah" && IsBlank(DataCardValue) than visible true.

     

    Then I put a message at the bottom or near my submit button that says something like "You have required fields missing" and I set its visible property to look at all my stars...so Visible=If(Star1.Visible=true || Star2.Visible=true, true, false)

     

    And lastly I have my button show but set the DisplayMode of it to disabled if that message is showing so the DisplayMode would be =If(lbl_MissingMessage.Visible=true, DisplayMode.Disabled, Edit)

     

    I like all of my rules in the app because it saves me on flipping back and forth. Let me know if you think that will help with what you need and I didn't explain it well enough and I will open an app of mine to get it exact. Hope this helps!

  • JGregson Profile Picture
    9 on at

    Thanks for the response @rebeccas 

     

    Our form is so large that I'm not sure about using this method to account for all the fields although I will look at this as a possible solution.

     

    In the first instance, I can't seem to locate the textrequiredstar in my custom datacard's controls/properties (I am assuming you are referring to what this info is talking about: https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/working-with-cards)

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 221 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 188 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 120

Last 30 days Overall leaderboard