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 / How can I get the Form...
Power Apps
Answered

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

(0) ShareShare
ReportReport
Posted on by 31

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. 

 

Categories:
  • JR-BejeweledOne Profile Picture
    5,836 Moderator on at

    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

     

     

  • cazforshort Profile Picture
    31 on at

    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 Profile Picture
    5,836 Moderator on at

    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.

  • Verified answer
    cazforshort Profile Picture
    31 on at

    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.

  • JR-BejeweledOne Profile Picture
    5,836 Moderator on at

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

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 360 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 325

#3
Mohsin Ali Profile Picture

Mohsin Ali 232

Last 30 days Overall leaderboard