cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
cazforshort
Advocate I
Advocate I

How can I get the Form Field Name (Column Name)

I have a form with a ton of fields (50) whose data source is an excel Table.

I'd like to change the Visible property of each DataCard to =IF(card.DataField=varDynamicName,true,false)

 

Seems simple, but I can't figure out what to replace card.DataField with.

Card is obviously not the right parameter. I tried DisplayName and ThisItem. I really just need the Field Name. 

 

The varDynamicName is text, but this is all an oversimplification to make the question easier to follow. 

 

1 ACCEPTED SOLUTION

Accepted Solutions
cazforshort
Advocate I
Advocate I

There is a trick to select all. You just need to change the form from vertical to horizontal then hit the Undo button. You can then edit all the fields properties all at once. Saved me countless hours. 

I suppose its not really the DataCard Item properties that I want. Its the fields property. For instance, in the datacard item I can get the field name property I want by using Parent.DisplayName, but since I want to reference it at the Parent Level I cant use "Parent". 

 

GOT IT: The answer is Self.DisplayName! I wouldn't have been able to figure it out if you hadn't sent me down the thought path though.

View solution in original post

5 REPLIES 5
JR-BejeweledOne
Super User
Super User

It's going to be one of the properties of the card you are referencing;  In the example below, if I wanted to set the visible on the field in Text_DataCard1, I would do this:

 

If(varDynamicText in DataCardValue6, true, false)

 

datacard.png

 

 



If you like this post, give it a Thumbs up. If it answered your question, Mark it as a Solution to enable other users find it.

That value is only for the one Card. I would need to manually change it for every card. I would just type the column in manually for each card if I had to do it that way. I need a formula that works like ThisItem.DataField. That way I can do, Select All -> Visible->Paste and have it work on all ~100 fields.

JR-BejeweledOne
Super User
Super User

Cards don't work that way.   Unfortunately you do have to manually change each one.

Each field in a form has it's own set of DataCard items and you can't even select them all because each data card is separate.



If you like this post, give it a Thumbs up. If it answered your question, Mark it as a Solution to enable other users find it.
cazforshort
Advocate I
Advocate I

There is a trick to select all. You just need to change the form from vertical to horizontal then hit the Undo button. You can then edit all the fields properties all at once. Saved me countless hours. 

I suppose its not really the DataCard Item properties that I want. Its the fields property. For instance, in the datacard item I can get the field name property I want by using Parent.DisplayName, but since I want to reference it at the Parent Level I cant use "Parent". 

 

GOT IT: The answer is Self.DisplayName! I wouldn't have been able to figure it out if you hadn't sent me down the thought path though.

View solution in original post

JR-BejeweledOne
Super User
Super User

I might have to try your trick for selecting all the fields.  Hadn't seen that before



If you like this post, give it a Thumbs up. If it answered your question, Mark it as a Solution to enable other users find it.

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (2,680)