Showing results for 
Search instead for 
Did you mean: 
Frequent Visitor

Link in DataTable stops working after modifying with AddColumns()

I've got a DataTable with one cloumn HyperLink enabled.

When the user clicks on the HyperLink, it brings them to another screen where they can modify the record as per the DataTable. 





This all works fine. However, when I AddColumns() to the DataTable and then click the HyperLink, the modify screen gives an error:


Invalid Formula: Expected a value compatiable with 'DataSource'






What's going on with AddColumns() that's causing this error?

Super User
Super User

Hi @donalmcnamee ,

That is because the added column is not available for the form - you need



Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.



So I've changed Item on the Form to now read:

Filter('', ID=PartsTable.Selected.ID) 

 But it's complaining about Incompatiable types for comparison



Is there something else I'm missing?

@donalmcnamee ,

Very strange - I am assuming 'public parts' is a SharePoint list, therefore will have a numeric ID and PartsTable is a Gallery based on the same list - is this not correct?


'' is a PostgreSQL table that I'm accessing via a Gateway. 

The ID on the table is 'id' (note that it's lower-case).


(Following is a screen-shot of the table structure for '' in PostgreSQL)



I though it may have sometihng to do with case (ID vs id) but it dosen't seem to make a difference. 

Just to confirm, PartsTable is a Data Table based on '' and not a Gallery





I got this working, but I'm not sure it's the most elegant solution. 


In OnSelect in my DataTable I have: 




In in my form for Item I have:


LookUp('', id=Value(selectedId))



@donalmcnamee ,

Pretty much the structure I posted except you did not tell me your data source was SQL - I was assuming SharePoint as you used ID.

Helpful resources

Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (5,273)