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 / Set the Default for a ...
Power Apps
Answered

Set the Default for a data card on a form with a variable holding the field's name instead of spelling out the field name

(0) ShareShare
ReportReport
Posted on by 3

I'm pretty new to Powerapps, so bear with me.

 

I used a Stored Procedure Flow to allow the users of my app to create their own fields with their own data types, and that part works perfectly by updating my data source correctly. I am now trying to make that new field work in my Edit form. There is only one step left for me to do, but I'm including my proccess in case the context is helpful.

 

I added a duplicate field to the form and changed the contents to show the newly created field. I have the Update, DataField, etc. functions working correctly as far as I know, and the value(s) of the data card are also functional. The only step left is to change the Default for the data card to be the newly created field. However, I am unable to do so because the name of the new field is being held in a variable and in a data source, and referencing either of those does not work. I have no way of getting the new field explicitly spelled out. There are pictures attached of both of my attempts to hopefully clarify what I'm looking for.

 

Does anyone know of any workarounds to reference a field with a variable instead of the explicit field name?

Screen Shot 2019-05-14 at 2.55.35 PM.png
Screen Shot 2019-05-14 at 2.56.17 PM.png
Categories:
  • Verified answer
    v-xida-msft Profile Picture
    Microsoft Employee on at

    Hi @lordor12 ,

    Do you store the field name within a variable, and then reference the field name from the variable within your app?

     

    If you store the field name within a variable, and then want to reference the field name from the variable within your app, I afraid that there is no way to achieve your needs in PowerApps currently.

     

    When you want to reference a field name of a data source within an app, you must specify explicit field name. Referencing field name from a variable is not supported within PowerApps currently.

     

    If you would like this feature to be added in PowerApps, please submit an idea to PowerApps Ideas Forum:

    https://powerusers.microsoft.com/t5/PowerApps-Ideas/idb-p/PowerAppsIdeas

     

    Best regards,

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Thanks for posting in the community @lordor12 - can you review the above reply and update the thread if it was helpful?

     

    Thank you,

     

    @Anonymous 

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
11manish Profile Picture

11manish 395 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 260 Most Valuable Professional

Last 30 days Overall leaderboard