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 / change field name base...
Power Apps
Answered

change field name based on selected collection in gallery

(0) ShareShare
ReportReport
Posted on by 137

Hello

 

I have a gallery that is linked to different collections, depending on a condition.  I want to display fields in the gallery, but the fields will change depending on the collection selected.  

 

Is there anyway to display in a gallery the fields based on their field number.  For example, i want to display the first 5 fields of the selected collection, (but i don't know the names of the fields), so can i reference the field number ?  so the label control in the gallery would have Text property set to 

 

ThisItem.Field(1)

 

Or the other option is, if I know the field name, but it will change, can i reference somehow a variable field name when setting the Text property of the label in the gallery

 

Set(varItem43,"Field1");

 

ThisItem.varItem43;

 

any way to do this ?

 

Regards

Dave

 

Categories:
I have the same question (0)
  • Verified answer
    WarrenBelz Profile Picture
    156,308 Most Valuable Professional on at

    Hi @daved3 ,

    Simple answer is that you cannot refer to field names dynamically.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    MVP (Business Applications)   Visit my blog Practical Power Apps

  • daved3 Profile Picture
    137 on at

    That's what I was afraid of...  thanks for confirming

    Dave

     

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 377 Most Valuable Professional

#2
11manish Profile Picture

11manish 165 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 110 Super User 2026 Season 2

Last 30 days Overall leaderboard