Announcements
Hi Folks,
Is it possible to store a "Component name" to a variable?
I am trying to create a dynamic Patch command that will update many different fields/components, depending on the field name that requested the update
Thanks,
Ricardo.
Hi @Anonymous
If by 'component name', you mean the name of a data source or fields, it is not possible to store these in a variable.
I answered similar question the other week that might be useful to you.
https://powerusers.microsoft.com/t5/Building-Power-Apps/How-to-reference-a-datasource-without-loading-it-i-e-a-pointer/m-p/639363#M203013
The only way to create a dynamic Patch command would be to determine the field that requested the update using an If or Switch statement, and to call a Patch command that is specific to that condition.
Hi @timl,
Thanks for your reply.
I will definitely use this approach.
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.
Congratulations to our community stars!
Expanding mentorship, skilling, and AI innovation
These are the community rock stars!
Stay up to date on forum activity by subscribing.
11manish 354 Super User 2026 Season 2
M Bilal Khan 330
Mohsin Ali 232