cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
marcus_cmps
New Member

Suddenly cannot reference variables inside a component

I have built a component which includes a Gallery with icons in the template section, the icons have this code in the OnSelect section - It sets a variable called cmpOperation

 

Set(cmpOperation,"Edit")

 

I setup a custom property called varOperation on the component -  Property type: Output, Date Type: Text

marcus_cmps_0-1637584574663.png

However when I try to assign cmpOperation to varOperation it says Name isn't valid - I have done this exact same thing for another component in the app and it works fine (wasn't part of a gallery if that's relevant)

 

marcus_cmps_1-1637584675109.png

 

It seems strange this works on one component but  not another - is this a bug?

1 ACCEPTED SOLUTION

Accepted Solutions
marcus_cmps
New Member

Update - bizarrely - although this generates an error - the variables actually work - so I guess this is just a glitch I can live with

View solution in original post

5 REPLIES 5
gabibalaban
Super User
Super User

@marcus_cmps ,

Are you sure that is a "t" in cmpOperation name. It looks a little bit odd in picture.

Hello gabibalaban - yes its correct - just looks weird - as soon as I get to cmpO when typing it in - it already has no suggestions

marcus_cmps
New Member

Forgot to add mention in

Hello @gabibalaban - yes its correct - just looks weird - as soon as I get to cmpO when typing it in - it already has no suggestions

marcus_cmps
New Member

Update - bizarrely - although this generates an error - the variables actually work - so I guess this is just a glitch I can live with

View solution in original post

v-xiaochen-msft
Community Support
Community Support

Hi @marcus_cmps ,

 

Please change your variable name to clear the error.

 

Best Regards,

Wearsky

Helpful resources

Announcements
User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (1,287)