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.
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
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!
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)
FIll out a quick form to claim your community user group member badge today!