cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
rcarneiroIE
Helper I
Helper I

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
timl
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
timl
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

Hi @timl,

 

Thanks for your reply. 

 

I will definitely use this approach.

 

Thanks,

Ricardo.

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

PA Community Call

Power Apps Community Call

Next call is happening on April 21st at 8a PST.

MBAS Carousel

Sign up for our May 4th event!

May the fourth be with you, join us online!

secondImage

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Top Solution Authors
Top Kudoed Authors
Users online (63,093)