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

Problem with Set() function

Hi,  

 

I am facing an problem with Set() function. The problem that is showed to me is the following:

"The global variable types specified are compatible with the types specified elsewhere".

 

For the record, I change the variable several times in different screens with Set() function (including first screen OnVisible).
However, if I change the variable name the problem disappear, but if I save the app and re-open it the problems appear again.

 

Please fix or help to fix that bug.

 

Thanks,
Rui Barbosa

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @v-yamao-msft,

 

Thanks for the response.

 

I already fixed the problem. I had a Patch() into Set() function and the "The global variable types specified are compatible with the types specified elsewhere" error appeared to me.

 

I removed the Patch() and changed the body of Set(), and everything works fine now.

 

Thanks,

Rui Barbosa

View solution in original post

3 REPLIES 3
v-yamao-msft
Community Support
Community Support

Hi RuiBarbosa,

 

How is the your code configured? Could you show me your code to help reproduce this issue on my side?


To test this issue, I set the screen’s OnVisible property as Set(test,1). Add a Label control and set its Text property as test. The value will be shown on the label when I navigate to this screen.


Another simple test, add a button control and set its OnSelect property as Set(click,click+1), add a Label control and set its Text property as click. When the button is clicked, the calculated value will be shown on the label.


I don’t get any error message when I use the Set() function. Please show me more details to reproduce this issue.

 

Best regards,
Mabel Mao

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @v-yamao-msft,

 

Thanks for the response.

 

I already fixed the problem. I had a Patch() into Set() function and the "The global variable types specified are compatible with the types specified elsewhere" error appeared to me.

 

I removed the Patch() and changed the body of Set(), and everything works fine now.

 

Thanks,

Rui Barbosa

View solution in original post

ngabougaifan
Advocate I
Advocate I

Hi RuiBatbosa

Could you share more on how did you fix the problem by removing the patch from set function? I’m facing similar issue and it’s frustrating. Thank you.

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

Power Apps Community Call

Monthly Power Apps Community Call

Did you miss the call?? Check out the Power Apps Community Call here!

secondImage

Experience what’s next for Power Apps

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

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Top Solution Authors
Top Kudoed Authors
Users online (69,200)