cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Component name

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.

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User III
Super User III

Hi @rcarneiroIE 

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-loadin... 

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.

View solution in original post

2 REPLIES 2
Highlighted
Super User III
Super User III

Hi @rcarneiroIE 

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-loadin... 

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.

View solution in original post

Highlighted

Hi @timl,

 

Thanks for your reply. 

 

I will definitely use this approach.

 

Thanks,

Ricardo.

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (7,334)