web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Error in formula when ...
Power Apps
Answered

Error in formula when i change the data source

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi Everyone

 

I have a error with i try to duplicate the screen and next change the Data Source.

i have this formula for pass a item to one collection.

My Formula actual is:

 

Camilo_Osorio_1-1632947773873.png

 

 

When i have only one screen that formula work but when i duplicate the screen and change my data source all my formula get red to a error, I don't know how change, everything i choose have to go to the collection "Carrito".

Categories:
  • BCLS776 Profile Picture
    8,994 Moderator on at

    Your code is referring to ThisItem, which is a reference to an existing form or gallery record. Code such as this only works when it is within a gallery or form control - did you move it to another screen without a gallery or form?

     

    Bryan

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi Bryan, 

     

    No i use all in gallery's, for that i dupplicate the screen and only change the datasource from each gallery

     

  • Verified answer
    BCLS776 Profile Picture
    8,994 Moderator on at

    It is possible that the Power Apps service is still linking the code with the previous gallery, which is causing an error flag. Try re-typing the portions of the code that refer to the data source and ThisItem entries, and allow the Intellisense feature to help you autocomplete the typing. That should prompt the Power Apps service to re-connect things in the background.

     

    Oh, and please ensure the button on the second gallery is within the gallery's frame and nested controls. I've had it happen to me where I pasted a new control visibly on top of a gallery, but the control was not in the proper spot in the hierarchy.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Bryan You have the reason, that work thxxxxx a lotttt i stay 5hours with my head to 1000rpm thinking what happen jaja

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.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 352 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 323

#3
Mohsin Ali Profile Picture

Mohsin Ali 226

Last 30 days Overall leaderboard