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 / Invalid Formula. Expec...
Power Apps
Answered

Invalid Formula. Expected a value compatible with 'DataSource'.

(1) ShareShare
ReportReport
Posted on by 341

-my data source connected to the app is a table in Excel named "Production"

 

-On Screen 1 I have vertical gallery named Gallery1.

 

-In that gallery there is a next arrow by each record, When the arrow next to the record is selected it navigates to Screen 2 (Update Production Board) which displays the record in an Edit Form

 

-My next arrow onselect function is:

Set(VarFormMode,FormMode.Edit);Navigate('Update Production Board');Set(VarItem,ThisItem)
 
-Form datasource function is 'Production'
-Form defaultMode is VarFormEdit
-Form Item is VarItem
 
VarItem shows squiggly red line as if there is an error. Not sure what the issue is because I have an identical screen and different excel table that is set up exactly the same and the error does not show on that one
 
-

Evan_S1_0-1720543265110.png

 

 

Categories:
I have the same question (0)
  • venturemavenwill Profile Picture
    1,198 Super User 2026 Season 1 on at

    What is the DataSource of your Edit Form?

     

    If you created the app from a blank canvas, then you would need to manually define both the Item and the Datasource parameter of your Edit form. If the form was copied from another page in your app, it probably has another datasource that is not compatible. 

     

    venturemavenwil_0-1720550641736.png

     

  • Evan_S1 Profile Picture
    341 on at

    @venturemavenwil Below is what is in the DataSource and Item Fields of the EditForm.

     

    The DataSource "Production" is the correct data source I am trying to pull from

     

     

    Evan_S1_0-1720550965663.png

    Evan_S1_1-1720550998587.png

     

     

  • venturemavenwill Profile Picture
    1,198 Super User 2026 Season 1 on at

    Does your Excel table have an unique ID column?

    If so, can you try something like Set(VarItemID, ThisItem.ID)

     

    and in your Edit Form, use

     

    Lookup(Production, ID = VarItemID)

  • Evan_S1 Profile Picture
    341 on at

    It does not appear that my Excel table has any Unique ID's. The only thing on them is dropdown created from data validation.

     

    What function slection would I put the "Lookup(Production, ID = VarItemID)" that you mentioned?

     

    Evan_S1_0-1720551648463.png

     

  • Verified answer
    venturemavenwill Profile Picture
    1,198 Super User 2026 Season 1 on at

    In your case, I would try to use two variables:
    On your next button in your gallery, you can use Set(SalesOrder, ThisItem.'Sales Ord');Set(SalesItem, ThisItem.Item)

     

    and in your edit form, in the Item parameter, use both variables in the lookup

    LookUp(Production, 'Sales Ord' = SalesOrder && Item = SalesItem)

    Based on the example above, Sales Order + Item should be unique. 

  • Evan_S1 Profile Picture
    341 on at

    You are on to something! Although it only fills in the sales order and Item. How do I add the rest of the columns in the excel table so it autofills all of them and can make updates after

  • venturemavenwill Profile Picture
    1,198 Super User 2026 Season 1 on at

    Just to make sure I understand - when you click on add fields in the edit form now, it only shows the two columns sales order and Item, and none of the other fields show up?

  • Evan_S1 Profile Picture
    341 on at

    Disregard that, I did something wrong on my end. Everything work great! thank you!

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 510

#2
WarrenBelz Profile Picture

WarrenBelz 426 Most Valuable Professional

#3
Vish WR Profile Picture

Vish WR 281

Last 30 days Overall leaderboard