This is one of those questions where it should be obvious, but I can't find the answer.
I am building a Power Apps Canvas application that is tied to a SharePoint Online list. I am using an Edit Form, so I have a Card for each field in my form. I want to make my labels red if the field is required. In the label within the card, how do I dynamically detect whether that SharePoint field is required or not?
Update: Parent.Required (Parent being the Card) SHOULD work, but always returns false. The following code works, but I have to manually insert the field name. In this example, "Location".
DataSourceInfo([@'Usage Log']),DataSourceInfo.Required,"Location")
How do I dynamically determine the field name? Parent.DataField returns "Location", but when I use it in the function:
DataSourceInfo([@'Usage Log']),DataSourceInfo.Required,Parent.DataField)
I get this error:
The Function 'DataSourceInfo' has some invalid arguments.
Argument 'Parent.DataField' is invalid, expected a text literal.