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 / Incompatible type in E...
Power Apps
Answered

Incompatible type in Excel datasource using Collect function

(0) ShareShare
ReportReport
Posted on by 16

I am trying to insert records to an Excel data source using Collect function. It first finds the last row in the Excel worksheet (located on the SP) using count rows then it is fetching data from user using Collect function and convert to number using Value() function. The Competency column in the Excel worksheet is in General format, and it is Text format in other Screens as I need to also Edit current records or delete current records using Power Apps to Excel data source. the code is:

 

Collect(Power_Apps_VA,{Item:Input_Title.Text,TechnicianName:Input_Technician_name.Text, Category:Input_Category.Text, Course:Input_Course.Text, Value(Competency:Input_Competency.Text}). 

 

But I keep getting this error over and over: 

Incompatible type. The column in the data source you’re updating expects a 'Text' type and you’re using a 'Number' type

 

The weird thing is that we can easily use the same code Collect(Power_Apps_VA,{Item:Input_Title.Text,TechnicianName:Input_Technician_name.Text, Category:Input_Category.Text, Course:Input_Course.Text, Value(Competency:Input_Competency.Text}).  using SharePoint list as a datasource and the same field is Text in other screens but it never triggers any errors whatsoever!

As the Competency field is something that should be used to do calculations and aggregations I need this field to convert to data when sending data to the datasource.

 

Many thanks for the help in advance!

Categories:
I have the same question (0)
  • timl Profile Picture
    37,283 Super User 2026 Season 2 on at

    Hi @Ardio 

    If you want to set the Competency value, the placement of the call to Value is incorrect. It should appear after 'Competency:'.

     

    Collect(Power_Apps_VA,{Item:Input_Title.Text,TechnicianName:Input_Technician_name.Text, Category:Input_Category.Text, Course:Input_Course.Text, Value(Competency:Input_Competency.Text}).

     

    The syntax beneath should correct the 'Incompatible type' error:

    Collect(
     Power_Apps_VA,
     {
     Item:Input_Title.Text,
     TechnicianName:Input_Technician_name.Text,
     Category:Input_Category.Text,
     Course:Input_Course.Text,
     Competency:Input_Competency.Text
     }
    ).

    One thing to note is that the Excel Online Business connector will not correctly recognise numeric Excel columns.

    https://ideas.powerapps.com/d365community/idea/119ed3b4-9ce5-450e-b145-59df1ad56662

     

  • Ardio Profile Picture
    16 on at

    Thanks for the suggestion, however, this way how we can perform aggregations on the Excel Competency columns when it is saved as Text?! As I mentioned we need to convert it to number format when sending it to our DS(here Excel online)

  • timl Profile Picture
    37,283 Super User 2026 Season 2 on at

    @Ardio 

    So long as the aggregations involve fewer than 2000 rows, you can call the Value function when you carry out the aggregation. For example,

    Sum( 
     Filter(Power_Apps_VA, <insert your condition here>),
     Value(Competency)
    )

     

  • Ardio Profile Picture
    16 on at

    Yes but the problem is as I mentioned in my 1st question is:

     

    But I keep getting this error over and over: 

     

    Incompatible type. The column in the data source you’re updating expects a 'Text' type and you’re using a 'Number' type

    Do you have a solution to this issue!?

  • timl Profile Picture
    37,283 Super User 2026 Season 2 on at

    @Ardio 

    Did you try the formula that I posted? That does not convert Input_competency to a number, and there are no other numbers in the call to Collect, so you shouldn't in theory receive that error.

     

    Collect(
     Power_Apps_VA,
     {
     Item:Input_Title.Text,
     TechnicianName:Input_Technician_name.Text,
     Category:Input_Category.Text,
     Course:Input_Course.Text,
     Competency:Input_Competency.Text
     }
    ).

     

  • Ardio Profile Picture
    16 on at

    @timl Yes, in fact this is what we are doing now before I posted this question but as I mentioned due to project requirement the data must be converted to number type before writing it back to the Excel data source. that is where I need your expertise help to find a solution for it

    thanks!

  • Ardio Profile Picture
    16 on at

     @WarrenBelz  & @iAm_ManCat do you have any suggestions please? I really dont want my question left unanswered and get out of sight by sitting alone here

  • Verified answer
    timl Profile Picture
    37,283 Super User 2026 Season 2 on at

    @Ardio 

    If you use the Excel Online Business connector, you cannot save a number. You have to save it as text due to the bug in the connector that I mentioned above.

    You can prevent the 'The column in the data source you’re updating expects a 'Text' type and you’re using a 'Number' type' error by not calling the Value function.

    If you need to perform math or aggregations on the Excel text number, you can carry out the conversion at the point at which you perform the calculation, as I showed in the Sum example above.

    If you are able to use SharePoint, the best solution here really is to use SharePoint so that you don't have to mess about with working around these limitations.

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 329 Most Valuable Professional

#2
11manish Profile Picture

11manish 209 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 179

Last 30 days Overall leaderboard